| Summary: | Add support for OpenJDK version notation | ||
|---|---|---|---|
| Product: | [JogAmp] Gluegen | Reporter: | Manu <puybaret> |
| Component: | core | Assignee: | Sven Gothel <sgothel> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | gouessej |
| Priority: | P1 | ||
| Version: | 2 | ||
| Hardware: | All | ||
| OS: | all | ||
| Type: | --- | SCM Refs: |
86bdae8ce26d291c0096ed500581239dd2a87125
|
| Workaround: | --- | ||
86bdae8ce26d291c0096ed500581239dd2a87125 Done .. avoding the replace op. Pls validate! Thank you Manu. Works for OpenJDK 1.7.0-u60-b04 and Oracle Java 1.7.0_60-ea Thanks for the fix :-) |
In OpenJDK, Java version notation is a little different from Oracle JDK one: OpenJDK uses "-u" instead of "_" to separate the version number from the update number, i.e. "1.7.0-u60-b04" vs "1.7.0_60-ea". That would be nice to take this into account in the static initializer of jogamp.common.os.PlatformPropsImpl class. You could simply replace the line: final int usIdx = JAVA_VERSION.lastIndexOf("_"); by: final int usIdx = JAVA_VERSION.replace("-u", "_").lastIndexOf("_"); If you want to program it better, you can also test the "java.runtime.name" property that returns "OpenJDK Runtime Environment" for OpenJDK. See also bug #944 https://jogamp.org/bugzilla/show_bug.cgi?id=944