Re: .java to .class issue
What error are you actually getting when you run javac on your .java file?
Re: .java to .class issue
Hi there you've go some things mixed up. PATH needs to include the java/bin directory, i.e. where the java.exe and javac.exe files are. Easy test is : c:>java -version
That should print out the version of your JDK.
The classpath tells the VM where to look for your .java file.
So you go to the direcory where the .java file is and type javac -cp. HelloWorldApp.java
Now you should see the .class file
To run it you type in the same dirctory: java HelloWorldApp
Re: .java to .class issue
In the printscreen you can see that PATH stands for my current java version, after typing "javac -cp. HelloWorldApp.java" nothing happened, I think this is mainly my computer's fault, but I can be wrong. if it creates a .class file, doesn't it automatically store in the same directory as the original .java file?
EDIT: When I entered "javac -cp. HelloWorldApp.java" this showed up:
javac: invalid flag: -cp.
Usage: javac <options> <source files>
use -help for a list of possible options
Re: .java to .class issue
Put a space between the 'cp' and the '.'
Your earlier problem is down to you starting your command with 'PATH'.
Re: .java to .class issue
Thanks, Tolls! Sorry Vantrax, bad typo from my side.
Re: .java to .class issue
It solved the problem!! I now have a .class file, thanks guys :)