Unable to locate tools.jar

I am building a project in Java. I have this error: Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar I have installed a JDK and the folder: C:\Program Files\Java\jre6\lib is in my system but the file tools.jar is not there. 34 Answers 34 Yes, you’ve downloaded and installed the Java Runtime Environment … Read more

NoClassDefFoundError – Eclipse and Android

I’m having a problem trying to run an Android app which, up until adding a second external library to its build path, was working fine. Since having added the scoreninja jar, I now get a NoClassDefFoundError when I try to run the app. Here’s the message: 02-11 21:45:26.154: ERROR/AndroidRuntime(3654): java.lang.NoClassDefFoundError: com.scoreninja.adapter.ScoreNinjaAdapter As all of the … Read more

Why use Gradle instead of Ant or Maven? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Problems with setting the classpath in ant

I think the problem is with your classpath path declaration. The build directory should be a <pathelement> <path id=”classpath”> <fileset dir=”${lib}”> <include name=”**/*.jar” /> </fileset> <pathelement location=”${build}” /> </path> Also, I would only include 3-rd party jars in your classpath refid. So the whole block looks like. <path id=”3rd-party-classpath”> <fileset dir=”${lib}”> <include name=”**/*.jar” /> </fileset> </path> <target name=”build”> <javac srcdir=”${src}” destdir=”${build}”> <classpath … Read more

what is this ANT build?

I had the exact same problem, where when I clicked “Run” I would get a menu with options of “Ant Build” or “Ant Build…” — even though I had a main method. I finally got my program to run as normal when I copied and pasted my code into a new file in a new … Read more