Closed drnic closed 11 years ago
No problem :)
The application is dependent on Java 7, so that is probably why your build is failing. Could you please install Java 7, point your JAVA_HOME to that version and then run your build again? Apart from the Java version everything looks ok.
I will add some explanation how to set up your environment to the readme.
Ok, thanks. Now running: sudo apt-get install openjdk-7-jre
:)
Ok, java7 installed (helped by http://askubuntu.com/questions/64329/how-to-replace-openjdk-6-with-openjdk-7) but lib/tools.jar still missing.
# java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
# unset JAVA_HOME
Then
# mvn clean package
Warning: JAVA_HOME environment variable is not set.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Styx 1.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ styx ---
[INFO] Deleting file set: /root/bosh-workspace/apps/styx/target (included: [**], excluded: [])
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ styx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ styx ---
[INFO] Compiling 30 source files to /root/bosh-workspace/apps/styx/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.381s
[INFO] Finished at: Tue Aug 13 17:02:38 UTC 2013
[INFO] Final Memory: 7M/30M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project styx: Fatal error compiling: tools.jar not found: /usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
root@inception:~/bosh-workspace/apps/styx# java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
Looks like I need jdk not jre http://stackoverflow.com/questions/5730815/unable-to-locate-tools-jar
Ok, NOW I can get mvn
running. Closing.
Sorry for not knowing enough about Java :)
I have a relatively vanilla Ubuntu machine with Java 1.6.0 installed.
It looks like
java
is installed here:So I set
$JAVA_HOME
and ran Maven:The
/usr/lib/jvm/java-6-openjdk-amd64/jre/../lib/tools.jar
looks wrong; but nonetheless there isn't atools.jar
in/usr/lib/jvm/java-6-openjdk-amd64/jre/lib
either.Can you link me (or in the README) how to setup a Java env to be able to build the app? Thanks :)