13 Replies Latest reply on Oct 19, 2013 8:25 PM by peter.falken

    JBDS 7 on OS X requires JDK 6

    peter.falken

      I'm currently testing JBDS 7 on a freshly installed Mac Book Pro running OS X 10.8.5 [I've also tried with Mavericks, with the same result].

      In order to install JBDS 7, you need to have java installed in order to run the command: java -jar InstallerFile_for_JBDS7.jar

      So I downloaded the JDK 7_40 from Oracle and installed it.

       

      When I wanted to run JBDS 7 I get a message stating that in order to run I must install JDK 6, at that time OS X offers to download a JDK directly from Apple and after it is installed then I'm able to run JDBS 7. This behavior is not consistent with the Windows version - If you have JDK 7 installed, you're able to lunch JDBS 7 without issues.

       

      Can you guys shed some light to what the dependencies for JDK 6 on OS X for JBDS 7 are?

      How can I make run directly on JDK 7, without having to install JDK 6.

       

      * As a side note, by installing JDK 6, you get a 32 bit version of Java - that is not present on JDK 7.

      This allows you to re-install JBDS 7 on OS X and get back the Visual Page Editor by selecting to run JBDS 7 with JDK 6 (32bit).

       

      Regards,

      Luis

        • 1. Re: JBDS 7 on OS X requires JDK 6
          maxandersen

          Welcome to the wonderful world of how Java became really hard to use when Apple decided to drop their own java distribution and let Oracle take over instead.

           

          When you run 'java' on OSX it will use the apple provided java binary and if you haven't installed the Oracle *JDK* I don't think oracle's distribution takes over.

           

          Thus be sure whatever 'java' you use is actually the java from Oracle if you want to install with Java 7.

           

          You can of course just use Apple's provided Java to run the installer and then in the installer point to the oracle jdk when the installer asks which Java version to use.

           

          p.s. The visual page editor feature in JBDS requires a 32-bit VM and Oracle's Java 7 only provide 64 bit. Thus you will loose that feature by going to Java 7 on OSX. But that is the only thing that should be affected. Mind you, that you can run JBDS with Java 6 but use Java 7 or any other VM when running whatever server you wish to use. Giving you the best of both worlds as it stands today.

          • 2. Re: JBDS 7 on OS X requires JDK 6
            peter.falken

            Max,

            I agree Java has become a bit cumbersome on OS X.

            I'm able to install JBDS fine by using JDK 7.

            But after install on the first run of JBDS 7 you get a prompt stating that this software needs a JDK 6 (and prompts for a download).

            This is something I'm trying to figure out still. Why do I need to install Apple's JDK 6 when I'm already running Oracle's JDK 7?

            It makes no sense, I'm baffled.

            • 3. Re: JBDS 7 on OS X requires JDK 6
              maxandersen

              If that happens after installation it is because you said ok in the installer to use the default Java install and for some reason the oracle install you made did not set it self up as the default java version.

              • 4. Re: JBDS 7 on OS X requires JDK 6
                peter.falken

                Max,

                At first I thought that was the case as well.

                I've re-installed both the OS ( To keep things clean ) and JDK 7, to try it out again.

                While installing JBDS 7, I used the command: /usr/libexec/java_home -V to find the Java runtimes installed on my system and only JDK7_40 was installed.

                I used the path provided by the command as the JRE to use with JBDS 7 ( This path was already selected and detected as the default path for Java by the JBDS 7 installer, I'm sure there is nothing wrong with the installer ).

                Before running the JBDS y looked inside the package file and found the INI file - the -vm option was pointing to the JDK 7_40 that the installed had detected.

                As before while trying to start JBDS the first time I get the prompt stating that this program need JDK 6 and that it would download the apple version.

                 

                I will assume that this is caused by some apple wackiness with Java.

                • 5. Re: JBDS 7 on OS X requires JDK 6
                  peter.falken

                  I was able to find out what was wrong.

                  The INI file declares a launcher.library by default on OS X when installing JBDS 7 it points to:

                  org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130521-0416

                   

                  When you upgrade to version 7.0.1 you get an updated version called:

                  org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130807-1835

                   

                  If you update to 7.0.1 and then change the INI file to use the updated launcher.library like this:

                  -startup

                  ../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

                  --launcher.library

                  ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130807-1835

                  -product

                  com.jboss.jbds.product.product

                  -showsplash

                  platform\:/base/plugins/com.jboss.jbds.product

                  --launcher.XXMaxPermSize

                  256m

                  --launcher.defaultAction

                  openFile

                  -vmargs

                  -Djboss.discovery.directory.url=https://devstudio.jboss.com/updates/7.0-development/devstudio-directory.xml

                  -Xms512m

                  -Xmx1024m

                  -Dosgi.instance.area.default=@user.home/workspace

                  -XstartOnFirstThread

                  -Dorg.eclipse.swt.internal.carbon.smallFonts

                  -Xdock:icon=../Resources/JBDevStudio.icns

                  -XX:MaxPermSize=256m

                  You can get rid of the JDK 6 dependency. Since it won't ask for a JDK 6 installation to be present.

                  Would it be possible to update the JBDS 7 installer to version 7.0.1? I got mine here:

                  https://devstudio.jboss.com/earlyaccess/7.0.0.GA.html

                  • 6. Re: JBDS 7 on OS X requires JDK 6
                    maxandersen

                    looks like a bug for sure. I've opened [JBDS-2797] .ini upgrade issue for 7.0.1 users - JBoss Issue Tracker to get this investigated.

                     

                    If you can please watch it and let us know which upgrade path you followed ?

                     

                    Was it just Installed JBDS 7.0.0.GA (all was good), then updated to 7.0.1.GA and you get the error ?

                    1 of 1 people found this helpful
                    • 7. Re: JBDS 7 on OS X requires JDK 6
                      dgolovin

                      there is another launcher jbdevstudio.app, does it work as expected after update without any additional changes? Problem is that JBoss Developer Studio.app is copy of jbdevstudio.app that was done at installation time and it doesn't get updated.

                      1 of 1 people found this helpful
                      • 8. Re: JBDS 7 on OS X requires JDK 6
                        peter.falken

                        The upgrade path was:

                        - Install JBDS 7 from scratch - result you get a prompt asking to install JDK 6.

                        ( Caused by launcher being set to: org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130521-0416)

                        * Installed JDK 6 so that I could run the App and upgrade to JBDS 7.0.1

                        - Upgraded to JBDS 7.0.1  - result you get a prompt asking to install JDK 6.

                         

                        Just as Denis stated there is another App called 'jbdevstudio.app' and I looked into the INI file from this App and there where I saw that the launcher had been upgraded to:

                        org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130807-1835

                        By the way the app 'jbdevstudio.app' works fine with out asking for the JDK 6.


                        So I removed JDK 6 manually from my OS X install and then changed the INI file to use the new launcher.

                        With the new launcher I don't get a prompt asking to install JDK 6, it works straight out of the box with JDK 7.


                        Luis

                        • 9. Re: JBDS 7 on OS X requires JDK 6
                          nickboldt

                          So to confirm:

                           

                          • jbdevstudio.app works with Oracle JDK 7 out of the box, upgrade works from 7.0.0 to 7.0.1
                          • JBoss Developer Studio.app prompts for Apple JDK 6, upgrade does not work for 7.0.0 to 7.0.1

                           

                          Is that correct?

                          • 10. Re: JBDS 7 on OS X requires JDK 6
                            peter.falken

                            After a clean install:

                            • jbdevstudio.app is not present.
                            • JBoss Developer Studio.app 7.0.0 prompts for Apple JDK 6.

                            After upgrade from 7.0.0 to 7.0.1:

                            • jbdevstudio.app is present, works with Oracle JDK 7 out of the box - INI file states that the launcher is: org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130807-1835
                            • JBoss Developer Studio.app still prompts for Apple JDK 6, upgrade does not work for 7.0.0 to 7.0.1 - - INI file states that the launcher is: org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130521-0416 ( the original launcher from the install of JBDS 7.0.0 )
                            • 11. Re: JBDS 7 on OS X requires JDK 6
                              nickboldt

                              So in other words, steps done when running the installer...

                               

                              • renaming jbdevstudio.app to JBoss Developer Studio.app & creating a symlink from the install root to the studio/*.app file,
                              • adding JVM entries to the .ini file(s)
                              • regenerating metadata (I think that's the step that updates the launcher entry in .ini file from 20130521 to 20130807)
                              • copying Contents/Info.plist to studio/*.app/Contents/Info.plist

                               

                              ... do not occur when updating, and these steps SHOULD be performed when an update is done. So we may need to look at adding more p2.inf magic into the com.jboss.jbds.all feature.

                              • 12. Re: JBDS 7 on OS X requires JDK 6
                                nickboldt

                                peter.falken can you confirm if updating from 7.0.0 to 7.0.1 causes any of your .ini files to change from this containing this default

                                 

                                -Djboss.discovery.directory.url=https://devstudio.jboss.com/updates/7.0/devstudio-directory.xml

                                 

                                to this new value?

                                 

                                -Djboss.discovery.directory.url=https://devstudio.jboss.com/updates/7.0-development/devstudio-directory.xml

                                 

                                On 64-bit linux I have not seen this behaviour (the URL doesn't change TO the 7.0-development/ site, but it may change FROM the dev site to the 7.0/ release site as per the p2.inf instructions in the com.jboss.jbds.product.feature.

                                • 13. Re: JBDS 7 on OS X requires JDK 6
                                  peter.falken

                                  Nick,

                                  I can confirm that upgrading from 7 to 7.0.1 changes -Djboss.discovery.directory.url=https://devstudio.jboss.com/updates/7.0/devstudio-directory.xml

                                  on the jbdevstudio.app but not on the JBoss Developer Studio.app

                                   

                                  Luis