Home > Java Cannot > Java Cannot Find Tools.jar

Java Cannot Find Tools.jar

thanks –Ben Parsons Nov 6 '13 at 17:34 Thanks, I wish I could give you 2 ups! –Luke Nov 13 '13 at 23:59 | show 1 more comment up JRE does not. –duffymo Feb 19 '15 at 21:23 1 Not necessarily. share|improve this answer answered Aug 7 '14 at 12:11 Vera 1,5991428 1 This is a really useful answer. Build failed So that it was searching the tools.jar directory in the lib of the jre6 but the file was located into the the jdk directory. More about the author

It works nice. Proper solution?0Error: Unable to locate tools.jar0Installing ANT - unable to locate tools.jar Hot Network Questions What is this line of counties voting for the Democratic party in the 2016 elections? I'd expect it to be in the JDK lib directory. share|improve this answer answered Jan 25 '13 at 1:33 Zorayr 10.4k26774 Worked in my case –Rohit Mar 1 '13 at 20:53 1 not working in my case i http://stackoverflow.com/questions/5730815/unable-to-locate-tools-jar

I simply moved my JDK_path before the oracle one and the issue solved. You point it at the toplevel path where java is installed. share|improve this answer answered Aug 13 '15 at 13:15 sglahn 1625 add a comment| up vote 15 down vote I have a file called gradle.properties at the root of my project

asked 4 years ago viewed 42775 times active 2 months ago Upcoming Events 2016 Community Moderator Election ends Nov 22 Linked 1 Correct way of referencing tools.jar in a cross-platform way A story behind a weird inductor Why can issuing the same command create more output in tty than in pts/gnome-terminal? Only command windows opened after the changes will have the updated environment variables. Browse other questions tagged java ant or ask your own question.

You have already mentioned that you have installed jdk and jre. If you have both a JDK & JRE, make sure that ANT is using the JDK, you can check JAVA_HOME (environment variable), and on the commandline if you do "javac -version" I got this problem: Unable to locate tools.jar. http://stackoverflow.com/questions/2618281/ant-error-when-trying-to-build-file-cant-find-tools-jar If you have a different question, you can ask it by clicking Ask Question.

Add a System Environment Variable called JAVA_HOME with the value of JDK location. Please check that C:\Program Files\Java\Jre8" is a valid JDK install. What's the output of these commands: java -version dir %JAVA_HOME% (make sure the listing that appears is actually your Java directory) If both of those work, then I'd start hacking away So, even of you are indeed using the JDK instead of the JRE, the $JAVA_HOME has to point to the JRE.

Browse other questions tagged java or ask your own question. Invalid directory: C:Program FilesJavajdk1.8.0_65 So instead of org.gradle.java.home=C:\Program Files\Java\jdk1.8.0_65 i had to use org.gradle.java.home=C:/Program Files/Java/jdk1.8.0_65 then the build was successful Problem is that project is build with JRE instead of JDK You realize that this answer is two years old, right? –duffymo Jul 23 '13 at 12:52 4 In ubuntu: # apt-get install default-jdk and the error disappears. –Xavi Montero Feb Non-Repetitive Quine How do I deal with my current employer not respecting my decision to leave?

Expected to find it in C:\Program Files\Java\jre6\li b\tools.jar2Ant: not able to find tools.jar0Cannot find tools.jar Java CentOS0Error: Unable to locate tools.jar0“Unable to find a javac compiler” error in Ant Hot Network http://tcsmacs.net/java-cannot/java-cannot-find-symbol-swingworker.php share|improve this answer answered Feb 25 at 9:25 gudthing 1,8152926 2 the tool.jar is in %JAVA_HOME%\lib; not in bin folder. –GMsoF Jun 2 at 9:58 does this mean more hot questions question feed lang-java about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation What is a Rotary Club Word™?

Remember, the OS alternative should still refer to the JDK. Copy and paste it in your ant bin folder, then try to use the command ant -version. task debug << { configurations.compile.each { println it } } share|improve this answer answered Jul 5 '12 at 13:34 Peter Niederwieser 70.4k6158160 Yes it did made it to class click site What is this c. 1948 private plane with a sliding canopy?

That's what has the tools. The compile line in dependencies.gradle should be: compile files("${System.properties['java.home']}/../lib/tools.jar") share|improve this answer answered Jul 5 '12 at 13:47 raspayu 1,93141938 6 so, how to set java.home in idea with gradle Why were pre-election polls and forecast models so wrong about Donald Trump?

Although, the JDK installer gave me a directory structure like this: Directory of C:\Program Files\Java 05/08/2012 09:43 AM . 05/08/2012 09:43 AM .. 05/08/2012 09:46 AM jdk1.7.0_04 05/08/2012

Example: Variable Name:JAVA_HOME Variable Value: C:\Program Files\Java\jdk1.7.0_21 Close/reopen your CMD window so that the new variable takes effect before attempting to re-run the ant command. Can anyone explain to me why Make cannot find tools.jar? jk008 (john kunchandy) 2015-10-20 16:31:29 UTC #6 Well, I added a JAVA_HOME env variable and it is working!I was wrong in assuming that just adding an "org.gradle.java.home"to gradle.properties file in the Possible repercussions from assault between coworkers outside the office Example for a commutative subring of a non-commutative ring Complement of CFL is Recursive Skyrim: How to stop NPCs from picking up

Do the Leaves of Lórien brooches have any special significance or attributes? This is an example of how that issue could be fixed. Why do languages require parenthesis around expressions when used with "if" and "while"? http://tcsmacs.net/java-cannot/java-cannot-find-cached-resource-for-url.php Why did Borden do that to his wife in The Prestige?

The author kurious, use different name like when he ask to save the ant folder as --> c:\apache-ant-1.6.1 and latter when he sent the enviroment path he wrote like this --> Or do i need it? Someone peeled an American flag sticker off of my truck. Do Morpheus and his crew kill potential Ones?

Join them; it only takes a minute: Sign up Gradle does not find tools.jar up vote 42 down vote favorite 7 I am using javadoc doclets with gradle, so I need more hot questions question feed lang-java about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation up vote 39 down vote favorite 7 When I run ant it says: Unable to locate tools.jar. USA 2016 election demographic data Why usually is the word "halfway" used with "down" rather than "up"?

Soo... Polyglot Anagrams Robbers' Thread more hot questions question feed lang-java about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Ant is still trying to find tools.jar in C:\Program Files\Java\jre6\lib folder. REM set JAVA_HOME=.\..\tools\java\jre set JAVA_HOME=C:\Progra~1\Java\jdk1.6.0_37 –Sun Feb 18 '13 at 22:22 2 Michael, it sure was necessary.