- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- JAVA and DCL
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
Forums
Discussions
Discussions
Discussions
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
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
06-16-2004 06:49 PM
06-16-2004 06:49 PM
JAVA and DCL
I'm just wondering if you can start a commandprocedure or program from within a JAVA application.
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 07:10 PM
06-16-2004 07:10 PM
Re: JAVA and DCL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 11:44 PM
06-16-2004 11:44 PM
Re: JAVA and DCL
Your example will surely work in Unix, but I'm not sure it will under VMS. Lets put it this way: I have my doubts:
Under Unix, each image is a process. Running another image from that image simply means: clone your process enviroment and execute the image in the clone. Afterwards, control can be returned.
Under VMS a process is much more: it's the complete user environment - resources, abilities....One implication is that within a the proces context, you can have one - and no more - image active at any time. When executing a java application, the active image is JAVA.EXE, implying you cannot start a second image within the same process. This means: as long as JAVA.EXE is active, NO OTHER process - not even DCL - can be active within that process, or you have to postpone the running image. (This is what happens if you ^Y, as long as you don't execute another image you can $CONTINUE - it's still in memory.)
What you can do from JAVA is either:
* SPAWN (the VMS way) which can allow return of control after image rundown,
* run the next command as a detached process,
* remove itself from memory before starting the next one (that is what LIB$DO_COMMAND does).
Both SPAWN and RUN/DETACHED may require synchronisation in some way to regain control by the JAVA application - and that might get quite complicated, since the advanced facilities of VMS are simply lacking in JAVA (since that's Unix))
DO_COMMAND inhibits return of control - since JAVA.EXE (and the application files) will be removed from memory.
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2004 01:39 AM
06-17-2004 01:39 AM
Re: JAVA and DCL
Process p = rn.exec("ls -als " + documenturl);
The exec() function is part of Java's Runtime class and is documented to be platform-dependent. However, the semantics are really the same as the CRTL's exec() function (which is very likely what gets invoked under the hood), so the call syntax is actually pretty much the same on any platform. On the other hand, the command you send is a native command, and on VMS, "ls" is more likely to invoke the language sensitive editor than it is to obtain a directory listing, and the "documenturl" may very well need to be converted to native file naming conventions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2004 02:06 AM
06-17-2004 02:06 AM
Re: JAVA and DCL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2004 01:37 PM
06-17-2004 01:37 PM
Re: JAVA and DCL
seems this at least was a serious problem:
http://h71000.www7.hp.com/wizard/wiz_6733.html
You might want to check the release notes if it is fixed by now.
Greetings, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2004 05:55 PM
06-17-2004 05:55 PM
Re: JAVA and DCL
String env [ ] = {"a = 25"};
Process p = Runtime.getRuntime.exec ("test.com", env);
p.waitFor ( );
but it seems that the symbol a doesn't arrive well.
Also found
http://www.j2vms.co.uk/
It promisses the most ...
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2004 06:56 PM
06-17-2004 06:56 PM
Re: JAVA and DCL
Wim,
My impression now is I can start a command
procedure:
Process p = Runtime.getRuntime.exec ("test.com", env);
meaning I do NOT specify "@", just "test.com".
Which makes me believe that "run program.exe" would be possible also.
Your last link is promising as an extra. It's an impressive extension, but would render the Java program unusable on other platforms. (IMHO, I would then not use JAVA but create a native program)
Craig:
I know what "ls" means, in both Unix and VMS. That the command will actually do something different is quite obvious. The given command is not the issue, but the possibility to be able to run any program.
Martin:
Applies to 1.2.2 - but to other versions as well?
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2004 07:40 PM
06-17-2004 07:40 PM
Re: JAVA and DCL
I get the concept of leaving out the "@" sign.
How about parameter passing?
IIRC, the start of all this digging was how to trigger a system shutdown by a UPS using JAVA. AFAIK, that means it will be either interactive (defying the idea of triggering by a power fail to the UPS), or, the params will have to be passed to SHUTDOWN.COM
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2005 08:27 AM
10-06-2005 08:27 AM
Re: JAVA and DCL
OpenVMS Developer & System Manager