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

Java versions supported #26

Open
jhuguetn opened this issue Feb 9, 2021 · 3 comments
Open

Java versions supported #26

jhuguetn opened this issue Feb 9, 2021 · 3 comments

Comments

@jhuguetn
Copy link

jhuguetn commented Feb 9, 2021

I have recently upgraded the OS of a machine hosting a CTP service and along with the OS, Java also got updated. Now I am at version 11. Attempting to start CTP as a service I get into the following issue,

Feb  9 13:00:19 XXX systemd[1]: Started CTP Service.
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: Starting CTP
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: java -Xmx2048m -Xms2048m -Djava.ext.dirs=null -jar libraries/CTP.jar
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: stderr: Error: Could not create the Java Virtual Machine.
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: stderr: Error: A fatal exception has occurred. Program will exit.
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: stderr: exit
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: stdout: -Djava.ext.dirs=null is not supported.  Use -classpath instead.
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: stdout: exit
Feb  9 13:00:20 XXX ctp-wrapper.sh[19460]: Exit: code 1
Feb  9 13:00:21 XXX ctp-wrapper.sh[19460]: Runner: exit.

Seems like after Java version 8 the command line directive -Djava.ext.dirs was deprecated with the recommendation to use -classpath instead. So CTP command offended Java version 11 and failed to run it as expected.

At this point I see 2 options,
(a) install Java 8 and use it for running CTP
(b) update CTP and see if it takes care of such deprecation and supports newer versions of Java

@johnperry, do latest versions of CTP support Java 9+ or still require Java 8 to run? What would your advice be here?

Thanks

@johnperry
Copy link
Owner

johnperry commented Feb 9, 2021 via email

@jhuguetn
Copy link
Author

jhuguetn commented Feb 9, 2021

Thanks for your help John.

Yes, my CTP instance is rather outdated,
CTP Build: 2018.01.26 at 11:28:26 CST on Java 1.7

To clarify, I created a while ago a systemd daemon service for running CTP in a Linux system in a stable-ish mode. That's been working fine for some time and basically runs as follows (see processes),

/usr/bin/java -jar /opt/ctp/bin/Runner.jar start
\_ java -Xmx2048m -Xms2048m -Djava.ext.dirs=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext -jar libraries/CTP.jar

As you can see above, is the Java process spawned by Runner.jar the one with such -D parameters. I am afraid I cannot do much to remove them.

@johnperry
Copy link
Owner

johnperry commented Feb 9, 2021 via email

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

2 participants