Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-13-2005, 09:06 AM   #1
Registered: Sep 2005
Location: india
Distribution: Fedora Core 2
Posts: 62

Rep: Reputation: 15
java programming

hi every one..
i want to program in java on linux platform but really know nthing..
plz tell me how to run teh programs and to view applets..
Old 10-13-2005, 09:59 AM   #2
Senior Member
Registered: Dec 2003
Posts: 3,161
Blog Entries: 4

Rep: Reputation: 136Reputation: 136
It's the same as you do in Windows. Except that you install the Linux version. Everything else including compiling and running Java applets and applications are the same:

You can download java from Sun:

There are Linux downloads available in the download page. Since I am unable to copy-paste the download link, just go to the download section and choose the appropriate platform.

Last edited by vharishankar; 10-13-2005 at 10:01 AM.
Old 10-13-2005, 10:07 AM   #3
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
I'd download and install jdk (a Java Developer's Toolkit) from There's also a GNU java compiler, but I have no experience with it.

Here's how I set it up: I unpack it and put it in /usr/java, where I create a symlink "jdk" to my "current" version, e.g., jdk -> /usr/java/j2sdk1.4.2_06 (but now Java 1.5 is out, with quite some changes in the syntax). And I make sure /usr/java/jdk/bin is in my path.

For class X, you write source file You compile it (and, implicitly, any dependencies) with "javac", which produces one or more class files, including X.class. You run the program with "java X", i.e., naming the class not the file.

For an applet, you also have to write an HTML page that contains it. Sun provides appletviewer (now in your path), which you'd run like "appletviewer Y.html". Alternatively, point your favorite browser to file:///home/asahlot/java/Y.html (or wherever it lives).
Old 10-13-2005, 10:30 AM   #4
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
Java compiler and development environment setup:
JDK Installation
Eclipse Installation

Last edited by csfalcon; 06-09-2008 at 10:26 AM.


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
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 03:04 AM
java support and programming with java sharapchi Slackware 8 11-14-2005 05:47 PM
java programming question! redhatrosh Programming 2 03-15-2005 12:51 PM
java programming ksd Programming 7 10-15-2003 06:29 PM
java programming mAineAc Programming 3 07-06-2001 09:42 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:42 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