Javac bootclasspath option -
i try add -bootclasspath option when compiling java source this:
javac -classpath lib/* -target 1.6 -source 1.6 -bootclasspath /usr/lib/jvm/java-7-oracle/lib/*.jar hello.java
i getting following error when compiling:
javac: invalid flag: /usr/lib/jvm/java-7-oracle/lib/dt.jar usage: javac <options> <source files> use -help list of possible options
how should add bootclasspath parameter?
the shell expands /usr/lib/jvm/java-7-oracle/lib/*.jar list of jars, javac called that:
javac ... -bootclasspath /usr/lib/jvm/java-7-oracle/lib/rt.jar /usr/lib/jvm/java-7-oracle/lib/dt.jar ... hello.java
you can avoid putting path between single quotes:
javac ... -bootclasspath '/usr/lib/jvm/java-7-oracle/lib/*.jar' ... hello.java
Comments
Post a Comment