Help with Java project - beginner

jiiins2
jiiins2 used Ask the Experts™
on
I would like to create a simple application in Java that takes some input from the user (via GUI), establishes a ssh session and launches Firefox Portable. The ssh session should be terminated when FireFox is closed.

I noticed that the TOR Browser Bundle (https://www.torproject.org/projects/torbrowser-details.html.en#build) does something quite similar.

I have some experience in VB.NET and can read through Java code, but I've never built an application myself. So what is the best way to structure this application? Or, where should I start?

Thanks
Jay
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
http://www.jcraft.com/jsch/ should get you started
Mick BarryJava Developer
Top Expert 2010

Commented:
you'll have issues implementing that as a Java application as it will not know when ff has been closed.
Might be simpler to implement it as a java applet, that way you can embed it in a html page and load that page with ff

http://download.oracle.com/javase/tutorial/deployment/applet/getStarted.html

Author

Commented:
Thanks. But what about the link with FireFox?
Java Developer
Top Expert 2010
Commented:
you can use Runtime.exec() to start it up. You just need to careful that you read any output generated to avoid it locking up. Main problem though will be that you may find it difficult to know when it has closed.

Or the Desktop class may be used if the box is configured correctly
http://helpdesk.objects.com.au/java/how-to-launch-default-browser-with-java-6

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial