In my programming class we were asked to make a simple program and compile it, run it and create a .jar from the CMD in windows (WITHOUT IDE); which I still do not know how to do, because I always used Netbeans.
The file path is:
C: \ JavaWorks \ RFCJava \ GetRFC.java
The file is as follows:
package getrfc;
import javax.swing.JOptionPane;
public class GetRFC {
//contenido de la clase
}
public static void main(String[] args) {
pedirDatos();
}
}
I have done the following:
C: > cd C: \ JavaWorks \ RFCJava
C: \ JavaWorks \ RFCJava > javac GetRFC.java
A .class file has been generated in the same directory, normal. When trying to run with "java", I get it:
C: \ JavaWorks \ RFCJava > java GetRFC
Error: The main GetRFC class was not found or loaded
But the GetRFC.class class is right there, so it does exist. We are starting programming, so maybe I omitted something simple. Any help is welcome; since I also do not know how to do the .jar and as far as I have researched, I need first that the java GetRFC
works.
As an additional note, the directory only contains the .java and .class file; nothing more.