Skip to main content
Welcome guest. | Register | Login | Post

Java > Linux command?

1 reply [Last post]
AndrewB's picture
Joined: 2005-12-18

Is there anyway I can link a Java program i were to write to a linux console,
Eg the java program runs a command on the computer it is on...

How do I do that

tbuitenh's picture
Joined: 2005-12-21

I don't have much experience with Java, sorry...

If it has to run the command only once, you can let the program print the command to the standard output, then use the backtick in the shell.


`java yourprogram`

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.