jQuery in Action, 3rd edition
The moose likes Linux / UNIX and the fly likes inserting linux commands in java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "inserting linux commands in java program" Watch "inserting linux commands in java program" New topic

inserting linux commands in java program

swati tawade

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.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15081

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 8 API documentation
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

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

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link: http://aspose.com/file-tools
subject: inserting linux commands in java program
It's not a secret anymore!