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 7006] New: - With jdk1.4.0, <property environment ... > causes the java.lang.NullPointerException.
Date Sun, 10 Mar 2002 02:22:32 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7006>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7006

With jdk1.4.0, <property environment ... > causes the java.lang.NullPointerException.

           Summary: With jdk1.4.0, <property environment ... > causes the
                    java.lang.NullPointerException.
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: y.inoue@computer.org


The Problem
-----------
I used ant-1.4.1 with jdk1.3.1-01 in a Windows XP professional environment.
After I switched jdk from 1.3.1-01 to 1.4.0, Core task <property environment 
... > failed.

The xml and the results
-----------------------

-----------------------------------------------------------------------
env.xml
-----------------------------------------------------------------------

<project name="test" default="test" basedir=".">
  <property name="os_name" value="Windows XP"/>

  <target name="test">
    <echo message=" before property environment='env'"/>
    <property environment="env"/>
    <echo message="JAVA_HOME = ${env.JAVA_HOME}"/>
    <echo message="ANT_HOME = ${env.ANT_HOME}"/>
  </target>

</project>


-----------------------------------------------------------------------
JDK1.3.1_01
-----------------------------------------------------------------------

E:\java\jrt\applications>echo %JAVA_HOME%
c:\java\bea\jdk131

E:\java\jrt\applications>echo %ANT_HOME%
c:\java\jakarta-ant-1.4.1

E:\java\jrt\applications>echo %PATH%
.;c:\java\jakarta-ant-1.4.1\bin;c:\java\bea\jdk131\bin;C:\WINNT\system32;G:\ora
c
le\ora90\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM

E:\java\jrt\applications>java -version
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

E:\java\jrt\applications>ant -version
Ant version 1.4.1 compiled on October 11 2001

E:\java\jrt\applications>ant -f env.xml
Buildfile: env.xml

test:
     [echo]  before property environment='env'
     [echo] JAVA_HOME = c:\java\bea\jdk131
     [echo] ANT_HOME = c:\java\jakarta-ant-1.4.1

BUILD SUCCESSFUL

Total time: 0 seconds
E:\java\jrt\applications>

-----------------------------------------------------------------------
JDK1.4.0
-----------------------------------------------------------------------

E:\java\jrt\applications>echo %JAVA_HOME%
c:\java\j2sdk1.4.0

E:\java\jrt\applications>echo %ANT_HOME%
c:\java\jakarta-ant-1.4.1

E:\java\jrt\applications>echo %PATH%
.;c:\java\jakarta-ant-1.4.1\bin;c:\java\j2sdk1.4.0\bin;C:\WINNT\system32;G:\ora
c
le\ora90\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM

E:\java\jrt\applications>ant -version
Ant version 1.4.1 compiled on October 11 2001

E:\java\jrt\applications>java -version
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

E:\java\jrt\applications>ant -f env.xml
Buildfile: env.xml

test:
     [echo]  before property environment='env'

BUILD FAILED

java.lang.NullPointerException
        at 
org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:
253)
        at org.apache.tools.ant.taskdefs.Property.execute(Property.java:183)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)

Total time: 2 seconds
E:\java\jrt\applications>

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


Mime
View raw message