Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

launch an exe prog from a servlet

Posted on 2001-07-10
6
Medium Priority
?
272 Views
Last Modified: 2013-11-24
I launch an executable program from a servlet with

Process proc = Runtime.getRuntime().exec("d:\\servlets\test.exe")

This exe use some dll to access a SYBASE database
(d:\Sybase\dll\...) and when i try the servlet, i get a message on the server:

the dll libcs.dll can not be found in the specified path
d:\servlets\;.;c:\winnt\system32;c:\winnt\system;c:\winnt;c:\winnt;c:\winnt\system32;

and test.exe is not executed.

There is no probleme when i launch test.exe in MS-DOS (or by double-clicking on it) or when i put test.exe in d:\sybase\dll and then try to lauch it with the servlet
but it should not stay in this directory.

d:\Sybase\dll\ is in my PATH

can somebody help me please ?

Laurent.
0
Comment
Question by:laurentj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 92

Accepted Solution

by:
objects earned 800 total points
ID: 6268521
The Sybase dll is not in the path used by the servlet:
d:\servlets\;.;c:\winnt\system32;c:\winnt\system;c:\winnt;c:\winnt;c:\winnt\system32;

Either add d:/sybase/dll to the path used by your servlet container, or pass a suitable environment via the exec call.
0
 
LVL 2

Expert Comment

by:mgaurav
ID: 6269153
Give the path "d:\sybase" in the environment path, that's the least you can do.
0
 

Author Comment

by:laurentj
ID: 6269355
My servlet run with APACHE/JSERV.
I change Jserv.properties :

 wrapper.path=d:\sybase\dll

and it works !

thanks.
0
Google Certified Professional - Cloud Architect

This course (1 of 3) is designed to help students who are interested in Google Cloud Platform (GCP) to become familiar with the platform, navigate the console and learn its capabilities. It will also prepare students for the Google Cloud Architect certification exam.

 

Author Comment

by:laurentj
ID: 6269365
My servlet run with APACHE/JSERV.
I change Jserv.properties :

 wrapper.path=d:\sybase\dll

and it works !

thanks.
0
 
LVL 92

Expert Comment

by:objects
ID: 6271441
Good to hear :)
Thanks for the points.
0
 

Author Comment

by:laurentj
ID: 6272329
another problem :

i use

Process proc = Runtime.getRuntime().exec("d:\\servlets\test.exe \"my string     end of string\"")

and when i display the param that test.exe get :
"my string end of string" and not
"my string     end of string" (spaces are reduce to one space !)

i try with a test.bat (echo %1) and i get the same pb !

any idea ?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question