Hi I am trying to implement one program, where JAVA needs to trigger the backend UNIX script. Tried with options like
When I trigger the script from front end with the required parameters, it is just printing the echo statements of the script, one exception is first echo statement which is writing to a file is also not executing.
But the commands inside the script (like rm, gpg) are not getting executed.
When I run the same script with the same parameters from the command line, I don't have any issues.
How can I make the script execute same as the one from the command line through JAVA.
My Java code and UNIX script are on same server.
AIX 6.1
---------- Post updated at 11:37 PM ---------- Previous update was at 03:35 AM ----------
The problem is: the java creates a child process that does not have environment variables like you would expect.
The script java executes has to source the startup files in your account (or where ever) to define PATH, and other important environment variables. This is a problem with the script, not necessarily java.
I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like
ssh hostname path ksh HC_Report.ksh>out.html
...but it generates the HTML file in
remote desktop .i... (2 Replies)
Hi All,
well , i am facing this problem.. i have tried a few sample codes but there isn't any solution . could anyone please give a sample code as of how to do this...
Please see the below details...and read the details carefully.
I have written some code, logic is
1)from... (4 Replies)
Hi,
I'm trying to test one unix shell script in dev environment. But I'm not sure how to pass the environment in my java program calling code. I'm trying to use -DconsumerEnv="DEV" but unfortunately I get 'null' while trying to print the value from java class.
System.out.println("Environment: "+... (4 Replies)
Hi,
I need to execute a java program in a shell script.I then need to assign the value being returned by the program into a unix variable.Is there any way i can access the value in a variable in java program?
As in if my java code has a variable,
.
.
.
.
valueA =x.getValue()
.....
can... (1 Reply)
Hi All,
i dont have any idea about perl scripting...
i need some suggestion so that i can put my effort to find out the solution:D
let me explain....one of my tedious task which will taken care by Unix shell script which i prepared.
its a kind of routine work that i am running the... (4 Replies)
Having problem in connecting my gui java program to postgreaql database. I first used setenv classpath /home/share/postgresql/java/postgresql.jar:proj1, where proj1 is my folder conatining all java and class file, to set classpath. Then javac *.java. Then java proj1.Login. It gives me... (2 Replies)
Hey all,
My boss tasked me with the job to write a script which would invoke various java programs, the thing is I don't know much about shell scripting so would you experts help me out?
Here is the requirement
- 2 applications written in java: App_A and App_B
-... (0 Replies)
I was wondering if it was possible to call a unix command directly from a Java program during run-time. This command could very very basic e.g. "ps -ef" returned as a string, all I need is a starting place so if anyone has any suggestion or examples I would be very grateful (2 Replies)