On OpenVMS, in 4.0, the j2seproject:java task
fails. We've just started looking at this
problem, but we won't have a patch until next
week. Our fix will be conditionalized to only
affect the OpenVMS platform.
Start by checking plain <java> tasks.
Narrowing down the problem should not be too hard since you can just
write whatever Ant scripts you want to test and run them from the IDE
(or from the command line for that matter).
So far, I found out that the problem is "fork" attribute of java
task. Obiviously, it is not supported on OpenVMS.
Really? Is Runtime.exec not functional?
Runtime.exec works on OpenVMS, but the external command needs to be
wrapped in a special way to be executed properly on OpenVMS.
Prior to NetBeans 4.0, NetBeans explicitly did Runtime.exec so we
added special code in NetBeans to handle this. But in NetBeans 4.0,
Runtime.exec is handled implictly by Ant with "fork" attribute and
this is giving us a problem.
Well it sounds like you need to either
- fix your JRE to make Runtime.exec work out of the box (if it is
indeed not behaving consistently with other platforms)
- submit a patch for Ant (ant.apache.org) to fork processes in a
special way on OpenVMS
Note that for the second case, there is already some code in Ant -
Execute.VmsCommandLauncher - which supposedly handles this:
"A command launcher for VMS that writes the command to a temporary DCL
script before launching commands. This is due to limitations of both
the DCL interpreter and the Java VM implementation."
Seems to be written by Knut Wannheden <knut dot wannheden at paranor
There's also another commit whose log message mentions
"[...] On OpenVMS the Java VM will exit with a return code of 0 on
success, even though this is going to signal a failure for the OS. [...]"
BTW do you have the same project using command-line Ant? If so, there
is nothing to be done in NB code except bundle a newer version of Ant
that incorporates your patch, when it is released.
We have submitted a patch to Ant 1.6.2 which corrects this problem.
If they accept our patch, will it be up to us (Hp-OpenVMS) to bundle
a newer (or patched) version of Ant with NetBeans 4.0?
Yes, unless Ant 1.6.3 or 1.7.0 comes out before NB 4.0 and there is
enough time to test it and bundle it.
We submitted changes to Ant, they were incorporated. I'm marking this as