What's the difference between using
javac -cp classes helloworld.java
and
javac -classpath classes helloworld.java
in CMD?
What's the difference between using
javac -cp classes helloworld.java
and
javac -classpath classes helloworld.java
in CMD?
There's absolutely no difference. It just tells the Java compiler you want to use a custom classpath specified on the command line argument.
So
-cp
and-classpath
are fully equivalent.You can find more info on javac - Java programming language compiler page.
There is none. They're both options for setting the classpath. See the man page.
They are the same, check http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html