Announcement Announcement Module
Collapse
No announcement yet.
Maven Integration error on STS launch Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maven Integration error on STS launch

    Hi,

    I'm trying out STS for the first time (Version: 2.2.1.200910210131-RELEASE) and am receiving the following errors in a window and the console respectively on boot:

    The Maven Integration requires that Eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK.

    Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JREs are also using JDK installs.
    ...

    11/27/09 10:13:59 PM CST: [INFO] User settings file does not exist C:\Documents and Settings\Owner\.m2\settings.xml
    11/27/09 10:14:00 PM CST: Eclipse is running in a JRE, but a JDK is required
    Some Maven plugins may not work when importing projects or updating source folders.
    11/27/09 10:14:02 PM CST: [INFO] User settings file does not exist C:\Documents and Settings\Owner\.m2\settings.xml
    11/27/09 10:14:04 PM CST: Updating index http://repo1.maven.org/maven2/
    11/27/09 10:14:05 PM CST: Downloading central : nexus-maven-repository-index.properties
    11/27/09 10:14:05 PM CST: Downloaded [central] -> http://repo1.maven.org/maven2/.index...dex.properties
    11/27/09 10:14:05 PM CST: Updated index for http://repo1.maven.org/maven2/ Sat Nov 21 03:27:52 CST 2009
    As there is no eclipse.ini file in this install that I can find, I have attempted to edit the STS.ini file assuming it is the equivilent by adding the following lines:

    Code:
    -vm
    C:\shop\Java\jdk1.6.0_17\bin
    But when I do this I recieve some other errors when trying to open the "Server" view. I will specify these errors if asked but I'm guessing that adding the -vm option is not the preferred approach as STS should probably be running in a JDK which it specifies on its own.

    Please advise.

    Thanks.

  • #2
    Hello Proleptic,
    I am new to STS too.
    But I workaround the issue by sourcing JAVA_HOME variable to JDK before running STS.

    On MS-Windows platform, I copy this simple batch file to %JDK%\bin to do the job.
    Code:
    @echo on
    set CUR_DIR=%cd%
    cd /d "%~dp0.."
    set JAVA_HOME=%cd%
    cd /d "%CUR_DIR%"
    
    set PATH=%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%PATH%
    
    color 0F
    title JDK1.6.0_18
    Running this batch file; then STS.exe in the same shell solves my problem.

    Comment


    • #3
      I believe you just need to slightly modify what you added to sts.ini. You should add the full path to javaw.exe, so just add
      \javaw.exe
      after C:\shop\Java\jdk1.6.0_17\bin

      Comment

      Working...
      X