• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with running a shell script from Java program

 
minhdung tran
Greenhorn
Posts: 13
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a question regarding to running shell script from my java program , and I wish to get your advice.

I am eclipse and I have my shell script located at /HelloSoapServer/runwsgen.sh . The root of my project is at /HelloSoapServer.

I am running a java program to execute the shell script and the java program is




However, when I ran this java program , I got error message saying :


java.io.IOException: Cannot run program "./runwsgen.sh": CreateProcess error=193, %1 is not a valid Win32 application


I would like to ask how to get rid of the error , and secondly I am running from a window 7 environment so I guess I am running from a 64 bits machine, not win32 application as it stated.

Thanks so much in advance.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aren't .sh files Linux shell scripts?

edit This may help: How to write a wsgen script for Windows
 
fred rosenberger
lowercase baba
Bartender
Posts: 12203
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:Aren't .sh files Linux shell scripts?

not necessarily Linux...I believe this is the extension commonly used by any bash shell - Linux or Unix.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:
Darryl Burke wrote:Aren't .sh files Linux shell scripts?

not necessarily Linux...I believe this is the extension commonly used by any bash shell - Linux or Unix.

Ah right ... I should have spelled that *n?x.

But minhdung tran reports the error as (emphasis added)
%1 is not a valid Win32 application
 
Ivan Jozsef Balazs
Rancher
Posts: 982
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A shell script is an executable under neither Windows nor Unix/Linux.
It can be used along with the interpreting shell:


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic