<?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: Java application. exitValue() of a HP-UX Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447593#M722729</link>
    <description>Thank you very much, Mike Stroyan&lt;BR /&gt;I have successfully used the #!/usr/bin/sh solution.</description>
    <pubDate>Tue, 26 Sep 2000 08:01:53 GMT</pubDate>
    <dc:creator>Jes·s</dc:creator>
    <dc:date>2000-09-26T08:01:53Z</dc:date>
    <item>
      <title>Java application. exitValue() of a HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447591#M722727</link>
      <description>I'am writing a Java aplication that will be executed under several plataforms and which make programs to execute.&lt;BR /&gt;&lt;BR /&gt;I use a Process objet....&lt;BR /&gt;&lt;BR /&gt;Process child=Runtime.getRuntime().exec(path);&lt;BR /&gt;&lt;BR /&gt;...I do a waitFor() and then I get the exit value in an int variable whith exitValue() method.&lt;BR /&gt;&lt;BR /&gt;This work well with executable files.&lt;BR /&gt;&lt;BR /&gt;But I need to execute Unix scripts (HP-UX) and get the exit value.&lt;BR /&gt;At the last line of the scripts I write the instruction exit n (where n is an integer number), but the exitValue I get is always 255.&lt;BR /&gt;&lt;BR /&gt;Could anyone help me?. How can I get the exit Value of a Unix Script?</description>
      <pubDate>Mon, 25 Sep 2000 07:30:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447591#M722727</guid>
      <dc:creator>Jes·s</dc:creator>
      <dc:date>2000-09-25T07:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Java application. exitValue() of a HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447592#M722728</link>
      <description>I had to change "Process p" to "java.lang.Process p" to make your example run.  You example produces correct results on the java 1.3 jvm.  I can get it to produce correct results from the 1.2 and 1.1 jvms by adding a&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;line at the top of scriptFile.  That changes the way that the exec runs the script, allowing a real exec(2) call to succeed.  The kernel then runs the shell instead of the java process needing to exec a shell.</description>
      <pubDate>Mon, 25 Sep 2000 16:27:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447592#M722728</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2000-09-25T16:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Java application. exitValue() of a HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447593#M722729</link>
      <description>Thank you very much, Mike Stroyan&lt;BR /&gt;I have successfully used the #!/usr/bin/sh solution.</description>
      <pubDate>Tue, 26 Sep 2000 08:01:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447593#M722729</guid>
      <dc:creator>Jes·s</dc:creator>
      <dc:date>2000-09-26T08:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Java application. exitValue() of a HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447594#M722730</link>
      <description>this requires a shell script. how do i do it if i want to create the cmd on the fly and execute it without using a shell script?&lt;BR /&gt;&lt;BR /&gt;thanks!&lt;BR /&gt;</description>
      <pubDate>Sat, 12 Jan 2002 09:24:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-application-exitvalue-of-a-hp-ux-script/m-p/2447594#M722730</guid>
      <dc:creator>Jonathan Ortiga</dc:creator>
      <dc:date>2002-01-12T09:24:19Z</dc:date>
    </item>
  </channel>
</rss>

