<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Running a Java program in the background in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268149#M27670</link>
    <description>Put the commands to setup and run the java program in a DCL command-file, say runmyjava.com:&lt;BR /&gt;&lt;BR /&gt;$@sys$common:[java$60.com]java$60_setup.com&lt;BR /&gt;$ java -jar MyProgram.jar&lt;BR /&gt;&lt;BR /&gt;and then submit it from sys$manager:systartup_vms.com like&lt;BR /&gt;&lt;BR /&gt;$ submit/noprint runmyjava&lt;BR /&gt;or&lt;BR /&gt;$ submit/noprint/user=me disk$user:[me]runmyjava&lt;BR /&gt;&lt;BR /&gt;But be aware: the java program must not do any graphic (X11) operations, unless You create a presistent Xwindows display, and set the batch procedures display to it before starting the java program.&lt;BR /&gt;</description>
    <pubDate>Mon, 03 Jan 2011 17:24:40 GMT</pubDate>
    <dc:creator>Joseph Huber_1</dc:creator>
    <dc:date>2011-01-03T17:24:40Z</dc:date>
    <item>
      <title>Running a Java program in the background</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268148#M27669</link>
      <description>I have a java program that needs to run continuously on OpenVMS.   I can run it just fine manually in a terminal window by typing first&lt;BR /&gt;@sys$common:[java$60.com]java$60_setup.com&lt;BR /&gt;and then&lt;BR /&gt;java -jar MyProgram.jar&lt;BR /&gt;&lt;BR /&gt;The problem of course is that the program only runs as long as the terminal window is open.   I am not that familiar with OpenVMS, but from what I have read it would seem to fall under the realm of the SUBMIT command.   &lt;BR /&gt;&lt;BR /&gt;Basically I want to be able to run the "java -jar MyProgram.jar" in the background and keep it running forever.   Also, the "java" command doesn't run without the environment command being run first.   So what would I need to do in OpenVMS to accomplish say running this program at startup and keeping it running?</description>
      <pubDate>Mon, 03 Jan 2011 16:49:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268148#M27669</guid>
      <dc:creator>OwensJ</dc:creator>
      <dc:date>2011-01-03T16:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Running a Java program in the background</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268149#M27670</link>
      <description>Put the commands to setup and run the java program in a DCL command-file, say runmyjava.com:&lt;BR /&gt;&lt;BR /&gt;$@sys$common:[java$60.com]java$60_setup.com&lt;BR /&gt;$ java -jar MyProgram.jar&lt;BR /&gt;&lt;BR /&gt;and then submit it from sys$manager:systartup_vms.com like&lt;BR /&gt;&lt;BR /&gt;$ submit/noprint runmyjava&lt;BR /&gt;or&lt;BR /&gt;$ submit/noprint/user=me disk$user:[me]runmyjava&lt;BR /&gt;&lt;BR /&gt;But be aware: the java program must not do any graphic (X11) operations, unless You create a presistent Xwindows display, and set the batch procedures display to it before starting the java program.&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jan 2011 17:24:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268149#M27670</guid>
      <dc:creator>Joseph Huber_1</dc:creator>
      <dc:date>2011-01-03T17:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Running a Java program in the background</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268150#M27671</link>
      <description>&lt;P&gt;Thanks Joseph,&lt;BR /&gt;&lt;BR /&gt;I ended up doing almost exactly what you said. I found an old thread that showed me some similar stuff too (Thanks to Rick Retterer there as well). I created a .COM file which works great and am looking to just change it using a submit command instead of a run/detach command like I found in that thread. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Management/start-a-process/m-p/4510831#M25351" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Management/start-a-process/m-p/4510831#M25351&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I'm going to combine both of your suggestions. Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2011 22:14:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268150#M27671</guid>
      <dc:creator>OwensJ</dc:creator>
      <dc:date>2011-11-10T22:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Running a Java program in the background</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268151#M27672</link>
      <description>I did the following:&lt;BR /&gt;&lt;BR /&gt;(I'm showing example in a generic format without document code)&lt;BR /&gt;&lt;BR /&gt;made a myapp.com file, which actually executes my java program containing the following:&lt;BR /&gt;$ set NoOn&lt;BR /&gt;$ write sys$output "Java process starting..."&lt;BR /&gt;$ @sys%common:[java$60.com]java$60_setup.com&lt;BR /&gt;$! define java$classpath here if necessary&lt;BR /&gt;$! show log java$classpath&lt;BR /&gt;$ set def sys$common:[myappdir]&lt;BR /&gt;$ java -jar MyApp.jar&lt;BR /&gt;$ write sys$output "Java process exiting..."&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;and then created a myapp_startup.com file to run the process as a batch process in the background: (which puts it in a batch queue i created)&lt;BR /&gt;$ Node_Name = F$GetSYI ( "NodeName" )&lt;BR /&gt;$ If F$Search ("sys$common:[myappdir]myapp.com" ) .nes. ""&lt;BR /&gt;$ Then&lt;BR /&gt;$ Log_file = "sys$common:[myappdir]''Node_Name'_myapp.log"&lt;BR /&gt;$ Submit/Notify/Noprint/Log="Log_File'/USER=SYSTEM -&lt;BR /&gt; /Queue='Node_Name'$Batch sys$common:[myappdir]myapp.com&lt;BR /&gt;$ EndIf&lt;BR /&gt;$ Exit&lt;BR /&gt;&lt;BR /&gt;This runs my app in the background inside of a batch queue, which can be monitored by a show sys/b command</description>
      <pubDate>Fri, 07 Jan 2011 15:35:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/running-a-java-program-in-the-background/m-p/5268151#M27672</guid>
      <dc:creator>OwensJ</dc:creator>
      <dc:date>2011-01-07T15:35:56Z</dc:date>
    </item>
  </channel>
</rss>

