Where to get the tools.jar to use with the Java 8 jdk early release

后端 未结 13 1335
终归单人心
终归单人心 2020-12-31 09:32

Where to get tools.jar for Java 8 JDK early release? Without it, my Java 1.8 Maven pom based projects in Netbeans will not compile.

The Java 8 early release is set in

相关标签:
13条回答
  • 2020-12-31 09:45

    Answer on the behalf of OP:

    This version is missing tools.jar: jdk-8-ea-bin-b106-windows-i586-05_sep_2013.exe

    It is now in the most recent release.

    0 讨论(0)
  • 2020-12-31 09:47

    I was using Hadoop-Common-2.7.2 as a dependency, When I add exclusions in my POM.xml, my issue got resolved.

    <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-common</artifactId>
            <version>2.7.2</version>
            <exclusions>
                    <exclusion>
                    <groupId>jdk.tools</groupId>
                    <artifactId>jdk.tools</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    
    0 讨论(0)
  • 2020-12-31 09:47

    When I looked at Eclipse > Window > preference > Java > Installed JRE > it was pointing to JRE, which seems obvious, but when I changed the pointing to JDK the compile error was resolved since there was tools.jar now in JDK.

    Before this I had tried copying tools.jar from jdk/lib to jre/lib, but that did not solve the issue.

    0 讨论(0)
  • 2020-12-31 09:50

    The error only appears when I hadn't installed the JDK in its default directory.

    Install it on the default directory to resolve the problem.

    Source.

    0 讨论(0)
  • 2020-12-31 09:51

    tools.jar was removed in Java 9. https://docs.oracle.com/javase/9/migrate/toc.htm#GUID-12237744-E23B-42F8-8892-26BA1BDD63F2

    0 讨论(0)
  • 2020-12-31 09:58

    The solution is to update the eclpise.ini, If no JDK is used for Eclipse, change it:

    • Quit Eclipse if it is running
    • Go to the Eclipse installation directory and open the file eclipse.ini in a text editor.
    • Search for the line -vmargs
    • Before the line -vmargs, add two lines:
    • On the first line, write -vm
    • On the second line, write the path to your JDK installation (usually something like: C:\Program Files\Java\jdk1.6.0_31\bin\javaw.exe on Windows)*

    Solution also documented here

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