Re: Version string

2 views
Skip to first unread message

Joakim Nordström

unread,
Jul 7, 2011, 8:45:38 AM7/7/11
to jam...@googlegroups.com
Hi Thore,

Shouldn't this info reside in the classpath, i.e. the .class-files? Basically the JDK-version in JAmiga should be sufficent.
The class library we're using is GNU Classpath 0.98, and I'm also looking into JDK7/8. With your suggestion, wouldn't we need three different JAmiga binaries for these -- GNU 0.98, 1.7 and 1.8?

Or have I misunderstood what you mean?

/Joakim

2011/7/7 Thore Sittly <TSi...@gmx.de>
Hello Joakim

what do you think about changing the version string in JAmiga?
We should add a line before the usual JAmiga version line which sais:
java version "1.6.0_24"

or something like this. The reason is, so we match the current java version string and scripts who ask for version will find this string.
The current version string is not recognized by such scripts.

What do you think?

Thore

PS: Did you merged my code or should I do it after entering my found credentials for the google account? ;)



--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Thore Sittly

unread,
Jul 7, 2011, 8:52:52 AM7/7/11
to jam...@googlegroups.com
Hello

You misunderstood me :) I meant only the binary version string $VER.
If you use
java -version
on Linux or Windows, you will get version informations which looks like I've written before.
Software has sometimes scripts to look for the java VM version (not classpath) and are using java -version and grep the version out of it. The JAmiga version string do not match this style.

For example you can see it in Maqetta Server. so it would be only a simple additional line in the version string. The JAmiga version itself will be the JAmiga number, and the java version could be 1.6 up to maintain compatibility with other Java VM.

Regards

Thore

-------- Original-Nachricht --------
Datum: Thu, 7 Jul 2011 14:45:38 +0200
Von: "Joakim Nordström" <joakim.n...@gmail.com>
An: jam...@googlegroups.com
Betreff: Re: Version string




--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone

Joakim Nordström

unread,
Jul 7, 2011, 9:28:35 AM7/7/11
to jam...@googlegroups.com
Ah, ok.

Java on my current machine says:

java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) Client VM (build 14.1-b02, mixed mode, sharing)

or:

java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)

JamVM also seems to use a 1.5-notation.

On Oracles webpage I found:

4.4 java.version

The java.version property identifies the version of the JDK or JRE that you are running.

The value of the property is common to the HotSpot JRE and the JRockit JRE. It is displayed on the first line of the output of the java -version command in the following format:

major_version.minor_version.micro_version[_update_version][-milestone]

The following example shows the output of the java -version command. The java.version information is highlighted.

java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Oracle JRockit(R) (build R28.0.0-617-125986-1.6.0_17-20091215-2120-windows-x86_64, compiled mode)

For more information about the java.version property, see the J2SE SDK/JRE Version String Naming Convention at:

http://java.sun.com/j2se/versioning_naming.html

4.5 java.runtime.version

The java.runtime.version property identifies the Java SE JDK/JRE version and build.

The value of the property is common to the HotSpot JRE and the JRockit JRE. It is displayed on the second line of the output of the java -version command in the following format:

major_version.minor_version.micro_version[_update_version][-milestone]-build

The following example shows the output of the java -version command. The java.runtime.version information is highlighted.

java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Oracle JRockit(R) (build R28.0.0-617-125986-1.6.0_17-20091215-2120-windows-x86_64, compiled mode)

For more information about the java.runtime.version property, see the J2SE SDK/JRE Version String Naming Convention at:

http://java.sun.com/j2se/versioning_naming.html
http://download.oracle.com/docs/cd/E15289_01/doc.40/e15062/sysprop.htm#i999440

So, if I understand this correctly, the java.version string actually come from the .class-files, or rather the System properties.

This seems to be the official document for version naming:
http://java.sun.com/j2se/versioning_naming.html

We should probably take a closer look at that before deciding what to do. But I believe that "jamiga -version" should actually start the VM and get the runtime version, whereas "version jamiga", will return $VER, which should include the hardcoded java.runtime.version.

Anyway, we should definately make sure that the correct thing is returned. Good suggestion!

Have you found Google username yet?

Thore Sittly

unread,
Jul 7, 2011, 10:16:51 AM7/7/11
to jam...@googlegroups.com
Yes I found it but I haven't test it yet- will try it today.
I have some jars to test today so I will be on the machine

If you start -version, the vm is not initialized yet, so JAmiga cannot examine classes at this point. We have to look for that closer. Maybe starting the VM, reading version number, stopping vm, exit.

Regards

-------- Original-Nachricht --------
Datum: Thu, 7 Jul 2011 15:28:35 +0200

Reply all
Reply to author
Forward
0 new messages