I'm trying to compile a java file through cmd with the javac command. But every time I type javac it just makes a Hello.class file in the folder I'm trying to compile in.
What can I do to make it say compiling ?
Three answers:
2011-02-26 18:10:55 UTC
that .class file is the name of the class you made in your .java file. when you run javac (or anything on the command line for that matter) if it doesnt give you any compilation errors then it was successful and you should have class file for each of you classes! to run:
java Hello
cockman
2016-10-17 04:33:13 UTC
you could specify the fullpath to the javac compiler. to illustrate, c"javajdkbinjavac attempt.java. on the different hand, upload the c:....bin folder to your device path variable. despite if, i could advise you employ an IDE which incorporate Netbean or Eclipse.
Kung Fu Champion
2011-02-26 20:20:22 UTC
Type in:
javac Hello.java
If nothing happen, then there is no errors in your program.
Hope that helps.
=D
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.