Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-03-2011, 02:03 AM   #1
aaliya shah
LQ Newbie
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
How to run java program in linux(virtual machine).

plzz tell me how to run java programs on linux .Do i have to install any other software to run java program in my virtual linux system.I use Ubantu.Thnks in advance.
Old 07-03-2011, 02:58 AM   #2
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
In Ubuntu just run the following command:

sudo apt-get -y install sun-java6-plugin
This will install the Sun Java web plugin and runtime environment. Then you can just right click .jar files and run them with Java. You may need to log out and back in for the menu option to be there when you right click.

Alternatively you can do it manually with the following:

java -jar JARFILE.jar
Where JARFILE.jar is the java file you're trying to execute.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to run games within linux on a virtual machine? mothergoose729 Linux - Virtualization and Cloud 5 06-07-2011 06:34 PM
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 03:56 AM
LXer: How to run Linux in a virtual machine LXer Syndicated Linux News 0 06-29-2010 10:00 AM
how to run linux command from java program? ranger225 Linux - Newbie 1 11-10-2004 06:55 AM
java Virtual Machine in Linux 10, kernel 2.6.3 zebra90210 Linux - Software 4 07-16-2004 07:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration