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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -