LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-13-2005, 09:06 AM   #1
asahlot
Member
 
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
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
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:

http://java.sun.com

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
Quigi
Member
 
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 java.sun.com. 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 X.java. You compile it (and, implicitly, any dependencies) with "javac X.java", 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
csfalcon
Member
 
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.
 
  


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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration