Help answer threads with 0 replies.
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 10-05-2009, 05:12 AM   #1
LQ Newbie
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
Java Program In Linux

How to compile and execute a Java code in Linux (Ubuntu 9.0)
Old 10-05-2009, 05:48 AM   #2
Registered: May 2006
Distribution: Debian
Posts: 609

Rep: Reputation: 98
What Java code?

If you install ubuntu-restricted-extras it will install a few useful things, including Sun-Java JRE.

Have a look at "How to install ANYTHING in Ubuntu!" on
Old 10-05-2009, 06:15 AM   #3
Registered: Sep 2009
Distribution: Fedora, Red Hat
Posts: 52

Rep: Reputation: 18

You can compile with "javac" and run it with "java myclass" or "java -classpath . myclass".
Old 10-05-2009, 07:12 AM   #4
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
There is no Ubuntu 9.0

Follow madmadmod's advice; if that does complain, install the jdk. If you have synaptic installed, look for sun-java-... and install the jdk (not at my ubuntu box so not sure what is exactly required).


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
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 04:56 AM
Pausing the execution of a java program with linux balteo Linux - Software 2 09-04-2005 11:47 AM
a question about Java program on Linux jpan Programming 5 01-11-2005 07:05 PM
how to run linux command from java program? ranger225 Linux - Newbie 1 11-10-2004 07:55 AM
Problem calling linux program from Java spasco Programming 3 04-25-2004 01:13 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:30 PM.

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