• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2389
  • Last Modified:

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,
0
TerribleTonyH
Asked:
TerribleTonyH
  • 2
1 Solution
 
dpearsonCommented:
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?
Yes

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).
This sounds potentially wrong.  The JRE is the runtime for Java and generally does not include the Java compiler javac.  You usually should have this in a JDK folder, with "jdk" in its name.  If you have a JRE folder that contains a compiler it sounds like a mix of software.

In any case, the other value to look at is the PATH.  Make sure your Java bin folder is also on the Windows path ahead of any other Javas.

Doug
0
 
TerribleTonyHAuthor Commented:
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,
0
 
TerribleTonyHAuthor Commented:
Answered the question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Firewall Management 201 with Professor Wool

In this whiteboard video, Professor Wool highlights the challenges, benefits and trade-offs of utilizing zero-touch automation for security policy change management. Watch and Learn!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now