How do I get the JSS to use newer Java?

lehmanp00
Contributor III

So I installed Java 7 on my Ubuntu 14.04 server but the JSS is still using the Java 1.6. How can I get the JSS to use the newer java?

1 ACCEPTED SOLUTION

lehmanp00
Contributor III

Thanks to Martin at JAMF I was able to update to Java 8 and switch the JSS to it.

  1. Ubuntu 14.04 doesn't have Java 8 package yet so you need to add a OpenPDK repo:

sudo add-apt-repository ppa:openjdk-r/ppa

  1. Then update apt-get:

sudo apt-get update

  1. Then add the Java8 package:

sudo apt-get install openjdk-8-jdk

  1. Next, you can run a command to allow you to pick with installed version of Java to make the system default:

sudo update-alternatives --config java

For me, Java 8 became the default when I installed it so I didn't have to do anything, but you can choose which version by just pressing a key at that point.

  1. Next I restarted jamf.tomcat in /etc/init.d and then ran the JSS Summary tool to get a report:
Java Version 1.8.0_45-internal Java Architecture .................. amd64 Java Vendor Oracle Corporation Java Home .......................... /usr/lib/jvm/java-8-openjdk-amd64/jre Java Temp Directory /usr/local/jss/tomcat/temp

Done!

A big thanks to Martin at JAMF for testing this for me!

View solution in original post

3 REPLIES 3

Aziz
Valued Contributor

Is Tomcat using the correct version of Java? I updated Java and uninstalled the old version, for some reason Tomcat was pointed to the previous version of Java and would not start.

Here's a Windows Example, path will differ on Ubuntu

Open

C:Program FilesJSSTomcatin	omcat7w

Then go to the "Java" tab and see if the "Java Virtual Machine" is correct.

Mine says

C:Program FilesJavajre1.8.0_60inserverjvm.dll

lehmanp00
Contributor III

Thanks to Martin at JAMF I was able to update to Java 8 and switch the JSS to it.

  1. Ubuntu 14.04 doesn't have Java 8 package yet so you need to add a OpenPDK repo:

sudo add-apt-repository ppa:openjdk-r/ppa

  1. Then update apt-get:

sudo apt-get update

  1. Then add the Java8 package:

sudo apt-get install openjdk-8-jdk

  1. Next, you can run a command to allow you to pick with installed version of Java to make the system default:

sudo update-alternatives --config java

For me, Java 8 became the default when I installed it so I didn't have to do anything, but you can choose which version by just pressing a key at that point.

  1. Next I restarted jamf.tomcat in /etc/init.d and then ran the JSS Summary tool to get a report:
Java Version 1.8.0_45-internal Java Architecture .................. amd64 Java Vendor Oracle Corporation Java Home .......................... /usr/lib/jvm/java-8-openjdk-amd64/jre Java Temp Directory /usr/local/jss/tomcat/temp

Done!

A big thanks to Martin at JAMF for testing this for me!

jlucia_cysd
New Contributor

Thanks! Worked perfectly for me!