[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some observations
> Here's my test app:
> import java.io.*;
> class version {
> protected static void printProperty(String prop) {
> System.out.println(prop + " = " + System.getProperty(prop));
> }
> public static void main(String[] args) throws
IOException,InterruptedException {
> String javaversion[]={"/usr/bin/java","-version"};
> printProperty("java.vm.specification.version");
> printProperty("java.vm.specification.vendor");
> printProperty("java.vm.specification.name");
> printProperty("java.vm.version");
> printProperty("java.vm.vendor");
> printProperty("java.vm.name");
> System.out.println("Calling java -version:");
> Process javaproc=Runtime.getRuntime().exec(javaversion);
> javaproc.waitFor();
> InputStream data=javaproc.getErrorStream();
> for(;data.available()>0;System.out.print((char)data.read()));
> }
> }
> And here's my output:
> java.vm.specification.version = 1.0
> java.vm.specification.vendor = Sun Microsystems Inc.
> java.vm.specification.name = Java Virtual Machine Specification
> java.vm.version = 1.3.0
> java.vm.vendor = Apple Computer, Inc.
> java.vm.name = Java HotSpot(TM) Client VM
> Calling java -version:
> java version "1.2.2"
> Java HotSpot(TM) Client VM (1.3.0, mixed mode, internal release build)
> No property told the right version. Is this a bug?
> andy
> --
Sheesh!!
depend's,
are you using an Apple MRJ, if so, maybe there is a problem with apple's
implementation,
same program (only changed location of java string, to location on my
box)
give's me following output
java.vm.specification.version = 1.0
java.vm.specification.vendor = Sun Microsystems Inc.
java.vm.specification.name = Java Virtual Machine Specification
java.vm.version = 1.3.0
java.vm.vendor = Sun Microsystems Inc.
java.vm.name = Java HotSpot(TM) Client VM
Calling java -version:
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
which as you can see, look's right
er. I dunno, I don't have enough experience on the Mac but from the
look's of it
maybe your actual Java version (not JVM) is still using Java 1.2.2 core
API's
I dunno, maybe check with Apple
Sean Allen