Gootool-1.0.1.366-2 only checks for sun-jdk on Linux
- Login to post comments
Wed, 11/11/2009 - 03:37
Please direct me if Gootool bugs should go somewhere else (though it looks like this is the correct place?).
Gootool by default uses the sun-jdk and check and will fail on check for openjdk. Is it possible to put an openjdk check in? I looked into this and a crude way to do it would be:
java -version 2>&1 | grep "java version" | grep -o '\[0-9]\.[0-9]'
The original ouput is:
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.1) (ArchLinux-1.6.1-2-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
Not the best check but should work fine.
This should do the trick and give "1.6." (with the trailing full-stop to avoid any future silliness like 10.6 or 1.60):
java -version 2>&1 | grep "^java version \".*\"$" | cut -d '"' -f 2 | grep -Eo '^[0-9]+\.[0-9]+\.'