Search code examples
installationspring-roo

Cannot run Spring Roo solely from Windows command line as guided in the manual


I'm new to Spring Roo and follow the manual in the downloaded package officially provided by springsource at http://projects.spring.io/spring-roo/

Though, I cannot run roo from Windows command line window. The error when I run roo from cmd window can be viewed here.

Having STS downloaded, installing Roo plugin, creating a Spring Roo Project, starting Roo console will get me there.

So, my question is, the manual is outdated/incorrect for Windows OS or I missunderstand something here?

enter image description here


Solution

  • Thanks to @jmvivo idea, we found the cause - imcompatible between Java 8 and Spring Roo 1.2.5 RELEASE. The issue is officially known and report on Spring Roo Jira here.

    So make sure your roo is running java.exe from Java 7 or lower.

    java -version

    Then you can call roo as guided.

    p.s.

    When editing %PATH% system variable, **make sure

    1. You have %JAVA_HOME pointing to JDK 7

    2. You put %JAVA_HOME%\bin on top** so that the java location you define in %JAVA_HOME% is applied.

    Otherwise C:\ProgramData\Oracle\Java\javapath, or %SystemRoot%\system32 may have higher priority to your %JAVA_HOME%

    enter image description here