…or whatever your class is called.java Hello
Obviously if you are already in the correct folder, you only need the two lines starting “javac”. If you have a .class file, you must have got the javac instruction to work already. It does no harm to run javac twice, however.mkdir java
cd java
javac Hello.java
java Hello
kieran white wrote:the page just didn't open correctly on my phone.
kieran white wrote:I'm following the instructions and now when I type Javac it says it's not recognized as a internal or external command, the only way to prevent this is by putting C:\Java\jdk1.7.0_40\bin\javac rather then C:\Java\jdk1.7.0_40
kieran white wrote:however now when I type in Javac it says:
Error: Could not find or load main class com.sun.tools.javac.Main
Maneesh Godbole wrote:Please double check if you have tools.jar under your JDK (not JRE) installation directory and copy paste the path to tools.jar here
On my system its located at JDK_HOME/lib
?echo %PATH%
echo %CLASSPATH%
java -version
javac -version
Campbell Ritchie wrote:Where did you install it?
What happens when you give the following four instructions at a command line:-?echo %PATH%
echo %CLASSPATH%
java -version
javac -version
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|