#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    32
    Rep Power
    13

    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!
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    Is this running as an applet or an application?
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    32
    Rep Power
    13
    It's a Swing application.
  6. #4
  7. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    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?
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    32
    Rep Power
    13
    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.
  10. #6
  11. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    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.

IMN logo majestic logo threadwatch logo seochat tools logo