LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Running shell scripts from Java (https://www.linuxquestions.org/questions/programming-9/running-shell-scripts-from-java-297620/)

cmpich 03-04-2005 11:28 AM

Running shell scripts from Java
 
I am not quite clear what environment I get when I call a shell script from Java.

The problem is: I have a shell script that exports an Oracle database but when I call this script from my Java Application the dump file cannot be reimported. Oracle complains about an character encoding problem (referred to as an internal Oracle error). It is working if I call the script from the shell directly.
To make it more confusing: from a different Linux server the script works fine run from Java. I am not sure what the difference makes.

This brings up the question what environment do I get when Java tries to run the script. I printed out the environment variables and it looks quite different from the case when I run the script directly.
This must be part of the virtual machine but I don't know what it exactly does.


Any insights or references?

andvin 04-19-2005 05:36 AM

Something to try:
Setup the correct environment for the script before/when you execute it.


All times are GMT -5. The time now is 03:39 AM.