net/serviio not using openjdk8

I upgraded the port net/serviio to 1.5 and it installed java/openjdk8 as a dependency. However, I still have java/openjdk7 installed for other items. How do I make serviio use the latest openjdk?

I get the following when I try to start serviio:

Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/serviio/MediaServer : Unsupported major.minor version 52.0
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
  at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

My default java is still showing up as 1.7

Code:
 java -version
openjdk version "1.7.0_76"
OpenJDK Runtime Environment (build 1.7.0_76-b13)
OpenJDK Server VM (build 24.76-b04, mixed mode)

Code:
cat /usr/local/etc/javavms
/usr/local/openjdk8/bin/java
/usr/local/openjdk7/bin/java
/usr/local/openjdk6/bin/java
 
According to javavm(1), this shouldn't happen. The most native and up to date Java VM should be used. I updated the net/serviio and didn't test this scenario. Please add this to /usr/local/sbin/serviiod before the last line that starts Java and let me know if this works for you. Looks good to me and if it works for you I'll work to get it added to the port.
Code:
JAVA_VERSION="1.8+"
export JAVA_VERSION
 
That worked for me.

Although I still don't understand why the default Java VM is still 7 and not 8. I don't have anything set in /usr/local/etc/javavm_opts.conf.
 
Back
Top