This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 48464 - On OpenVMS, j2seproject::java fails
Summary: On OpenVMS, j2seproject::java fails
Status: RESOLVED FIXED
Alias: None
Product: third-party
Classification: Unclassified
Component: nb4openvms (show other bugs)
Version: 4.x
Hardware: Other OpenVMS
: P1 blocker (vote)
Assignee: Isao Yanagimachi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-03 15:43 UTC by mgarrison
Modified: 2009-11-07 13:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mgarrison 2004-09-03 15:43:41 UTC
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.

Thanks,
Meg
Comment 1 Jesse Glick 2004-09-03 21:14:47 UTC
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).
Comment 2 Isao Yanagimachi 2004-09-03 22:26:47 UTC
So far, I found out that the problem is "fork" attribute of java 
task. Obiviously, it is not supported on OpenVMS.  

/Isao
Comment 3 Jesse Glick 2004-09-03 22:32:12 UTC
Really? Is Runtime.exec not functional?
Comment 4 Isao Yanagimachi 2004-09-03 22:39:27 UTC
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.

/Isao
Comment 5 Jesse Glick 2004-09-04 07:15:16 UTC
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)

or

- 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
dot ch>.

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. [...]"
Comment 6 Jesse Glick 2004-09-04 07:16:25 UTC
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.
Comment 7 mgarrison 2004-09-07 22:12:33 UTC
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?

Thanks,
Meg
Comment 8 Jesse Glick 2004-09-07 23:24:00 UTC
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.
Comment 9 mgarrison 2005-09-16 11:54:21 UTC
We submitted changes to Ant, they were incorporated.  I'm marking this as 
fixed.