Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-13595

Fix problem with java 1.7 on Mac when using org.jboss.tools.ui.bot.ext

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 4.1.0.Alpha2
    • 4.1.0.Alpha1
    • qa
    • None

      I hope you don't mind assigning this to you. I might as well give it a try myself - let's talk about it.

      Running any bot.ext based test on Mac with java 1.7 fails with this:

      No java with required location /Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/jre is defined
      

      See e.g. https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/JBossTools/view/JBossTools_Trunk/job/jbosstools-integration-tests.aggregate_master/48/consoleText

      This happens because MacSpecifics.java contains a hack where it tries to set the default java to the one used to run the test. System property java.home is used to look up the item to be checked in the Installed JREs page in Eclipse Preferences. For some reason the java.home contains a path such as /Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/jre (note the jre at the end) whereas the path in the list is /Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home (without trailing jre) thus the search fails and the test fails as well.

      So the solution is to tweak this search so that it accounts for this anomaly.

      Note that in order to take advantage of this fix it needs to get to the integration tests update site [1] (unless you want to build bot ext manually before running your test) and the jenkins job [2] is currently blocked by JBIDE-13594

      [1] http://download.jboss.org/jbosstools/updates/nightly/integrationtests/trunk/
      [2] https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/JBossTools/view/JBossTools_Trunk/job/jbosstools-integration-tests.aggregate_master/

            sbunciak-rh Stefan Bunciak
            exd-mmalina Martin Malina
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: