Summary
ant's <java fork="true"> task does not run the class: it throws a hard JVM-level NullPointerException and produces no side effect at all.
Repro (JNode all-plugins boot /full.jgz, serial agent console)
Dir: /devices/hdb1/devtest/ant1 (JFAT).
WH3.java:
public class WH3 { public static void main(String[] a) throws Exception {
java.io.PrintWriter w = new java.io.PrintWriter(new java.io.FileOutputStream("/devices/hdb1/devtest/ant1/wh3.txt"));
w.println("WH3 RAN"); w.close(); System.out.println("WH3_SYS_OUT");
} }
build.xml:
<project name="t" default="job">
<target name="job">
<javac srcdir="." destdir="."/>
<java classname="WH3" fork="true" failonerror="true">
<classpath location="."/>
</java>
</target>
</project>
Run ant from that dir.
Observed output:
Buildfile: build.xml
java.lang.NullPointerException: NPE at address 3CDFE8D6
wh3.txt is NOT created and no class output appears — ExecuteJava crashes when forking.
Same project with fork="false" runs the class fine (side effect created), so this is specific to the fork="true" path.
Analysis
The ant <java> task with fork="true" tries to spawn/run the class in another JVM (ant's ExecuteJava / forking machinery). On JNode this path hits a JVM-level NPE (NPE at address ...), before the task body executes.
Suggested fix
Implement forking with a JNode-owned JVM invocation path (like the shell's java command), or explicitly document/disable fork support. Prefer fork="false" meanwhile.
Workaround
Use fork="false" + explicit <classpath> + a public target class.
Summary
ant's<java fork="true">task does not run the class: it throws a hard JVM-levelNullPointerExceptionand produces no side effect at all.Repro (JNode all-plugins boot
/full.jgz, serial agent console)Dir:
/devices/hdb1/devtest/ant1(JFAT).WH3.java:build.xml:Run
antfrom that dir.Observed output:
wh3.txtis NOT created and no class output appears —ExecuteJavacrashes when forking.Same project with
fork="false"runs the class fine (side effect created), so this is specific to thefork="true"path.Analysis
The ant
<java>task withfork="true"tries to spawn/run the class in another JVM (ant'sExecuteJava/ forking machinery). On JNode this path hits a JVM-level NPE (NPE at address ...), before the task body executes.Suggested fix
Implement forking with a JNode-owned JVM invocation path (like the shell's
javacommand), or explicitly document/disableforksupport. Preferfork="false"meanwhile.Workaround
Use
fork="false"+ explicit<classpath>+ apublictarget class.