10 Replies Latest reply: May 18, 2012 11:14 AM by jsmith RSS

    Mac OS X Lion and Java 7u4

    csh
      Hi,

      I just bought Mac OS X Lion for the single reason to use Java FX 2.1.
      No Java preinstalled.

      Then I downloaded and installed jdk-7u4-macosx-x64.dmg.

      The I had the folder: /Library/Java which included JDK 1.7.

      I tried to start IntelliJ 11. But it complains about that no Java Runtime is installed.
      Then I started the 1.7.0.jdk file and it complained, too, that I'd need a JRE.

      What the heck?

      I followed the dialog and it downloaded an JRE, but it was JRE 1.6.0_31-b04-415-11M3646

      I also noticed, that I have two folders:

      /System/Library/Java
      /Library/Java

      The former is for 1.6, the latter 1.7.

      I am very confused! Can somebody help?
        • 1. Re: Mac OS X Lion and Java 7u4
          csh
          Ok, I just ignore the fact, that I need JRE 1.6 in addition.

          IntelliJ runs now and I specified JDK 1.7 for my project.

          The problem is, that all javafx imports aren't found.

          I only have the JDK in the classpath. I can't find a jfxrt.jar anymore (as there were in the beta previews).

          However, the JDK includes some JavaFX jars, e.g. javafx-mx.jar.
          What am I missing?
          • 2. Re: Mac OS X Lion and Java 7u4
            626589
            I am in the same boat as you are! Just installed JDK 7u4 on my MacBook Pro with Eclipse 3.7.2. I used e(fx)clipse plugin for all my JavaFX development which need to be configured with JavaFX SDK home path. I used /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home. However, e(fx)clipse won't take this path. I opened a terminal and verified that /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home do exist and JavaFX library jfrt.jar is under jre/lib directory. However, if you open the same path in Finder, it doesn't exist. Actually 1.7.0.jdk is a packaged file (such as a tar or zip file) not a folder structure. For now, I found that only Netbeans 7.1.2 are working properly with JavaFX.
            • 3. Re: Mac OS X Lion and Java 7u4
              933767
              IntelliJ 11 uses Apple's bundled Java application support. Bundled OS X Java applications built with Apple's tools require Apple's JDK 6 and cannot use Oracle's JDK. So, to run IntelliJ itself you need to install an Apple JDK first.

              You now have two JDKs on your system: the Java 7 JDK from Oracle in /Library/Java/JavaVirtualMachines, and Java 6u31 from Apple in /System/Library/Java/JavaVirtualMachines. You can certainly use JDK 7 to run the code you are developing in IDEA, but not IDEA itself right now. IDEA will need to update their product to stop using Apple's deprecated technologies.

              This is all correct behavior, but I do think the wording of the alert you get when you need to install an Apple JDK is confusing. We'll let Apple know.

              -- Scott K.
              • 4. Re: Mac OS X Lion and Java 7u4
                csh
                Ok, I got it working now in IntelliJ 10.5.

                I added as JDK path:

                /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home

                And then I needed to manually add all the jars I found in
                /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib

                One question though:
                If I run my apps, in the system menu bar of Mac OS X is always one entry named "java". I got it during beta already, but thought it would go away with the GA version. Is that normal? Can I hide that?
                • 5. Re: Mac OS X Lion and Java 7u4
                  933880
                  >

                  I just bought Mac OS X Lion for the single reason to use Java FX 2.1.
                  No Java preinstalled.

                  Then I downloaded and installed jdk-7u4-macosx-x64.dmg.

                  The I had the folder: /Library/Java which included JDK 1.7.

                  I tried to start IntelliJ 11. But it complains about that no Java Runtime is installed.
                  Then I started the 1.7.0.jdk file and it complained, too, that I'd need a JRE.
                  I believe the docs explicitly say that Java 7u4 for OS X does not yet support Java FX.
                  • 6. Re: Mac OS X Lion and Java 7u4
                    933884
                    murrayeisenberg wrote:
                    I believe the docs explicitly say that Java 7u4 for OS X does not yet support Java FX.
                    Not so:

                    The JavaFX 2.1 SDK for Mac is installed as part of JDK 7 update 4 for Mac. (http://docs.oracle.com/javafx/2/installation_2-1/javafx-installation-mac.htm#BABCCHID)
                    • 7. Re: Mac OS X Lion and Java 7u4
                      csh
                      >
                      One question though:
                      If I run my apps, in the system menu bar of Mac OS X is always one entry named "java". I got it during beta already, but thought it would go away with the GA version. Is that normal? Can I hide that?
                      >

                      Does anybody has an answer?
                      • 8. Re: Mac OS X Lion and Java 7u4
                        866711
                        What is the contents of the JDK install. Does it come with the complete JavaFX SDK including JavaDocs (also needed for working autocompletion), the ant-tasks for packageing. Why can't you simply use download the JavaFX 2.1 SDK and point e(fx)clipse to it?
                        • 9. Re: Mac OS X Lion and Java 7u4
                          808749
                          I found that when I stopped trying to get IDEA to use a 'JavaFX SDK' and the 'javafx' project facet and just used the JDK 1.7 for Mac that it worked fine. I could not get the Java FX SDK added correctly which is fine for me at the moment.
                          • 10. Re: Mac OS X Lion and Java 7u4
                            jsmith
                            <accidental post deleted>