Using packages from Java2 in JDK 1.1.8
I'm in the unfortunate situation of porting an application which utilizes the Java2 API to JDK 1.1.8. Missing are several classes like most of them in the java.util package.
I'm wondering if it is viable to extract the source from a Java2 JDK (say 1.4.1) and compile the classes, then jar them and add them to the CLASSPATH when running with the 1.1.8 JRE. I've had success porting Swing, but the java.* packages are a little trickier because dependencies force me to have to port over a large number of classes.
I'm also aware that the rt.jar file contains the classes that I'd need, so is it theoretically correct that if I put it in the classpath when compiling with JDK 1.1.8, it'd work?
Is this the way to go? Are there any caveats?
Thanks for any advice!
Is this running as an applet or an application?
It's a Swing application.
And for some reason installing the later jvm is not available to you on this machine? You make it sound as if the later jvm IS installed since you have the rt.jar available to be included in the classpath, so I don't understand why you don't just start the jvm using the java.exe that is in the later jre directory. It does not matter which jvm is the default jvm, you can have multiple jvm's installed and run programs with various editions.
I have a program I use at work from a vendor that has a 1.4 directory that is installed inside the programs directory. They do not install 1.4 when I install the program, they merely use it when running their program. This make sense?
Yes a later JVM (in fact mulitiple versions of JDKs - 1.3.1, 1.4.1, are installed) is available on the machine. However, that is not the target machine. The application is to be ported to a target device, a Pocket PC, with only PersonalJava support which is essentially JDK 1.1.8.
ic. Well, I have done no work using java on the pocket pc, so I will be of little help. However, I know others here have done some. Hopefully one of them can be of some help.