What doesn't fix this runtime JRE problem
: com/devorg/utils/DemoClazz : Unsupported major.minor version 51.0 Var clazz = java.findClassSync(name) // TODO: change to Class.forName whenĮrror: Could not create class Users/dev/Documents/Workspaces/javaDemo/node_modules/java/lib/nodeJavaBridge.js:16 Running code that attempts to import a custom class that was compiled with Oracle Java 1.7: var java = require('java') System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Var System = java.import('') Ĭonsole.log(System.getPropertySync('java.version')) Ĭonsole.log(System.getPropertySync('')) Īppears to work, but note the JRE reported: Running this code as 'javademo.js' var java = require('java') $ export JAVA_HOME=`/usr/libexec/java_home`Īppears to work just fine (no warnings or errors) Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode) Java(TM) SE Runtime Environment (build 1.7.0_25-b15) OS X appears to be looking at the Oracle Java 1.7 JDK.Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home JAVA_HOME initialized to Oracle Java 1.7 JDK.Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk System/Library/Java/JavaVirtualMachines/1.6.0.jdk Mountain Lion OS X 10.8.4 with Apple Java 1.6 JDK installed.I'm sure this has an easy solution but I haven't been able to figure it out after reviewing the node-java module code.