0

I'm following along with the Udacity lesson on creating our first jar file. It says to apply the plugin and simply run 'gradle jar'.

 /* Solution: */ apply plugin: 'java' // 1. Apply the Java plugin to the project //2. Simply run `gradle jar` 

however I'm getting an error:

$ gradle jar > Task :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Could not find tools.jar. Please check that C:\Program Files (x86)\Java\jre1.8.0_161 contains a valid JDK installation. 

I have created an environmental variable JAVA_HOME and added the value C:\Program Files\Java\jdk-12.0.1 suggested here.

I've also gone into the project structure, JDK location, and changed that to C:\Program Files\Java\jdk-12.0.1.

Neither has worked... how do I proceed with this lesson and creating a jar file?

3

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.