• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inserting linux commands in java program

 
swati tawade
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Posts: 15205
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using Java 5 or better, there is also the newer
ProcessBuilder
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic