From: bsoares Date: Tue, 17 Jul 2018 11:17:47 +0000 (+0100) Subject: JAL-3065 X-Git-Tag: Release_2_10_5~22^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4865a4110b7725acefd5b166f9b7c482ac01ce15;p=jalview.git JAL-3065 Change in all repo documentation advising launching Jalview with the -Djava.ext.dirs=LIB option to now use -classpath="LIB/*:..." instead. Using the -Djava.ext.dirs= option masks the JRE's own ext dir which contains the sunjce packages. This manifests as cipher problems when accessing https resources (in particular https://www.ebi.ac.uk/... when searching for PDB structures, activated when choosing Sequence->"3D Structure Data...") --- diff --git a/README b/README index eaf226b..74f4591 100755 --- a/README +++ b/README @@ -23,11 +23,11 @@ For more help, read the file doc/building.html To run application: -java -Djava.ext.dirs=JALVIEW_HOME/lib -cp JALVIEW_HOME/jalview.jar jalview.bin.Jalview +java -classpath "JALVIEW_HOME/lib/*:JALVIEW_HOME/jalview.jar" jalview.bin.Jalview Replace JALVIEW_HOME with the full path to Jalview Installation Directory. If building from source: -java -Djava.ext.dirs=JALVIEW_BUILD/dist -cp JALVIEW_BUILD/dist/jalview.jar jalview.bin.Jalview +java -classpath "JALVIEW_BUILD/dist/*" jalview.bin.Jalview ################## diff --git a/help/html/features/commandline.html b/help/html/features/commandline.html index 9cffc51..92d9323 100644 --- a/help/html/features/commandline.html +++ b/help/html/features/commandline.html @@ -49,11 +49,11 @@ provided by InstallAnywhere any output from the application will be sent to output.txt, not standard out.
The Jalview application also requires a number of additional libraries on the - class path. The command line below adds the Jalview installation's - 'lib' directory to the list of directories that are searched for - jars to be added to the classpath: + class path. The command line below adds all the jar files in the + Jalview installation's 'lib' directory to the classpath, as well as + the Jalview application jar file:

-
java -Djava.ext.dirs=$INSTALL_DIR$/lib -cp $INSTALL_DIR$/jalview.jar jalview.bin.Jalview -open [FILE] 
+
java -classpath "$INSTALL_DIR$/lib/*:$INSTALL_DIR$/jalview.jar" jalview.bin.Jalview -open [FILE] 

Use '-help' to get more information on the command line arguments that diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 30620a1..0b1cf60 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -70,7 +70,8 @@ import groovy.util.GroovyScriptEngine; /** * Main class for Jalview Application
*
- * start with java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview + * start with java -classpath "$PATH_TO_LIB$/*:$PATH_TO_CLASSES$" + * jalview.bin.Jalview * * @author $author$ * @version $Revision$ @@ -265,7 +266,7 @@ public class Jalview { error.printStackTrace(); System.out.println("\nEssential logging libraries not found." - + "\nUse: java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview"); + + "\nUse: java -classpath \"$PATH_TO_LIB$/*:$PATH_TO_CLASSES$\" jalview.bin.Jalview"); System.exit(0); } diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index 69a3ef7..2b40a72 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -55,7 +55,7 @@ public class CommandLineOperations private static final int MINFILESIZE_BIG = 4096; - private ArrayList successfulCMDs = new ArrayList(); + private ArrayList successfulCMDs = new ArrayList<>(); /*** * from @@ -118,7 +118,7 @@ public class CommandLineOperations { String _cmd = "java " + (withAwt ? "-Djava.awt.headless=true" : "") - + " -Djava.ext.dirs=./lib -classpath ./classes jalview.bin.Jalview "; + + " -classpath \"./lib/*:./classes\" jalview.bin.Jalview "; System.out.println("CMD [" + cmd + "]"); Process ls2_proc = null; Worker worker = null; diff --git a/utils/InstallAnywhere/README_IA b/utils/InstallAnywhere/README_IA index e9e5176..3ccb2a4 100755 --- a/utils/InstallAnywhere/README_IA +++ b/utils/InstallAnywhere/README_IA @@ -6,7 +6,7 @@ Jalview Readme To run application: -java -Djava.ext.dirs=JALVIEW_HOME/lib -jar JALVIEW_HOME/jalview.jar [-help ... ] +java -classpath "JALVIEW_HOME/lib/*" -jar JALVIEW_HOME/jalview.jar [-help ... ] Replace JALVIEW_HOME with the full path to Jalview Installation Directory. Use -help to see the available command line arguments. @@ -15,9 +15,11 @@ For best results use a Sun java run time environment (not the gcj gnu java, sorr If you want to the java runtime bundled with Jalview, then launch jalview like this: -JAVA_HOME=JALVIEW_HOME/jre JALVIEW_HOME/jre/bin/java -Djava.ext.dirs=JALVIEW_HOME/lib -jar JALVIEW_HOME/jalview.jar +JAVA_HOME=JALVIEW_HOME/jre JALVIEW_HOME/jre/bin/java -classpath "JALVIEW_HOME/lib/*:JALVIEW_HOME/jalview.jar" jalview.bin.Jalview +[or +JAVA_HOME=JALVIEW_HOME/jre/Contents/Home JALVIEW_HOME/jre/Contents/Home/bin/java -classpath "JALVIEW_HOME/lib/*:JALVIEW_HOME/jalview.jar" jalview.bin.Jalview +in macOS] -Please Note: the -jar jalview.jar option launches the jalview.bin.Jalview class in the jalview.jar ##################