- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Java exit code 1.5 en 6.0 and VMS exit code
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 08:04 AM
тАО04-28-2010 08:04 AM
I schedule some java programs on a VMS server via a command file.
When the application ends normally it is doing a system.exit(1);
This means that the $severity is also 1 and $status is %X10000001 in my command file and successfully ended.
This worked in Java 1.5.
In Java 6 this doesn't work anymore.
system.exit(1) is translated to $severity is 2. And $status is %X1035A00A.
Is this normal?
Can I set some logicals to have the same behavior as in Java 1.5.
/Toine
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 08:27 AM
тАО04-28-2010 08:27 AM
Re: Java exit code 1.5 en 6.0 and VMS exit code
(SYS$COMMON:[SYSMSG]DECC$MSG.EXE;1:)
%C-E-EXIT1, exit value 1
Looks like a compile-time decision:
HELP CRTL exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 08:57 AM
тАО04-28-2010 08:57 AM
Re: Java exit code 1.5 en 6.0 and VMS exit code
Yes. Compile program below with and without /define=_POSIX_EXIT , run it and check $status:
#include
int main() { exit(1); }
Thanks,
-Boris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 11:16 AM
тАО04-28-2010 11:16 AM
Re: Java exit code 1.5 en 6.0 and VMS exit code
Of course, it _is_ possible to call either
plain [decc$]exit() or __posix_exit()
explicitly, and so it is possible to make a
run-time decision about which one to use.
Knowing nothing, I'd guess that the people
moving Java to VMS did some easy thing, like
define _POSIX_EXIT, when they built the
stuff, so I'd guess that there's no run-time
flexibility. But I haven't looked hard at
the Java-on-VMS documentation to see if
there's anything relevant (and revealing)
there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 04:49 PM
тАО04-28-2010 04:49 PM
Solutionhttp://h18012.www1.hp.com/java/documentation/1.6.0/ivms/docs/user_guide.html#exitmode
It seems that POSIX is the default (which would explain what you're experiencing).
Tim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 10:32 PM
тАО04-28-2010 10:32 PM
Re: Java exit code 1.5 en 6.0 and VMS exit code
Thanks for the answer. This is what I'm looking for.
I should read the release notes !!
$ define JAVA$EXIT_ENV COMPAT solved my problem.
============================================
Controlling exit mode
Beginning with JDK 6.x, a new logical, JAVA$EXIT_ENV, is introduced to control the exit mode of the JDK. Four modes are supported:
COMPAT:
Any value returned by the exit function is masked with %x10000000.
Any value returned by waitForProcessExit is returned unchanged.
This is the mode used for all JDKs before JDK 6.x.
POSIX:
Return value of the exit function:
Any value less than 256 is converted to match the C RTL POSIX exit code.
Any value over 255 is returned as the value with the inhibit mask.
Return value of the waitForProcessExit method:
Values of 0 or 1 are returned as a 0.
The CRTL POSIX exit code 1 (3514378) is returned as a 1.
Values between 3514379 and 3516409 are converted back to POSIX-style exit values, which are from 2 to 255.
POSIXVMS:
Same as POSIX mode, with one exception: For values 0 and 1, the waitForProcessExit method is returned as 1.
POSIX0AND1:
Same as POSIX mode, with one exception: For values 0 and 1, waitForProcessExit is returned with the exact value received.
The default mode for JDK 6.x is POSIX.
/Toine