version issue

dan.stanger at ieee.org dan.stanger at ieee.org
Tue Mar 20 09:34:19 PST 2001


please forward this to the right person.
thanks,
dan stanger
dan.stanger at ieee.org

there is a problem with the output of java -version.
the sun compiler outputs the string java version "1.3.0"
and kaffe doesnt.  this causes problems with configure scripts
which parse the first line from java -version.
the following patch outputs the JAVA_VERSION_STRING in the same way
that sun does.  i tested this with a configure script to verify that
it works.  please feel free to use this under the GPL.

$ cvs -d :pserver:readonly at cvs.kaffe.org:/cvs/kaffe diff -u version.c
Index: version.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffe/version.c,v
retrieving revision 1.2
diff -u -r1.2 version.c
--- version.c   1999/12/04 14:39:55     1.2
+++ version.c   2001/03/19 18:36:37
@@ -28,6 +28,7 @@
 {
        if (!versionfd)
                versionfd = stderr;
+       fprintf(versionfd, "java version \"%s\"\n", JAVA_VERSION_STRING);
        fprintf(versionfd, "Kaffe Virtual Machine\n");
        fprintf(versionfd, "Copyright (c) 1996-2000\nTransvirtual Technologies,
Inc.  All rights reserved\n");
        fprintf(versionfd, "Engine: %s   Version: %s   Java Version: %s\n",


More information about the kaffe mailing list