Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK shipped with nightly build installers needs to be updated #335

Open
cxbrooks opened this issue Sep 4, 2019 · 1 comment
Open

JDK shipped with nightly build installers needs to be updated #335

cxbrooks opened this issue Sep 4, 2019 · 1 comment

Comments

@cxbrooks
Copy link
Member

cxbrooks commented Sep 4, 2019

The JDK shipped with the nightly build installers needs to be updated because the JDKs are based on JDK1.8 and the nightly build is compiled with JDK9 or later.

During installation under macOS, the problem first appears if a user attempts to start Vergil during the installation process. The error message is

LSOpenURLsWithRole() failed with error -10810 for the file /Applications/ptII11.1.devel/bin/Vergil.app

The workaround is to run:

cd /Applications/ptII11.1.devel
open ./bin/Vergil.app/Contents/MacOS/universalJavaApplicationStub

The long term solution is to update the JDK for Windows and Mac.

For macOS, the $PTII/bin/jdk directory is created by $PTII/bin/makeapp. makeapp is created by running configure, which reads $PTII/bin/ptinvoke.in, creates ptinvoke and then creates symbolic links for files such as makeapp. Under macOS, running (cd $PTII/bin; make) should create the jdk/ directory, but there are problems redistributing JDK10.

bash-3.2$ rm -rf Vergil.app/
bash-3.2$ make Vergil.app
./makeapp Vergil.app FULL -full
Updating universalJavaApplicationStub from /Users/cxh/src/ptII11.1.devel/vendors/universalJavaApplicationStub/src/universalJavaApplicationStub
./makeapp: /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home/jre/COPYRIGHT does not exist, perhaps you are using Java 10?
The Java 10 JDK does not include a JRE that is easy to ship separately, so if you do 'export TRAVIS=true' and rerun,
then a Java 8 JVM will be downloaded.  You may need to remove Vergil.app before rerunning.
Untaring /Users/cxh/src/ptII11.1.devel/vendors/installer/MacJVM.tar.gz in /Users/cxh/src/ptII11.1.devel/ now: Wed Sep  4 09:08:01 PDT 2019
./makeapp: Installation of /Users/cxh/src/ptII11.1.devel/jdk succeeded.
./makeapp: copying /Users/cxh/src/ptII11.1.devel/vendors/jogl to /Users/cxh/src/ptII11.1.devel/bin
touch Vergil.app

Once an updated JDK is created, for the Travis installer to have the macOS jdk/ directory, https://ptolemy.berkeley.edu/ptolemyII/MacJVM.tar.gz should be updated.

For Windows, $PTII/adm/gen-11.1/jre64 should be updated.

I attempted to build Ptolemy II using a JDK12 javac by using the --release 8 flag, but compilation failed because JavaFX was not available. With JDK12, JavaFX is a module, and using --release 8 means that the module system is not available. JavaFX is used by the audio accessors, which are a big part of the new work in Ptolemy II 11, so releasing without the audio accessors is not a good idea.

@cxbrooks
Copy link
Member Author

So one fix to this would be to ship the installers with OpenJDK included. However, OpenJDK seems to be GPL v2 with a classpath exception, see https://openjdk.java.net/legal/gplv2+ce.html

AdoptOpenJDK could be of use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant