<?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: Execute external command - batch file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-command-batch-file/m-p/7126376#M1511863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arlindo Valente,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have few question on SM69.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requirement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using SM69, i need to run a java file. &lt;/P&gt;&lt;P&gt;1) c:\hello.java&lt;/P&gt;&lt;P&gt;2) run SM69&lt;/P&gt;&lt;P&gt;3) we will get the&amp;nbsp; class file. ( c:\hello.class )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run class file&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) c:\hello.class&lt;/P&gt;&lt;P&gt;2) run SM69&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Open Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) Can we directly run the file from SM69 like java compiler.( javac hello.java)&lt;/P&gt;&lt;P&gt;2) Can we run the class file directly.&lt;/P&gt;&lt;P&gt;3) We tried to create a command ztest, OS Windows NT, OS command cmd /c, Parameters for operating system command- we have given the path c:\hello.java&lt;/P&gt;&lt;P&gt;getting error - specify file path not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help us out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ravindra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jan 2013 20:17:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-01-18T20:17:47Z</dc:date>
    <item>
      <title>Execute external command - batch file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-command-batch-file/m-p/7126374#M1511861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well I searched everything here and couldn't find an answer to my problem. I want to execute a java program on the application server. I therefore put the java file on the server and tested it there in the command line. Everything works perfect. I created a batch file and tested it on the server. Everything ok. JAVA_HOME is set correctly on the server, so no trouble there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to execute this command from an Abap Program.&lt;/P&gt;&lt;P&gt;What I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SM69 I created a new command:&lt;/P&gt;&lt;P&gt;- operating system command: cmd /c&lt;/P&gt;&lt;P&gt;- parameters: c:\test.bat &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, when I execute the bat directly on the server, everything works perfectly. But when I test this command with SM69 (or SM49), I always a get "java.lang.NoClassDefFoundError". I tried everything I could think of (set java_home in bat, various directories ...). I then removed the java program from the .bat and put simply  "md c:\test" in the .bat. No problem at all.&lt;/P&gt;&lt;P&gt;I tried to test FM SXPG_COMMAND_EXECUTE. There I get a "COMMAND NOT FOUND" error, although it has been correctly defined in SM69 (name and operating system).&lt;/P&gt;&lt;P&gt;I also tried to call the java command directly in SM69 (as a parameter, as a operating command , etc ..). I still get "java.lang.NoClassDefFoundError"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could somebody help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arlindo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Contents of .bat:&lt;/P&gt;&lt;P&gt;Just 1 line (URLReader being the program to be called)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;java URLReader&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jun 2010 13:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-command-batch-file/m-p/7126374#M1511861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-29T13:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Execute external command - batch file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-command-batch-file/m-p/7126375#M1511862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the link below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://java.sun.com/docs/books/tutorial/getStarted/problems/" target="test_blank"&gt;http://java.sun.com/docs/books/tutorial/getStarted/problems/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;section "Runtime problems"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jun 2010 06:07:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-command-batch-file/m-p/7126375#M1511862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-30T06:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Execute external command - batch file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-command-batch-file/m-p/7126376#M1511863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arlindo Valente,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have few question on SM69.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requirement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using SM69, i need to run a java file. &lt;/P&gt;&lt;P&gt;1) c:\hello.java&lt;/P&gt;&lt;P&gt;2) run SM69&lt;/P&gt;&lt;P&gt;3) we will get the&amp;nbsp; class file. ( c:\hello.class )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run class file&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) c:\hello.class&lt;/P&gt;&lt;P&gt;2) run SM69&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Open Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1) Can we directly run the file from SM69 like java compiler.( javac hello.java)&lt;/P&gt;&lt;P&gt;2) Can we run the class file directly.&lt;/P&gt;&lt;P&gt;3) We tried to create a command ztest, OS Windows NT, OS command cmd /c, Parameters for operating system command- we have given the path c:\hello.java&lt;/P&gt;&lt;P&gt;getting error - specify file path not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help us out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ravindra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 20:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-external-command-batch-file/m-p/7126376#M1511863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-18T20:17:47Z</dc:date>
    </item>
  </channel>
</rss>

