• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

problem with running a shell script from Java program

 
Greenhorn
Posts: 13
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aren't .sh files Linux shell scripts?

edit This may help: How to write a wsgen script for Windows
 
lowercase baba
Posts: 12994
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Rancher
Posts: 1043
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:


 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic