|
On 2002.08.22 16:03 David Gibbs wrote: > "Mihael Knezevic" <m.knezevic=+gMMHG75NKY@public.gmane.org> wrote in > message > news:<20020822082246.E10637@P001W025>... > > does anybody have any experience with updating the jdk version of an > > as400. i tried it and installed the group ptf sf99068 and after an ipl > the > > java ptf sf63319. after i changed the SystemDefault.properties file to > > java.version=1.3 no java program worked anymore. i checked the version > > with the command java -version on the qsh. that was ok. then i undid my > > change of the SystemDefault.properties file to java.version=1.1.8 . > after > > that, all java program were working again. > > In what way was the program not working? > > What error did you get? > my SystemDefault.properties file only consists of the line "java.version=1.3". when i try to run this simple java program: public class GetOs { public static void main (String args[]) { System.out.println(System.getProperty("os.name")); System.exit(0); } } i'm getting the following error: java.lang.ClassFormatError: GetOs java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:90) java/lang/ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ ProtectionDomain;)Ljava/lang/Class;+79 (ClassLoader.java:486) java/net/URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resourc e;)Ljava/lang/Class;+196 (URLClassLoader.java:276) java/net/URLClassLoader$1.run()Ljava/lang/Object;+42 (URLClassLoader.ja va:199) java/net/URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+ 13 (URLClassLoader.java:192) java/lang/ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+4 1 (ClassLoader.java:297) sun/misc/Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/la ng/Class;+33 (Launcher.java:286) java/lang/ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/C lass;+1 (ClassLoader.java:313) when i try to compile the source file i get: GetOs.java:3: cannot resolve symbol symbol : class String location: class GetOs public static void main (String args[]) ^ GetOs.java:5: cannot resolve symbol symbol : variable System location: class GetOs GetOs.java:5: cannot resolve symbol symbol : class out location: package System System.out.println(System.getProperty("os.name")); ^ GetOs.java:6: cannot resolve symbol symbol : variable System location: class GetOs System.exit(0); seems like a classpath problem. but where do i set the classpath systemwide? and shouldn't it be set by default after the update? and what jars must be in the classpath? sorry for the stupid questions but it looks a bit different than on simple pc.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.