@@ -119,43 +119,7 @@ is divided into following sections:
119119        <property  name =" module.name"   value =" "  />
120120    </target >
121121    <target  depends =" -pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported"   name =" -do-init"  >
122-         <j2seproject1 : property  name =" platform.home"   value =" platforms.${platform.active}.home"  />
123-         <j2seproject1 : property  name =" platform.bootcp"   value =" platforms.${platform.active}.bootclasspath"  />
124-         <j2seproject1 : property  name =" platform.compiler"   value =" platforms.${platform.active}.compile"  />
125-         <j2seproject1 : property  name =" platform.javac.tmp"   value =" platforms.${platform.active}.javac"  />
126-         <condition  property =" platform.javac"   value =" ${platform.home}/bin/javac"  >
127-             <equals  arg1 =" ${platform.javac.tmp}"   arg2 =" $${platforms.${platform.active}.javac}"  />
128-         </condition >
129-         <property  name =" platform.javac"   value =" ${platform.javac.tmp}"  />
130-         <j2seproject1 : property  name =" platform.java.tmp"   value =" platforms.${platform.active}.java"  />
131-         <condition  property =" platform.java"   value =" ${platform.home}/bin/java"  >
132-             <equals  arg1 =" ${platform.java.tmp}"   arg2 =" $${platforms.${platform.active}.java}"  />
133-         </condition >
134-         <property  name =" platform.java"   value =" ${platform.java.tmp}"  />
135-         <j2seproject1 : property  name =" platform.javadoc.tmp"   value =" platforms.${platform.active}.javadoc"  />
136-         <condition  property =" platform.javadoc"   value =" ${platform.home}/bin/javadoc"  >
137-             <equals  arg1 =" ${platform.javadoc.tmp}"   arg2 =" $${platforms.${platform.active}.javadoc}"  />
138-         </condition >
139-         <property  name =" platform.javadoc"   value =" ${platform.javadoc.tmp}"  />
140-         <condition  property =" platform.invalid"   value =" true"  >
141-             <or >
142-                 <contains  string =" ${platform.javac}"   substring =" $${platforms."  />
143-                 <contains  string =" ${platform.java}"   substring =" $${platforms."  />
144-                 <contains  string =" ${platform.javadoc}"   substring =" $${platforms."  />
145-             </or >
146-         </condition >
147-         <fail  unless =" platform.home"  >Must set platform.home</fail >
148-         <fail  unless =" platform.bootcp"  >Must set platform.bootcp</fail >
149-         <fail  unless =" platform.java"  >Must set platform.java</fail >
150-         <fail  unless =" platform.javac"  >Must set platform.javac</fail >
151-         <fail  if =" platform.invalid"  >
152-  The J2SE Platform is not correctly set up.
153-  Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. 
154-  Either open the project in the IDE and setup the Platform with the same name or add it manually.
155-  For example like this:
156-      ant -Duser.properties.file=< path_to_property_file>  jar (where you put the property "platforms.${platform.active}.home" in a .properties file)
157-   or ant -Dplatforms.${platform.active}.home=< path_to_JDK_home>  jar (where no properties file is used) 
158-   </fail >
122+         <property  name =" platform.java"   value =" ${java.home}/bin/java"  />
159123        <available  file =" ${manifest.file}"   property =" manifest.available"  />
160124        <condition  property =" splashscreen.available"  >
161125            <and >
@@ -278,6 +242,20 @@ is divided into following sections:
278242        <condition  else =" "   property =" javac.profile.cmd.line.arg"   value =" -profile ${javac.profile}"  >
279243            <isset  property =" profile.available"  />
280244        </condition >
245+         <condition  else =" false"   property =" jdkBug6558476"  >
246+             <and >
247+                 <matches  pattern =" 1\.[56]"   string =" ${java.specification.version}"  />
248+                 <not >
249+                     <os  family =" unix"  />
250+                 </not >
251+             </and >
252+         </condition >
253+         <condition  else =" false"   property =" javac.fork"  >
254+             <or >
255+                 <istrue  value =" ${jdkBug6558476}"  />
256+                 <istrue  value =" ${javac.external.vm}"  />
257+             </or >
258+         </condition >
281259        <property  name =" jar.index"   value =" false"  />
282260        <property  name =" jar.index.metainf"   value =" ${jar.index}"  />
283261        <property  name =" copylibs.rebase"   value =" true"  />
@@ -365,7 +343,7 @@ is divided into following sections:
365343                        </path >
366344                    </resourcecount >
367345                </condition >
368-                 <javac  debug =" @{debug}"   deprecation =" ${javac.deprecation}"   destdir =" @{destdir}"   encoding =" ${source.encoding}"   excludes =" @{excludes}"   executable =" ${platform. javac} "   fork = " yes "   includeantruntime =" false"   includes =" @{includes}"   source =" ${javac.source}"   sourcepath =" @{sourcepath}"   srcdir =" @{srcdir}"   target =" ${javac.target}"   tempdir =" ${java.io.tmpdir}"  >
346+                 <javac  debug =" @{debug}"   deprecation =" ${javac.deprecation}"   destdir =" @{destdir}"   encoding =" ${source.encoding}"   excludes =" @{excludes}"   fork =" ${javac. fork} "   includeantruntime =" false"   includes =" @{includes}"   source =" ${javac.source}"   sourcepath =" @{sourcepath}"   srcdir =" @{srcdir}"   target =" ${javac.target}"   tempdir =" ${java.io.tmpdir}"  >
369347                    <src >
370348                        <dirset  dir =" @{gensrcdir}"   erroronmissingdir =" false"  >
371349                            <include  name =" *"  />
@@ -416,7 +394,7 @@ is divided into following sections:
416394                <property  location =" ${build.dir}/empty"   name =" empty.dir"  />
417395                <mkdir  dir =" ${empty.dir}"  />
418396                <mkdir  dir =" @{apgeneratedsrcdir}"  />
419-                 <javac  debug =" @{debug}"   deprecation =" ${javac.deprecation}"   destdir =" @{destdir}"   encoding =" ${source.encoding}"   excludes =" @{excludes}"   executable =" ${platform. javac} "   fork = " yes "   includeantruntime =" false"   includes =" @{includes}"   source =" ${javac.source}"   sourcepath =" @{sourcepath}"   srcdir =" @{srcdir}"   target =" ${javac.target}"   tempdir =" ${java.io.tmpdir}"  >
397+                 <javac  debug =" @{debug}"   deprecation =" ${javac.deprecation}"   destdir =" @{destdir}"   encoding =" ${source.encoding}"   excludes =" @{excludes}"   fork =" ${javac. fork} "   includeantruntime =" false"   includes =" @{includes}"   source =" ${javac.source}"   sourcepath =" @{sourcepath}"   srcdir =" @{srcdir}"   target =" ${javac.target}"   tempdir =" ${java.io.tmpdir}"  >
420398                    <src >
421399                        <dirset  dir =" @{gensrcdir}"   erroronmissingdir =" false"  >
422400                            <include  name =" *"  />
@@ -458,7 +436,7 @@ is divided into following sections:
458436            <sequential >
459437                <property  location =" ${build.dir}/empty"   name =" empty.dir"  />
460438                <mkdir  dir =" ${empty.dir}"  />
461-                 <javac  debug =" @{debug}"   deprecation =" ${javac.deprecation}"   destdir =" @{destdir}"   encoding =" ${source.encoding}"   excludes =" @{excludes}"   executable =" ${platform. javac} "   fork = " yes "   includeantruntime =" false"   includes =" @{includes}"   source =" ${javac.source}"   sourcepath =" @{sourcepath}"   srcdir =" @{srcdir}"   target =" ${javac.target}"   tempdir =" ${java.io.tmpdir}"  >
439+                 <javac  debug =" @{debug}"   deprecation =" ${javac.deprecation}"   destdir =" @{destdir}"   encoding =" ${source.encoding}"   excludes =" @{excludes}"   fork =" ${javac. fork} "   includeantruntime =" false"   includes =" @{includes}"   source =" ${javac.source}"   sourcepath =" @{sourcepath}"   srcdir =" @{srcdir}"   target =" ${javac.target}"   tempdir =" ${java.io.tmpdir}"  >
462440                    <src >
463441                        <dirset  dir =" @{gensrcdir}"   erroronmissingdir =" false"  >
464442                            <include  name =" *"  />
@@ -537,7 +515,7 @@ is divided into following sections:
537515            <element  name =" customizePrototype"   optional =" true"  />
538516            <sequential >
539517                <property  name =" junit.forkmode"   value =" perTest"  />
540-                 <junit  dir =" ${work.dir}"   errorproperty =" tests.failed"   failureproperty =" tests.failed"   fork =" true"   forkmode =" ${junit.forkmode}"   jvm = " ${platform.java} "   showoutput =" true"   tempdir =" ${build.dir}"  >
518+                 <junit  dir =" ${work.dir}"   errorproperty =" tests.failed"   failureproperty =" tests.failed"   fork =" true"   forkmode =" ${junit.forkmode}"   showoutput =" true"   tempdir =" ${build.dir}"  >
541519                    <syspropertyset >
542520                        <propertyref  prefix =" test-sys-prop."  />
543521                        <mapper  from =" test-sys-prop.*"   to =" *"   type =" glob"  />
@@ -565,7 +543,7 @@ is divided into following sections:
565543            <element  name =" customizePrototype"   optional =" true"  />
566544            <sequential >
567545                <property  name =" junit.forkmode"   value =" perTest"  />
568-                 <junit  dir =" ${work.dir}"   errorproperty =" tests.failed"   failureproperty =" tests.failed"   fork =" true"   forkmode =" ${junit.forkmode}"   jvm = " ${platform.java} "   showoutput =" true"   tempdir =" ${build.dir}"  >
546+                 <junit  dir =" ${work.dir}"   errorproperty =" tests.failed"   failureproperty =" tests.failed"   fork =" true"   forkmode =" ${junit.forkmode}"   showoutput =" true"   tempdir =" ${build.dir}"  >
569547                    <syspropertyset >
570548                        <propertyref  prefix =" test-sys-prop."  />
571549                        <mapper  from =" test-sys-prop.*"   to =" *"   type =" glob"  />
@@ -641,7 +619,7 @@ is divided into following sections:
641619                    </fileset >
642620                </union >
643621                <taskdef  classname =" org.testng.TestNGAntTask"   classpath =" ${run.test.classpath}"   name =" testng"  />
644-                 <testng  classfilesetref =" test.set"   failureProperty =" tests.failed"   jvm = " ${platform.java} "   listeners =" org.testng.reporters.VerboseReporter"   methods =" ${testng.methods.arg}"   mode =" ${testng.mode}"   outputdir =" ${build.test.results.dir}"   suitename =" WorldWindJava"   testname =" TestNG tests"   workingDir =" ${work.dir}"  >
622+                 <testng  classfilesetref =" test.set"   failureProperty =" tests.failed"   listeners =" org.testng.reporters.VerboseReporter"   methods =" ${testng.methods.arg}"   mode =" ${testng.mode}"   outputdir =" ${build.test.results.dir}"   suitename =" WorldWindJava"   testname =" TestNG tests"   workingDir =" ${work.dir}"  >
645623                    <xmlfileset  dir =" ${build.test.classes.dir}"   includes =" @{testincludes}"  />
646624                    <propertyset >
647625                        <propertyref  prefix =" test-sys-prop."  />
@@ -872,9 +850,6 @@ is divided into following sections:
872850                    <classpath >
873851                        <path  path =" @{classpath}"  />
874852                    </classpath >
875-                     <bootclasspath >
876-                         <path  path =" ${platform.bootcp}"  />
877-                     </bootclasspath >
878853                </nbjpdastart >
879854            </sequential >
880855        </macrodef >
@@ -924,7 +899,7 @@ is divided into following sections:
924899            <attribute  default =" jvm"   name =" jvm"  />
925900            <element  name =" customize"   optional =" true"  />
926901            <sequential >
927-                 <java  classname =" @{classname}"   dir =" ${work.dir}"   failonerror =" ${java.failonerror}"   fork =" true"   jvm = " ${platform.java} "   module =" @{modulename}"  >
902+                 <java  classname =" @{classname}"   dir =" ${work.dir}"   failonerror =" ${java.failonerror}"   fork =" true"   module =" @{modulename}"  >
928903                    <classpath >
929904                        <path  path =" @{classpath}"  />
930905                    </classpath >
@@ -958,7 +933,7 @@ is divided into following sections:
958933            <attribute  default =" jvm"   name =" jvm"  />
959934            <element  name =" customize"   optional =" true"  />
960935            <sequential >
961-                 <java  classname =" @{classname}"   dir =" ${work.dir}"   failonerror =" ${java.failonerror}"   fork =" true"   jvm = " ${platform.java} "  >
936+                 <java  classname =" @{classname}"   dir =" ${work.dir}"   failonerror =" ${java.failonerror}"   fork =" true"  >
962937                    <classpath >
963938                        <path  path =" @{classpath}"  />
964939                    </classpath >
@@ -990,7 +965,7 @@ is divided into following sections:
990965            <attribute  default =" jvm"   name =" jvm"  />
991966            <element  name =" customize"   optional =" true"  />
992967            <sequential >
993-                 <java  classname =" @{classname}"   dir =" ${work.dir}"   failonerror =" ${java.failonerror}"   fork =" true"   jvm = " ${platform.java} "  >
968+                 <java  classname =" @{classname}"   dir =" ${work.dir}"   failonerror =" ${java.failonerror}"   fork =" true"  >
994969                    <jvmarg  line =" ${endorsed.classpath.cmd.line.arg}"  />
995970                    <jvmarg  value =" -Dfile.encoding=${runtime.encoding}"  />
996971                    <redirector  errorencoding =" ${runtime.encoding}"   inputencoding =" ${runtime.encoding}"   outputencoding =" ${runtime.encoding}"  />
@@ -1224,7 +1199,7 @@ is divided into following sections:
12241199        <j2seproject3 : copylibs  manifest =" ${tmp.manifest.file}"  />
12251200        <echo  level =" info"  >To run this application from the command line without Ant, try:</echo >
12261201        <property  location =" ${dist.jar}"   name =" dist.jar.resolved"  />
1227-         <echo  level =" info"  >${platform. java}  -jar "${dist.jar.resolved}"</echo >
1202+         <echo  level =" info"  >java -jar "${dist.jar.resolved}"</echo >
12281203    </target >
12291204    <target  depends =" init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist"   if =" do.archive"   name =" -do-jar-jar"   unless =" do.mkdist"  >
12301205        <j2seproject1 : jar  manifest =" ${tmp.manifest.file}"  />
@@ -1326,8 +1301,8 @@ is divided into following sections:
13261301                <isset  property =" main.class.available"  />
13271302            </and >
13281303        </condition >
1329-         <property  name =" platform.jlink"   value =" ${platform .home}/bin/jlink"  />
1330-         <property  name =" jlink.systemmodules.internal"   value =" ${platform .home}/jmods"  />
1304+         <property  name =" platform.jlink"   value =" ${jdk .home}/bin/jlink"  />
1305+         <property  name =" jlink.systemmodules.internal"   value =" ${jdk .home}/jmods"  />
13311306        <exec  executable =" ${platform.jlink}"  >
13321307            <arg  value =" --module-path"  />
13331308            <arg  path =" ${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"  />
@@ -1520,19 +1495,16 @@ is divided into following sections:
15201495                </not >
15211496            </and >
15221497        </condition >
1523-         <exec  executable =" ${platform.java}"   failonerror =" false"   outputproperty =" platform.version.output"  >
1524-             <arg  value =" -version"  />
1525-         </exec >
15261498        <condition  else =" "   property =" bug5101868workaround"   value =" *.java"  >
1527-             <matches  multiline = " true "   pattern =" 1\.[56](\..*)?"   string =" ${platform .version.output }"  />
1499+             <matches  pattern =" 1\.[56](\..*)?"   string =" ${java .version}"  />
15281500        </condition >
15291501        <condition  else =" "   property =" javadoc.html5.cmd.line.arg"   value =" -html5"  >
15301502            <and >
15311503                <isset  property =" javadoc.html5"  />
1532-                 <available  file =" ${platform .home}${file.separator}lib${file.separator}jrt-fs.jar"  />
1504+                 <available  file =" ${jdk .home}${file.separator}lib${file.separator}jrt-fs.jar"  />
15331505            </and >
15341506        </condition >
1535-         <javadoc  additionalparam =" -J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}"   author =" ${javadoc.author}"   charset =" UTF-8"   destdir =" ${dist.javadoc.dir}"   docencoding =" UTF-8"   encoding =" ${javadoc.encoding.used}"   executable = " ${platform.javadoc} "   failonerror =" true"   noindex =" ${javadoc.noindex}"   nonavbar =" ${javadoc.nonavbar}"   notree =" ${javadoc.notree}"   private =" ${javadoc.private}"   source =" ${javac.source}"   splitindex =" ${javadoc.splitindex}"   use =" ${javadoc.use}"   useexternalfile =" true"   version =" ${javadoc.version}"   windowtitle =" ${javadoc.windowtitle}"  >
1507+         <javadoc  additionalparam =" -J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}"   author =" ${javadoc.author}"   charset =" UTF-8"   destdir =" ${dist.javadoc.dir}"   docencoding =" UTF-8"   encoding =" ${javadoc.encoding.used}"   failonerror =" true"   noindex =" ${javadoc.noindex}"   nonavbar =" ${javadoc.nonavbar}"   notree =" ${javadoc.notree}"   private =" ${javadoc.private}"   source =" ${javac.source}"   splitindex =" ${javadoc.splitindex}"   use =" ${javadoc.use}"   useexternalfile =" true"   version =" ${javadoc.version}"   windowtitle =" ${javadoc.windowtitle}"  >
15361508            <classpath >
15371509                <path  path =" ${javac.classpath}"  />
15381510            </classpath >
0 commit comments