The option called -cp is an abbreviation for -classpath.
Before J2SE 5.0 only the java command has support for -cp.
Since J2SE 5.0 also the javac command has support for -cp.
For better consistency, the alternate option -cp
should also be added in an upcoming jdb release.
% jdb -version
This is jdb version 1.5 (J2SE version 1.5.0)
% javac -classpath . Dummy.java
% java -classpath . Dummy
% jdb -classpath . Dummy
Initializing jdb ...
> quit
% javac -cp . Dummy.java
% java -cp . Dummy
% jdb -cp . Dummy
invalid option: -cp
[--snip--]
###@###.### 2005-1-21 12:31:11 GMT
Before J2SE 5.0 only the java command has support for -cp.
Since J2SE 5.0 also the javac command has support for -cp.
For better consistency, the alternate option -cp
should also be added in an upcoming jdb release.
% jdb -version
This is jdb version 1.5 (J2SE version 1.5.0)
% javac -classpath . Dummy.java
% java -classpath . Dummy
% jdb -classpath . Dummy
Initializing jdb ...
> quit
% javac -cp . Dummy.java
% java -cp . Dummy
% jdb -cp . Dummy
invalid option: -cp
[--snip--]
###@###.### 2005-1-21 12:31:11 GMT
- relates to
-
JDK-4818216 TTY: no (easy) way to enable assertions in the debugged program.
- Closed