ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33486] New: - [compile] take javac relative to JAVA_HOME and only if that fails from OS path (to avoid getting "Unsupported major.minor version 49.0")
Date Thu, 10 Feb 2005 09:29:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33486>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33486

           Summary: [compile] take javac relative to JAVA_HOME and only if
                    that fails from OS path (to avoid getting "Unsupported
                    major.minor version 49.0")
           Product: Ant
           Version: 1.6.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: hauser@acm.org


For some reasons, I need to compile with jdk1.5 and other apps with jdk1.4

One one dev-machine just changing JAVA_HOME before compiling works perfect.

One another machine, this does not work. Despite 
<<------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004
...
 System properties
-------------------------------------------
java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path : /usr/java/sun/j2sdk1.4.2_04/jre/lib/i386
java.vm.version : 1.4.2_04-b05
...>>
I get
<<BUILD FAILED
java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported
major.minor version 49.0)>>

It seems that the compile target ignores the JAVA_HOME when calling the javac
and takes the one from the system path.
For an end-user it would be a lot easier to only to have to change the JAVA_HOME
and not also have to fiddle with the system path when needing to almost
simultaneously compile on two different jdk versions.

I guess this issue has already been touched in Bug 7327

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message