How To Setup Javac Command
How To Setup Javac Command
Credit to http://www.skylit.com/javamethods/faqs/javaindos.html
by Fir09 :D
1st make sure you already have install jdk Open control panel -> System -> Advance system setting
by Fir09 :D
by Fir09 :D
by Fir09 :D
you have to be very careful because your system might crash if you make a mistake. Proceed with extreme caution! At the end in the text box of Variable value, add path of your installed jdk, for example ;C:\Program Files\Java\jdk1.7.0\bin. Depend on jdk version you install. For more safe, browse your jdk first[by default in C:\Program Files\Java\jdk1.7.0\bin] and copy the path.
by Fir09 :D
Then just click OK and OK and OK.. Hehe To test javac. 1st create your java folder in C:
by Fir09 :D
Then open command prompt (cmd) Go to your java directory, type cd C:\myJava
by Fir09 :D
Type javac HelloWorld.java this will compile your java. If nothing happens means no error. You should see HelloWorld.class in your folder
by Fir09 :D
To run HelloWorld.java file, type : java HelloWorld You should get output : Hello, World!
by Fir09 :D
The END
Note: javac is use to compile. you also can use other software like kawa or bluej to compile your java file. Tq.
by Fir09 :D