Missing tools.jar when launching STS application

后端 未结 12 2080
我在风中等你
我在风中等你 2020-12-08 14:29

I have the latest STS4. I am using installed java-1.8 JDK not embedded as the execution environment. My project just runs fine without any issue.

Ho

相关标签:
12条回答
  • 2020-12-08 14:41

    Copy JDK directory to your STS installation or extraction library and and rename JDK to jre. the directory structure of STS should look like this

    .eclipseproduct
    artifacts.xml
    configuration
    dropins
    eclipsec.exe
    features
    jre
    license.txt
    META-INF
    open-source-licenses.txt
    p2
    plugins
    readme
    SpringToolSuite4.exe
    SpringToolSuite4.ini
    
    0 讨论(0)
  • 2020-12-08 14:51

    I had the same issue when i upgraded to Java 11.

    I simply edited SpringToolSuite4.ini and added

    -vm C:\Program Files\Java\jdk-11.0.4\bin\javaw.exe

    0 讨论(0)
  • 2020-12-08 14:56

    The fix is in the -vm parameter. the order and the absolute path of the javaw.exe seems to be the issue.

    the readme file mentions _ "To run Eclipse with an alternate Java runtime environment, the path to the Java virtual machine's binary must be identified. With an Eclipse installation from the distribution, altering the $PATH variable to include the path to the alternate Java runtime environment is often not enough as the Eclipse that Linux distributions package often performs a scan internally to pick up GCJ by itself whilst ignoring what's on the $PATH."

    So I have edited now the SpringToolSuite4.ini and made this entry

      -vm
     C:\UserTemp\Softwares\java\jdk\oracle-jdk-1.8-64bit\bin\javaw.exe
    

    Restarted my STS and it works perfect.

    The reference to set the JVM Specifying the JVM was very useful in understanding this.

    0 讨论(0)
  • 2020-12-08 14:56

    Don't spend too much time looking for tools.jar. If you get an error like that, don't be upset.

    If you already have java JDK1.8, go to its lib folder, tools.jar should be available there. Copy and paste the same in JRE1.8 lib folder.

    0 讨论(0)
  • 2020-12-08 14:56

    SOLUTION :

    Check your Path JAVA_HOME - system property "Environment Variables"

    for example: JAVA_HOME:

    C:\Program Files\Java\jdk-12.0.1\lib

    usually you only need add \lib at JAVA_HOME

    0 讨论(0)
  • 2020-12-08 14:57

    In my case I had installed jre, and not jdk!

    Observe that you have jdk installed!

    0 讨论(0)
提交回复
热议问题