[ http://jira.codehaus.org/browse/MANTRUN-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235709#action_235709 ]
Doug Bateman commented on MANTRUN-91: ------------------------------------- This issue [MANTRUN-91] is indeed quite annoying, if for no other reason than it sends the person searching all over Google trying to figure out why something as basic as Javac doesn't work within antrun. All the solutions posted are work-rounds... which works. However it would be really nice to fix the issue once and for all.... here are a few possible remedies: A) Have the antrun task by default include the system dependency ${java.home}/../lib/tools.jar. (So that javac works exactly like compiler:compile.) B) Ask the ANT folks to not only check for ${java.home}/lib/tools.jar, but also ${java.home}/../lib/tools.jar. C) Or simply make "build.compiler=extJavac" be set by antrun. Of these solutions, I prefer solution A. (Solution B isn't bad either.) If I submit a patch that does A, would you include it? (Assuming it's done right.) I think every person who's used javac inside antrun has hit this issue. It would be nice to nip this issue in the bud. Would you also consider increasing the severity up 1 level? > Cannot run javac from tasks > --------------------------- > > Key: MANTRUN-91 > URL: http://jira.codehaus.org/browse/MANTRUN-91 > Project: Maven 2.x Antrun Plugin > Issue Type: Bug > Reporter: Thomas Diesler > > Embedded error: The following error occurred while executing this line: > /home/tdiesler/svn/jbossws/stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wstools.xml:65: > Unable to find a javac compiler; > com.sun.tools.javac.Main is not on the classpath. > Perhaps JAVA_HOME does not point to the JDK -- 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