First time building problems

I am trying to follow the build instructions on the GitHub wiki. This is in Windows 8.1 x64. I installed JRE 8 and Ant 1.9, and cloned the repository using git clone https://github.com/processing/processing.git --depth 1.

Running ant run produces the error Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.8.0_45\lib\tools.jar and it proceeds to try to download http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jre-8u45-windows-x64.tar.gz, which I already have installed. I followed the instructions under That didn't work. I don't have anything named tools.jar, and some research indicates it is part of the JDK, not the JRE. The wiki says JRE isn't required for Windows.

Am I doing something wrong, or do I actually need the JDK? It wouldn't normally be a big deal to download the JDK, but I'm on a 30KB/s satellite connection, and every byte counts.

Answers

  • edited May 2015

    W/o JDK we've got no compiler. JRE is the VM runtime only! :-\"

  • edited May 2015 Answer ✓

    Yes, I fear the JDK is necessary to build Processing (or any Java program).

    Note that the JDK includes a JRE too.

  • Thank you for the explanation. I went ahead and downloaded the JDK (five hours later) and modified my PATH and JAVA_HOME accordingly. But when I run ant or ant run it starts downloading that same file jre-8u45.tgz. I guess this may be an ant or java problem. I'll keep looking for the solution.

    Maybe we should modify the wiki? I just saw that my original statement isn't correct - it says JDK isn't required, only JRE for Windows and Linux.

  • OK, so my information was outdated. Reading the build page, I indeed see "As of Processing 2.1, a full JDK is no longer required on Windows. Only the JRE is necessary", sorry for the misinformation. On the other hand, they also say "When building for the first time on Windows and Linux, you'll need to have an internet connection, because additional files need to be downloaded"...

    I looked at the Ant file, and saw no evidence of explicit download. So perhaps it is a mechanism of Ant itself.
    But perhaps the JDK isn't in your path.

    I have in the PATH environment variable, the path to C:\Java\jdk1.7.0_55_w32\bin (your path will be different, of course).
    And I have a JAVA_HOME environment variable set to C:\Java\jdk1.7.0_55_w32

    HTH.

  • The Wiki instructions are up to date: you don't need a JDK on Windows.

    You can ignore the warnings about tools.jar (I've just clarified that on the Wiki—it mentioned the first part but not the last part of that message).

    The build process will download its own JRE because Processing (always) uses its own version of Java. There's a special Ant task that pulls it directly from Oracle. Whatever version of Java you have installed is only used to bootstrap the build process (allowing ant to run). The javac compiler comes from the Eclipse tools, the same compiler that's used in Processing itself.

Sign In or Register to comment.