• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JDK 1.1.8 and 1.2.2 --- Heelp!

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i think u should have no problem running the program with the later version. do u have any specific problem like the program is not working?. if so what are the messages it is giving.
Rahul
 
Angelika Ferron
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
__
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Rahul.

 
Angelika Ferron
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
if the program is small can u send it over at rahul_mkar@mailcity.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.
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Angelika Ferron
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Rahul,
it has 1.6 MByte zipped. Think you can take it?
Hi, Frank,
This might be. I have only written a few programs for it, and they have been inserted via a menu.rc file
Thanks to everybody!
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i can take it i have abundant space in my mail box. please send it over.
Rahul.
 
Angelika Ferron
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rahul,
I've sent Javalab.zip a minute ago.
Thank you very much!
Angelika
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Angelika and Rahul
Can u guys pls keep us posted if you make any progress on it. I'm a java beginner and this seems to be a good practical problem.
 
Angelika Ferron
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Harry,
I'll stay posted. I just don't think that you'll get much out of it, since that software seems to be a peculiar peace of art!

Angelika
 
Angelika Ferron
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 [141.79.17.25]
>
> ----- The following addresses had permanent fatal errors -----
><rahul_mkar@mailcity.com>
>
> ----- Transcript of session follows -----
>... while talking to mta9-mail.mailcity.com.:
>>>> DATA
><<< 554 [SMTPD]: Requested mail action aborted: exceeded storage allocation
>554 <rahul_mkar@mailcity.com>... Service unavailable
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi goto xdrive.com and type in javacert as the login id and javacert as the password. upload u r file here and then i will download it from here.

Rahul.
 
Angelika Ferron
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic