Spring Tool Suite
  1. Spring Tool Suite
  2. STS-1700

Spring Roo creation process doesn't respect jdk version settings of Java Compiler

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0.RELEASE
    • Fix Version/s: 3.2.0.RELEASE
    • Component/s: ROO
    • Environment:

      OS X 10.5.8, SpringSource Tool Suite 2.6.0.RELEASE (201103161000)

      Description

      I have set my Java Compiler to jdk 1.5, the JVM 1.5.0 (OS X default) is the only jre checked at "Installed JRE's", and under "Execution Environment" the JavaSE-1.6 has no compatible JRE visible while J2SE-1.5 have the JVM 1.5.0 checked.
      Yet, when I make a new Spring Roo project STS will instruct Roo to make the project with the option "-java 6" and in the properties STS have set project specific settings to jdk 1.6.
      It works like this up until that I go into the settings and redo the same changes again (unchecking and rechecking for instance). Only then is my jdk settings respected.

      As the process to reset the project in a working form, I regard this as a major inconvenience.

        Activity

        Hide
        Martin Lippert (c) added a comment -

        Thanks for coming back to this. Closing this for now. Please reopen, if problem appears again. Thx!!!

        Show
        Martin Lippert (c) added a comment - Thanks for coming back to this. Closing this for now. Please reopen, if problem appears again. Thx!!!
        Hide
        MiB added a comment -

        Martin or Leo,

        please reopen this issue and contact me, so I can assist in finding the cause.

        I thought I was on the track of a workaround, when I made a new workspace and a new roo project again was attempted with java 6. However, after I changed the workspace encoding to utf-8 (intstead of macroman) I got 4 new roo projectß in a row with the proper java 5 command. I then suspected the workspace encoding could be related.

        So I made a new workspace again and this time left the encoding at macroman. The results were identical, with the first project being created with java 6 and the following 4 with java 5. This means I don't know the cause yet.

        So to reproduce:

        1. make a new workspace in STS 2.7.1Release
        2. create a new roo 1.1.5 project. I made mine as project "test[no]" with top level package se.test.domain.

        The first created project would exhibit this behavior with java 6 even as the compliance level is set to 1.5 in the prefs.

        If you can't reproduce, it must be something with my preferences or my java installation. It is Java HotSpot(TM) Client VM (build 1.5.0_30-161 under OS X 10.5.8 PPC running on a dual G5.

        I must say that 2.7.1Release is very spiffingly quick compared to 2.6!

        Show
        MiB added a comment - Martin or Leo, please reopen this issue and contact me, so I can assist in finding the cause. I thought I was on the track of a workaround, when I made a new workspace and a new roo project again was attempted with java 6. However, after I changed the workspace encoding to utf-8 (intstead of macroman) I got 4 new roo projectß in a row with the proper java 5 command. I then suspected the workspace encoding could be related. So I made a new workspace again and this time left the encoding at macroman. The results were identical, with the first project being created with java 6 and the following 4 with java 5. This means I don't know the cause yet. So to reproduce: 1. make a new workspace in STS 2.7.1Release 2. create a new roo 1.1.5 project. I made mine as project "test [no] " with top level package se.test.domain. The first created project would exhibit this behavior with java 6 even as the compliance level is set to 1.5 in the prefs. If you can't reproduce, it must be something with my preferences or my java installation. It is Java HotSpot(TM) Client VM (build 1.5.0_30-161 under OS X 10.5.8 PPC running on a dual G5. I must say that 2.7.1Release is very spiffingly quick compared to 2.6!
        Hide
        MiB added a comment -

        BTW Guerry and others,

        in order to fix a a new roo project that erroneously have been made with java 6:
        1. Go into the project properties
        2. Select "Java Build Path"-> Libraries and edit the JRE System Library, which would have been set to "JavaSE-1.6(unbound)". Select Workspace default if "JVM 1.5.0" is what you have set in your preferences.
        3. Go to "Java Compiler" and make sure "enable project specific settings" is unchecked, if you have compliance set to jdk 1.5 in your preferences. If not, set project specific preferences to jdk 1.5 or change your preferences.

        This will repeatedly fix my projects in STS 2.7.1Release.

        Show
        MiB added a comment - BTW Guerry and others, in order to fix a a new roo project that erroneously have been made with java 6: 1. Go into the project properties 2. Select "Java Build Path"-> Libraries and edit the JRE System Library, which would have been set to "JavaSE-1.6(unbound)". Select Workspace default if "JVM 1.5.0" is what you have set in your preferences. 3. Go to "Java Compiler" and make sure "enable project specific settings" is unchecked, if you have compliance set to jdk 1.5 in your preferences. If not, set project specific preferences to jdk 1.5 or change your preferences. This will repeatedly fix my projects in STS 2.7.1Release.
        Hide
        Martin Lippert (c) added a comment -

        Reopening since the issue occurred again. Hope we can find a way to reproduce this reliably to track this down.

        Show
        Martin Lippert (c) added a comment - Reopening since the issue occurred again. Hope we can find a way to reproduce this reliably to track this down.
        Hide
        Leo Dos Santos (c) added a comment -

        Updated the Roo integration to allow for Java 7 configurations. Since we haven't seen any reports of misconfiguration since STS 2.7.1, I'm going to mark this closed.

        https://github.com/SpringSource/spring-ide/commit/3316aef6eb7e70e754878214791f0a5ad3158c2c

        Show
        Leo Dos Santos (c) added a comment - Updated the Roo integration to allow for Java 7 configurations. Since we haven't seen any reports of misconfiguration since STS 2.7.1, I'm going to mark this closed. https://github.com/SpringSource/spring-ide/commit/3316aef6eb7e70e754878214791f0a5ad3158c2c

          People

          • Assignee:
            Leo Dos Santos (c)
            Reporter:
            MiB
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: