aspose file tools
The moose likes Linux / UNIX and the fly likes inserting linux commands in java program Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "inserting linux commands in java program" Watch "inserting linux commands in java program" New topic
Author

inserting linux commands in java program

swati tawade
Greenhorn

Joined: Nov 15, 2007
Posts: 1
hi ther

Right now i m working on project vpn i.e virtual private network.
its based on linux and java.
this project is intended to facilate handling vpn for the people who dont know linux or having less command over it.

So all the setting of vpn should be provided in the from of gui.
information which user enter in the form shold be saved as zip file.
so just want to know that is it possible to insert linux commands for configuring vpn in java program.

if yes please provide me code doing hte same or having similar kind of operation.

thanks
swati
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12953
    
    3

Welcome to JavaRanch.

You can run other programs from Java with Runtime.exec(). Look it up in the API documentation.

Also see this: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you're using Java 5 or better, there is also the newer
ProcessBuilder


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: inserting linux commands in java program
 
Similar Threads
logging into linux machine through java
Need some help...
DOS command in java program question..
java on linux
Executing unix commands from java application