Home »
Public Forums »
archive »
trying to run IDL from a Servlet using Tomcat 5.0 under OS X
trying to run IDL from a Servlet using Tomcat 5.0 under OS X [message #38701] |
Mon, 22 March 2004 14:18 |
kanekalsgk
Messages: 2 Registered: March 2004
|
Junior Member |
|
|
I am trying to call IDL using runtime.exec() from a java servlet using
Tomcat 5.0 on a MAC Os X
I am getting the following error :
dyld: /usr/local/rsi/idl_6.0/bin/bin.darwin.ppc/idl can't open
library: libidl.6.0.dylib (No such file or
directory, errno = 2)
The latest version of my script is
>>>> >>>>>>>>>>>>>>>>>>>>>>>>
#!/bin/csh
#
# unix shell script to run idl as a batch job
#
#
setenv DYLD_LIBRARY_PATH2
/usr/local/rsi/idl_6.0/bin/bin.darwin.ppc/idl
source /usr/local/rsi/idl_6.0/bin/idl_setup
setenv PATH $PATH":/usr/local/bin/:"$IDL_DIR"/bin/"
setenv IDL_STARTUP simple-batch
idl
unsetenv IDL_STARTUP
exit
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
The servlet code in doGet(....) is
String[] command = new String[3];
command[0] = "/bin/csh";
command[1] = "-c";
command[2] = "/Users/myhome/myscript/simple-script";
Runtime runtime = Runtime.getRuntime();
Process process = null;
try {
process = runtime.exec(command);
process.waitFor();
out.println("Process exit code is: "+process.exitValue());
BufferedReader err = new BufferedReader(new
InputStreamReader(
process.getErrorStream()));
do{
if(err.ready())out.println(err.readLine()+"\n");
exitVal = process.exitValue();
}while(exitVal == -1);
process.destroy();
}catch(IOException e) {
System.err.println("IOException starting process!
"+e.getMessage());
}catch(InterruptedException ex) {
System.err.println("Interrupted waiting for
process!"+ex.getMessage());
}
.....
When I replace the call to IDL in the script with a call to say
TExtEdit - it works fine.
any ideas ?
Shri Kanekal
|
|
|
Current Time: Fri Oct 10 23:21:12 PDT 2025
Total time taken to generate the page: 0.48320 seconds