[ http://jira.codehaus.org/browse/MCOMPILER-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=189296#action_189296 ]
sombriks commented on MCOMPILER-104: ------------------------------------ here's some realing info: i had both jre and jdk installed. since slackware ships not only jre but also a small script to properly configure environment variables installing jdk (which have the same feature) added a second java entry; basically i had something like "/usr/lib/jdk/bin:/usr/lib/jre/bin" on my PATH. Plus that, my JAVA_HOME (created by both packages) was pointing to /usr/lib/jdk so, my best guess is that maven uses java executable location to figure where is javac OR the last package installed was jre, which borked my symlink. so don't worry guys, its seems ok, not really a but, just a very bad configured environment. if applicable you could just for sanity reasons try to ficgure if java and javac will be in the same jdk; if not raise some warning or whatever. > JAVA_HOME pointing to JDK but /usr/lib/java/../lib/tools.jar being used > ------------------------------------------------------------------------- > > Key: MCOMPILER-104 > URL: http://jira.codehaus.org/browse/MCOMPILER-104 > Project: Maven 2.x 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: > leona...@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] > ------------------------------------------------------------------------ > leona...@sombriks:~/NetBeansProjects/arena/arena-client$ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira