Results 1 to 5 of 5
  1. #1
    Jaws's Avatar
    Jaws is offline Member
    Join Date
    May 2015
    Posts
    3
    Rep Power
    0

    Default "Perhaps JAVA_HOME does not point to the JDK"?

    I'm currently following [Moderator edit: link removed] in an attempt to add an NPC into Minecraft Forge. I have installed SDK7 and set the PATH address to "C:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files\Java\jre7\bin" at the beginning of the PATH field. When I open a CMD to my SourceForge folder and enter "gradlew setupDecompWorkspace --refresh-dependencies", I get this error message:

    "Perhaps JAVA_HOME does not point to the JDK"?-buildfailed.png

    I figured I need to point my installation toward JDK7, so I created a new system variable called JAVA_HOME with the variable value "C:\Program Files\Java\jdk1.7.0_79", but when I run the command again, the build still fails.

    I've been trying to figure this out for hours, but I've hit a wall. Help would be greatly appreciated.
    Last edited by DarrylBurke; 05-06-2015 at 10:22 PM. Reason: Removed irrelevant link

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: "Perhaps JAVA_HOME does not point to the JDK"?

    I don't know what or where you've been changing things, but the JAVA_HOME on your system is clearly set to a Java 8 runtime and not to a Java 7 JDK. You can verify that yourself by invoking

    Java Code:
    echo %JAVA_HOME%
    on the command prompt.

    Where exactly have you created the system variable? User variables? System variables? Very likely you have two JAVA_HOME variables now because on exists in both.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    Jaws's Avatar
    Jaws is offline Member
    Join Date
    May 2015
    Posts
    3
    Rep Power
    0

    Default Re: "Perhaps JAVA_HOME does not point to the JDK"?

    Quote Originally Posted by gimbal2 View Post
    I don't know what or where you've been changing things, but the JAVA_HOME on your system is clearly set to a Java 8 runtime and not to a Java 7 JDK. You can verify that yourself by invoking

    Java Code:
    echo %JAVA_HOME%
    on the command prompt.

    Where exactly have you created the system variable? User variables? System variables? Very likely you have two JAVA_HOME variables now because on exists in both.
    I created the system variable in Computer>Properties>Advanced System Settings> Environment Variables. I thought I had JDK7 installed alongside 8, but I guess those are just old files sitting in the Java folder. Not sure.
    Last edited by Jaws; 05-07-2015 at 04:35 AM.

  4. #4
    Jaws's Avatar
    Jaws is offline Member
    Join Date
    May 2015
    Posts
    3
    Rep Power
    0

    Default Re: "Perhaps JAVA_HOME does not point to the JDK"?

    Update: I uninstalled Java 8 so it would default back to 7 and the build was successful. I'm sure there was a better way, but hey, it worked.

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: "Perhaps JAVA_HOME does not point to the JDK"?

    Quote Originally Posted by Jaws View Post
    I created the system variable in Computer>Properties>Advanced System Settings> Environment Variables. I thought I had JDK7 installed alongside 8, but I guess those are just old files sitting in the Java folder. Not sure.
    Yes but that will show you two types of system variables; user (only for you) and system (for everyone). Likely there was a JAVA_HOME variable already pointing to Java 8 and you just added a second one.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 1
    Last Post: 07-17-2014, 06:37 PM
  2. Replies: 0
    Last Post: 12-07-2012, 08:29 AM
  3. Replies: 3
    Last Post: 10-30-2012, 03:06 PM
  4. Replies: 1
    Last Post: 02-01-2012, 08:37 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •