Announcement Announcement Module
No announcement yet.
Specific version of jdk for Mac OS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Specific version of jdk for Mac OS


    I'm a Java Developer and currently I've a Macbook Pro at work.
    Until now, I don't had any problem during the development but now I need to release a product using Maven and I need specifics versions of JDK (32bits) installed.

    We have products that needs jdk 1.4, 1.5 and 1.6.

    There is a simple way for resolve this problem or I need to find the older versions of jdk 1.4 and 1.5 of Leopard and change the links on /Systems/Library/... ?

    Thanks in advance!

  • #2

    As far as I know you can download the JDK package for Snow Leopard (if you are running 10.6 on your machine) from Apples Developer area. That contains the latest 1.6 JDK which includes 64bit and 32bit VMs.

    I am not sure how you can install later JDKs on 10.6, but I remember vaguely that I've found some articles on that via Google search. But since the JDKs are backwards compatible, you should be able to run a 1.4-based system on a 1.6 VM. And from Eclipse you can set the compiler level to 1.4, for example, to make sure the compiler produces 1.4-compatible .class-Files.



    • #3
      Hi Martin,

      I'm sorry for my late reply!

      My problem is related to an extension of the DataSource interface. With JDK 1.6, the code doesn't compile because these interface has 2 new methods (isWrapperFor and unWrap).

      I could implement the 2 new methods but I just like to know if there is other solution.


      • #4

        I think there are solutions for installing older JDKs on Mac, but they aren't trivial as far as I know. I would implement those two methods and set the compiler target to 1.4 or 1.5, whatever you need.



        • #5
          Hi Martin

          I found some tutorials for installing the jdk 1.5 on snow leopard but as you already said, they aren't trivial.

          I implemented the two methods and now I don't have any problem.

          Just one more question.. How can I know if the builds are being done for 64 bits or 32 bits. Until now, I didn't have any problem related with this, but should I'm concern about it?



          • #6
            I don't know exactly what you mean with the 64bit or 32bit builds? To what kind of build are you referring to? As long as you are just compiling and shipping pure Java code, you don't need to worry about 32bit vs. 64bit. The JVM itself is a 32bit or 64bit one an can therefore deal with different heap sizes, or if you have native code as part of your project, you should take care to compile that for the right bit number, but for pure Java, you don't need to care.



            • #7
              Thanks for your help Martin,

              I just asked you about it, because when we look to STS, for example, we have the version for 32 and 64 bits and if we try to run the 64 bits version with a 32 bits jdk it doesn't start.


              • #8
                Right, thats because STS ships with SWT, a native widget library from Eclipse, and that needs to be the right one for your JVM.
                (and maybe some other native parts from Eclipse)