Hello, I'm teaching image processing and have been using an application which worked fine with JDK 1.1.8. Now everybody has the 1.2.2 version. Is there a way to run the application (I only have the java code partially, the main method was supplied by the developer who suddenly wants 1000 US$ for the new version) under the new 1.2.2 Version or do I have to give it up? Thanx to whoever!
Hi Rahul, thank you for your reply. The application has the name JAVALAB.class and I get the following messages. (sounds like the death sentence for my application!) Thanks again! Angelika Here is the DOS-Prompt: __ Exception in thread "main" java.lang.ClassFormatError: javalab (Invalid pc in line number table) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:442) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:101) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$1(URLClassLoader.java:216) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:191) at java.lang.ClassLoader.loadClass(ClassLoader.java:290) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) __
hi Angelika, The defination of ClassFormatError is as follows public class ClassFormatError extends LinkageError Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. does u r program still work with the earlier version. If not copy the files again and try working with the earlier version and then test out with the newer version. I say again there should be no backward compatibility problems so the problem is somewhere else.
Hi Rahul, Thanx for your reply. JAVALAB is working just fine with JDK 1.1.8 and always has. With the JDK 1.1.8. I have been launching JAVALAB in the MSDOS Window with java -mx8000000 -classpath "e:\javalab\system\classes;d:\programme\jdk1.1.8\lib\classes.zip" javalab Of course I put an Icon on my desktop, but this ist essentially the call, - e:\javalab\system\classes being the directory with my own classes and d:\programme\jdk1.1.8\lib\classes.zip being the directory of JDK's classes. Maybe cou could tell me the correct call in JDK 1.2.2 - that might help already. I do not find annything like classes.zip with JDK 1.2.2, and I am kind of a bloody beginner. I was in the directory with Javalab.class and started it with java -mx8000000 -classpath "." javalab. Then I got all the exceptions. Was that wrong?
Also, I cannot recompile the whole thing, because for the main method I do not have the Java code. Sigh! ;-)) It's (was?) a great program. It'd be great if you had some ideas! Thanks a lot. Angelika
hi, if the program is small can u send it over at email@example.com i will try my best to help u out. if check out what is classpath and how to set it in the autoexec.bat in either the beginner, intermediate advanced and programmer certification forum Rahul.
Good luck with this. My guess is that it has been run through a "code obfuscator" which mucks around with the class files to make them very hard to "decompile". The problem with these is that they are very JVM-version-dependent, and can appear as malformed classes to another JVM. Try running a decompiler over the suspect classes using the JVM that works. If it can read the class files and generate sensible output, you should be able to recompile using a new version. If it can't read the class files they have probably been deliberately broken.
Hi Rahul Think your server didn't like me. It sent javalab back making mean remarks like: >The original message was received at Fri, 9 Jun 2000 19:15:41 +0200 >from h17-25.rz.fh-offenburg.de [184.108.40.206] > > ----- The following addresses had permanent fatal errors ----- ><firstname.lastname@example.org> > > ----- Transcript of session follows ----- >... while talking to mta9-mail.mailcity.com.: >>>> DATA ><<< 554 [SMTPD]: Requested mail action aborted: exceeded storage allocation >554 <email@example.com>... Service unavailable
Hi, Rahul, I just did it. I created a new folder private\javalab and there it is. Thank you! To test it, you can throw out everything from the menu except the input_output item with the subitems (you find the menu in javalab\system\startup\menubar.rc), since I can rewrite all these programs for JDK 1.2.2. But don't let it ruin your day! If it won't work I'll have to think of something else! Angelika