LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-01-2003, 03:38 AM   #1
perdesiz
Member
 
Registered: Aug 2003
Location: Turkey
Posts: 88

Rep: Reputation: 15
java in linux


I am using Redhat 9. I want to learn java programming. I do have some "Hello World!" like example codes. I want to compile and see the results of those codes. I couldn't perform just by typing "gcj example_code.java". What is the way to compile java codes in linux platform?
 
Old 09-01-2003, 03:54 AM   #2
vanquisher
Member
 
Registered: Aug 2003
Location: Hyderabad, India
Posts: 126

Rep: Reputation: 15
Re: java in linux

Quote:
Originally posted by perdesiz
I am using Redhat 9. I want to learn java programming. I do have some "Hello World!" like example codes. I want to compile and see the results of those codes. I couldn't perform just by typing "gcj example_code.java". What is the way to compile java codes in linux platform?
get JDK from http://java.sun.com
but i think it you could be able to compile with command 'javac' first and then use 'java' command. i use RH 7.2 and I got both of them working fine. I don't recommend gcj...
 
Old 12-02-2003, 10:17 AM   #3
m3rc_2003
LQ Newbie
 
Registered: Nov 2003
Posts: 4

Rep: Reputation: 0
gcj example_code.java --main=<class contianing main method> -I <directory to search for additional classes if req>

would do fine. Additional options you can specify are:

-o3 (Optimize for speed)
-o <output file name>
 
  


Reply



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 get java in linux bruce3au Linux - General 2 10-07-2005 12:23 PM
linux + java alaios Linux - Software 7 07-26-2005 04:27 PM
JAVA:(jwstric2) Problems in JAVA-LINUX nedian123 Programming 1 06-28-2004 04:12 PM
Java for linux Odin_of_Asgard Programming 8 04-12-2004 08:59 PM
Linux and Java + Java Media Framework (JMF) perry Programming 0 11-03-2003 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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
Open Source Consulting | Domain Registration