• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Runtime.exec() problem

Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am executing the following code in Linux.

p =Runtime.getRuntime().exec("jar cMf /u01/app/oracle/products/904_infra/j2ee/home/applications/test/twoo.zip -C /u01/app/oracle/products/904_infra/j2ee/home/applications/test/tt .");

When i stored above line in .java file and executing it is working fine. But when executing this by storing in jsp. It is Showing the following error. Not only jar, even for javac,java commands are also not executing.

05/10/04 15:52:03 java.io.IOException: java.io.IOException: jar: not found

05/10/04 15:52:03 at java.lang.UNIXProcess.<init>(UNIXProcess.java:143)

05/10/04 15:52:03 at java.lang.Runtime.execInternal(Native Method)

05/10/04 15:52:03 at java.lang.Runtime.exec(Runtime.java:566)

05/10/04 15:52:03 at java.lang.Runtime.exec(Runtime.java:428)

05/10/04 15:52:03 at java.lang.Runtime.exec(Runtime.java:364)

05/10/04 15:52:03 at java.lang.Runtime.exec(Runtime.java:326)
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you doing this out of process?
Have you looked into doing this from within your app using the java.util.zip classes?

[ October 04, 2005: Message edited by: Ben Souther ]
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic