Menu

Using EHCache with JDK1.3

ops5
2004-06-10
2004-08-02
  • ops5

    ops5 - 2004-06-10

    Hi,

    In the EHCache documentation (i.e. written for release 0.5), it is said that EHCache can be used with JDK 1.3.
    I don't really understand how this is possible for two reasons :
    * EHCache uses the LinkedHashMap class that appeared in the JDK1.4
    * If I use an ehcache.jar compiled with the JDK1.4, I have the classical UnsupportedClassVersionError, when I try to execute code with the JDK1.3
    I am very concerned about using EHCache with JDK1.3, so, if someone could tell me if this is possible and how, ...
    Thanks in advance.

    Olivier

     
    • Greg Luck

      Greg Luck - 2004-07-31

      Olivier,

      Yes it does work with JDK1.3.

      As the documentation says, ehcache must be compiled with JDK1.4 or higher. One compiled the test suite will pass with JDK1.3. You can test this with ant test.

      LinkedHashMap is only in JDK1.4, so you need JDK1.4 to compile. At runtime, we attempt to load LinkedHashMap. If that fails, we use the apache library, which works with JDK1.2 and higher.

      I ran my tests on Mac OS X and did not get the UnsupportedClassVersionError you mention. I also use regularly build on Linux and did not see it there either. Can you please give me the steps to reproduce the problem.

      Regards
      Greg Luck

       
      • ops5

        ops5 - 2004-08-02

        You are definitely right, it works all right with JDK1.3.
        I messed the tests up.
        Sorry about that... and thanks for the answer !

        Cheers,

        Olivier

         

Log in to post a comment.