Hi Daniel, thanks for tell us the problem, probably none of us used Pivot with SAP VM so we didn't noticed before, sorry. Last, to post questions/requests/etc in our mailing list you should subscribe (don't worry it's free and simple), as seen [here](http://pivot.apache.org/lists.html) or your posts won't be accepted.
We just resolved a blocking issue with latest Oracle JDK 8 Patch 131, see [PIVOT-99](https://issues.apache.org/jira/browse/PIVOT-993). I'm thinking if this time is would be better for us to decode the last part (anything after the major.minor.patch) as a string instead of the (just updated) short value. Or anyway do the decode in a try/catch block so in case of problems a warning could be written in logs but application would start the same ... Roger (and Daniel, and all others) , what approach do you prefer ? Maybe a new, dedicated issue could be better to track this issue. > Version.decode("8.1.028 25.51-b14"); Luckily we just add a JUnit test class for testing version decode, so a test on your version string could be put there :-) . Daniel, just for info, are you using Pivot-2.0.4 or a snapshot (2.0.x or 2.1.0 from trunk) ? Be free to ask us for further info. Thanks for now. Bye, Sandro 2017-04-25 11:31 GMT+02:00 Mangold, Daniel Julius <daniel.mang...@sap.com>: > Hello everyone, > > I hope this is the right place to report issues. > > I just wanted to run an application which has a dependency to Apache Pivot > 2.0.4. > The application calls org.apache.pivot.wtk.DesktopApplicationContext.main > which inherits from ApplicationContext. > ApplicationContext has a static initializer block with this code line: > > jvmVersion = Version.decode(System.getProperty("java.vm.version")); > > > With my SAP JVM the system property has this string: > 8.1.028 25.51-b14 > > Which results in a > Exception in thread "main" java.lang.NumberFormatException: For input string: > "028 25" > at > java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) > at java.lang.Integer.parseInt(Integer.java:580) > at java.lang.Byte.parseByte(Byte.java:149) > at java.lang.Byte.parseByte(Byte.java:175) > at org.apache.pivot.util.Version.decode(Version.java:156) > > > If you do not have a SAP JVM, you can easily reproduce the issue with this > code line: > Version.decode("8.1.028 25.51-b14"); > > > Maybe the problem is that the requested property is java.vm.version. When I > try with just java.version, it does not throw an exception: > Version v = Version.decode(System.getProperty("java.version")); > System.out.println(v.getMajorRevision()); > System.out.println(v.getMinorRevision()); > System.out.println(v.getMaintenanceRevision()); > System.out.println(v.getUpdateRevision()); > > Output: > 1 > 8 > 0 > 112 > > (The getProperty for java.version returns 1.8.0_112) > > > Best regards, > Daniel > >