LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-03-2011, 03: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, 03:58 AM   #2
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

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

Code:
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:

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


Reply


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 07:34 PM
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 04:56 AM
LXer: How to run Linux in a virtual machine LXer Syndicated Linux News 0 06-29-2010 11:00 AM
how to run linux command from java program? ranger225 Linux - Newbie 1 11-10-2004 07:55 AM
java Virtual Machine in Linux 10, kernel 2.6.3 zebra90210 Linux - Software 4 07-16-2004 08:21 AM


All times are GMT -5. The time now is 10:49 PM.

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