You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Anders Hammar (JIRA)" <ji...@codehaus.org> on 2014/04/02 17:05:00 UTC

[jira] (MCOMPILER-104) JAVA_HOME pointing to JDK but /usr/lib/java/../lib/tools.jar being used

    [ https://jira.codehaus.org/browse/MCOMPILER-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=344029#comment-344029 ] 

Anders Hammar commented on MCOMPILER-104:
-----------------------------------------

Is this a problem with plugin v3.0+? If not it should be closed.

> JAVA_HOME pointing to JDK but  /usr/lib/java/../lib/tools.jar being used 
> -------------------------------------------------------------------------
>
>                 Key: MCOMPILER-104
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-104
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: Linux sombriks 2.6.24.5-smp #2 SMP Wed Apr 30 13:41:38 CDT 2008 i686 Intel(R) Core(TM)2 Duo CPU     E4500  @ 2.20GHz GenuineIntel GNU/Linux
> java version "1.6.0_10"
> Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
> Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
>  echo $JAVA_HOME
> /usr/lib/java
> which javac
> /usr/lib/java/bin/javac
>            Reporter: sombriks
>
> using command line or netbeans plugin it's happening:
> leonardo@sombriks:~/NetBeansProjects/arena/arena-client$ mvn compile
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Arena PUJ Client (jar)
> [INFO]    task-segment: [compile]
> [INFO] ------------------------------------------------------------------------
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (ISO-8859-1 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 1 source file to /home/leonardo/NetBeansProjects/arena/arena-client/target/classes
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Compilation failure
> Unable to locate the Javac Compiler in:
>   /usr/lib/java/../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.
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Wed Aug 19 11:10:59 BRT 2009
> [INFO] Final Memory: 9M/65M
> [INFO] ------------------------------------------------------------------------
> leonardo@sombriks:~/NetBeansProjects/arena/arena-client$



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)