http://bagongsinag.org/javaproblem.png
i have the error above..
I already install jdk 1.6.0_14..
Am I missing somethings?
Printable View
http://bagongsinag.org/javaproblem.png
i have the error above..
I already install jdk 1.6.0_14..
Am I missing somethings?
HelloWorldApp.java is not compiled.
You need to use the javac command to compile it into a .class file.
Then you can use the "java" command to run it. You also don't need to write the file extension e.g. "Name.class", you can just use "Name" when you run the "java" command.
Hope that helps.
But I already use javac to compile the file.. is there a other reason why this happen?
HI.
You need to set path before compiling.
Go to specified path in command prompt.
Then set path.....
FOR EXAMPLE :
d:\programs\java> set path="C:\Java\jdk1.5.0_03\bin"
After setting path.... then compile your program and check it......
OP...when you compile a java file you get a .class file. That is what you run (without the .class extension). In your case "java d:\HelloWorldApp".
problem solved? if not, i just suggest you use JCreator from JCreator Java IDE. This one is lightweight, but if you want, try NetBeans.
When using these IDE's, you dont have to use your CMD anymore..:D
When learning Java it's best to learn from the command line so you actually understand how the thing works. Because you will not be running real apps from within an IDE...