Tuesday, September 23, 2014

Java: Including jar files

To compile:

/software/java64/jdk1.7.0_60/bin/javac -cp ~/class -d ~/class -extdirs ~/jars ~/src/MyProgram.java


To execute:

/software/java64/jdk1.7.0_60/bin/java -Djava.ext.dirs=/privdir/xcnb804/jars -cp ~/class MyProgram


Where I got burned was this: while compiling you can use the tilde on the -d option, but while executing you cannot use the tilde on the java.ext.dirs system property.



No comments:

Post a Comment