Link to home
Start Free TrialLog in
Avatar of TerribleTonyH
TerribleTonyH

asked on

Where is my Java compiler located

Hi,

I'm trying to compile a quickstart in JBoss developer studio running of an JBoss EAP server locally installed in windows.  HelloWorld quickstart worked I then tried one which has no interface but included an arquillian test.  I ran the project as a Maven build, the message I got back in the studio console is:

  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project jboss-bean-validation: Compilation failure
Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre1.8.0_45\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
-> [Help 1]

First off, what do the 2 dots mean in the path for the java path? Does it mean that from jre.1.8.0_45 you go up a level and then move to the lib folder and use the tools.jar?

I wonder what got set to come up with that?  I have  $JAVA_HOME set to  C:\Program Files\Java\jre1.8.0_31 and javac is located in the bin folder underneath this (messing with this doesn't let the JBoss developer studio fire up).

I do have the following C:\Program Files\Java\jre1.8.0_45\ but I can't find a javac.exe file in the bin folder here, (lots of other similar-sounding files).

How can I found out what has sent Maven to this location to look for the java compiler?

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of dpearson
dpearson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TerribleTonyH
TerribleTonyH

ASKER

My mistake it is actually C:\Program Files\Java\jdk1.8.0_31 and not jre.  The other folder is C:\Program Files\Java\jre1.8.0_45

Looking around the developer studio, I've found a templates area in Maven which has tools.jar set to the following:

$${java.home}/../lib/tools.jar

This could mean that Maven is taking java.home to mean the runtime location, but I've no idea where.  

Time to read a selection of manuals :-(

Thanks,
Answered the question.