Java and Linux environment

T

Tim Frink

Hi,

I've a Java application that allows to perform a Linux system via
Runtime.exec( string ) [the string must be defined within the GUI].

My problem is that during the syscall the Linux environment is unknown,
i.e. information from ~/.bashrc ... are missing. I'm running the
application via "java -jar APP.jar" and am using

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

Do you know a way to provide "java" with my Linux environment
or to perform the "exec"-invocation with known Linux environment?

Regards,
Tim
 
A

Arne Vajhøj

Tim said:
I've a Java application that allows to perform a Linux system via
Runtime.exec( string ) [the string must be defined within the GUI].

My problem is that during the syscall the Linux environment is unknown,
i.e. information from ~/.bashrc ... are missing. I'm running the
application via "java -jar APP.jar" and am using

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

Do you know a way to provide "java" with my Linux environment
or to perform the "exec"-invocation with known Linux environment?

Can you exec a shell and let that execute the command?

Arne
 
L

Lew

Arne said:
Tim said:
I've a Java application that allows to perform a Linux system via
Runtime.exec( string ) [the string must be defined within the GUI].

My problem is that during the syscall the Linux environment is unknown,
i.e. information from ~/.bashrc ... are missing. I'm running the
application via "java -jar APP.jar" and am using

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

Do you know a way to provide "java" with my Linux environment
or to perform the "exec"-invocation with known Linux environment?

Can you exec a shell and let that execute the command?

Or try the suggestion made in clj.help where you multi-posted your question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top