LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 03-04-2005, 11:28 AM   #1
cmpich
LQ Newbie
 
Registered: Mar 2005
Posts: 1

Rep: Reputation: 0
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?
 
Old 04-19-2005, 05:36 AM   #2
andvin
LQ Newbie
 
Registered: Nov 2003
Location: Sweden
Distribution: gentoo
Posts: 11

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
running shell scripts using Java niravk8 Programming 2 02-09-2005 10:42 AM
Java Shell / Batch Scripts GenericProdigy Programming 4 11-18-2004 10:00 AM
Java with Shell Scripts lazkyr Programming 1 07-30-2004 05:30 PM
shell scripts and installing java.. scoob8000 Linux - Software 2 07-12-2003 12:13 PM
running shell scripts salparadise Linux - Newbie 2 12-21-2002 06:40 AM


All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration