Created
October 5, 2012 15:32
-
-
Save arton/3840535 to your computer and use it in GitHub Desktop.
Check Oracle JVM on OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for JDK1.7 | |
# export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home | |
# else | |
# export JAVA_HOME= | |
# | |
if ENV['JAVA_HOME'] | |
if File.exist?("#{ENV['JAVA_HOME']}/jre/lib/server/libjvm.dylib") | |
ENV['JVM_LIB'] = "#{ENV['JAVA_HOME']}/jre/lib/server/libjvm.dylib" | |
end | |
end | |
require 'rjb' | |
Sys = Rjb::import('java.lang.System') | |
p Sys.property('java.vm.vendor') #=> "Oracle Corporation" | |
p Sys.property('java.vm.version') #=> "23.3-b01" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment