(*** This bug was imported into bugs.kde.org ***) Package: kjava Version: KDE 2.1.1 Severity: normal Installed from: Compiled From Sources Compiler: gcc version 2.95.3 20010315 (release) OS: Irix OS/Compiler notes: SGI/Sun JavaVM 1.3 installed Upon loading any java applet on my SGI in Konqueror the java console pops up and reports: Java VM version: JavaVM-1.3 Java VM vendor: Silicon Graphics Inc. ERROR: This version of Java is not supported for security reasons. Please use Java version 1.2 or higher. The same java applets work fine under netscape 4.75. cayes:~$ /usr/java/bin/java -version java version "JavaVM-1.3" Java(TM) 2 Runtime Environment Standard Edition (build 1.3) Classic VM (build JavaVM-1.3 build 1.3 green threads mipsjit) cayes:~$ uname -a IRIX64 cayes 6.5 01101246 IP28 (Submitted via bugs.kde.org)
This bug is still present in KDE 2.2 and upon further investigation appears to stem from the code at: kdelibs-2.2/khtml/java/org/kde/kjas/server/Main.java:51 This line attempts to extract the numerical portion of the version string "JavaVM-1.3" by extracting the *first* 3 characters and gets "Jav" instead of "1.3". The solution would appear to be to make the code that extracts the numerical version string a little more sophisticated to allow for the version to appear anywhere within the string. Cheers - Tony 'Nicoya' Mantler :) -- Tony "Nicoya" Mantler - Renaissance Nerd Extraordinaire - nicoya@apia.dhs.org Winnipeg Manitoba Canada -- http://nicoya.feline.pp.se/
still present?
Unfortunatley my SGI is out of commission for the moment, so I won't be able to verify this. Sorry. Cheers - Tony 'Nicoya' Mantler :)
This does look to be a valid bug. The code in question is: Main.debug( "JVM version = " + System.getProperty( "java.version" ) ); String version = System.getProperty("java.version").substring( 0, 3 ); Main.debug( "JVM numerical version = " + version ); The question is, how do we get a working VM to test a possible fix? I guess the fix would be to remove everything up to the first numeral, and then parse the substring from there.
Subject: kdelibs/khtml/java CVS commit by staikos: Better late than never! Well, at least we fixed this while IRIX still exists. Please test on IRIX if anyone still has this running with KDE. CCMAIL: 26607-done@bugs.kde.org M +171 -173 kjava.jar 1.48 M +4 -0 org/kde/kjas/server/Main.java 1.34 --- kdelibs/khtml/java/org/kde/kjas/server/Main.java #1.33:1.34 @@ -66,4 +66,8 @@ Main.debug( "JVM version = " + System.getProperty( "java.version" ) ); String version = System.getProperty("java.version").substring( 0, 3 ); + // Hack for SGI Java2 runtime + if (version == "Jav") { // Skip over JavaVM- (the first 7 chars) + version = System.getProperty("java.version").substring(7,3); + } Main.debug( "JVM numerical version = " + version ); try