Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Neo4j says I can install Neo4j via Maven by adding it to my build:


But do I need a build? If so, what should my pom.xml look like?

I tried with this:

<project xmlns="" xmlns:xsi=""

But then I end up with:

[ERROR] Unable to locate the Javac Compiler in:
[ERROR] /opt/local/java/sun6/../lib/tools.jar

I have installed sun-jdk6-6.0.26 and set JAVA_HOME to /opt/local/java/sun6.

share|improve this question
up vote 0 down vote accepted

I solved as follows:

  1. Go to directory: /opt/local/java
  2. Execute "sudo ln -s sun6/lib/"
  3. To verify execute "sudo ls -ld lib"

Now your Maven command will run without problem. Good luck!

share|improve this answer

The env var $JAVA_HOME should point to the directory containing bin, so that $JAVA_HOME/bin contains javac. (You probably worked-around a mis-configured env var that might cause other problems later -- e.g., not finding other parts of the JDK)

Verify that everything is set up correctly by running: type javac (and type java) , javac -version (and java -version). If the wrong version is found, check the path & java_home (always: PATH=$JAVA_HOME/bin:$PATH)

If using eclipse (a common misconfiguration issue), you'll have to configure your jdk via the preferences -> installed jre's (or possibly project->java build path->libraries->JRE System Library->edit->"workspace default JRE")

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.