Blackdown : wrong value in java.vm.version property ?

P

Philippe Poulard

hi,

I have a third-party ORB that parses the 3 first chars of
"java.vm.version" property to a float.
It fails with "Blackdown" because the value of "java.vm.version" is
"Blackdown-1.4.1-01"
Other vendors provide a parsable value as the ORB expect.

Does the JVM spec constraint the value of "java.vm.version" ?
Is it a bug in Blackdown ?
--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
 
T

Thomas Weidenfeller

Philippe said:
hi,

I have a third-party ORB that parses the 3 first chars of
"java.vm.version" property to a float.

To a float? Sounds like a rather stupid idea to me. What do they do with
version numbers like 1.5.0_01-b08 as set by the Sun VM?
It fails with "Blackdown" because the value of "java.vm.version" is
"Blackdown-1.4.1-01"
Other vendors provide a parsable value as the ORB expect.

Does the JVM spec constraint the value of "java.vm.version" ?

Not that I am aware of.
Is it a bug in Blackdown ?

I don't think so. More a brain-dead implementation, which maybe even
uses the wrong system property. java.specification.version sounds more
like what they want - assuming they are after a particular java version,
not a particular VM implementation.

If you want to work around this, try to set the property in your main
method:

System.setProperty("java.vm.version", "1.4");

or at the command line.

/Thomas
 
P

Philippe Poulard

Thomas said:
To a float? Sounds like a rather stupid idea to me. What do they do with
version numbers like 1.5.0_01-b08 as set by the Sun VM?

I really don't know what they are searching for.
Not that I am aware of.



I don't think so. More a brain-dead implementation, which maybe even
uses the wrong system property. java.specification.version sounds more
like what they want - assuming they are after a particular java version,
not a particular VM implementation.

If you want to work around this, try to set the property in your main
method:

System.setProperty("java.vm.version", "1.4");

i did this dirty hack :

String version = System.getProperty( "java.vm.version" );
Pattern p = Pattern.compile( "\\D+(\\d.*)" );
Matcher m = p.matcher( version );
if ( m.matches() ) {
version = m.group( m.groupCount() );
// Replace "Blackdown-1.4.1-01" with "1.4.1-01"
System.setProperty( "java.vm.version", version );
}
or at the command line.

/Thomas

thanks

--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top