Visit Jeremy's Blog.
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 03-21-2010, 11:45 AM   #1
LQ Newbie
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
writing and compiling java program in fedora 12

how we can we write java programs in java and how we execute it.. to produce output?
Old 03-21-2010, 03:36 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
You can write the program in any text editor. To compile it, you'll need a Java compiler. I haven't done serious Java development in years. When I did, I just downloaded the Java SDK from Sun, but nowadays the GNU compilers can also compile Java. You can also install an IDE like Eclipse or NetBeans, If you need more information than this, you need to ask a more specific question. Good luck!
Old 03-21-2010, 03:44 PM   #3
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 553

Rep: Reputation: 116Reputation: 116
You should download and install the JDK from sun. Then write your files in your favorite text editor and compile using the "javac" command. Commands also exist for wrapping into jar files.
Then execute using the "java" command.

You may need to set up your classpath too - either though your .bashrc or directly to the java/c programs as an argument (javac -classpath . etc.


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
Writing a C program that interacts with Java Ymir Programming 1 03-01-2009 10:34 PM
how to avoid writing every methods for a listener in a java program ?? alred Programming 2 05-24-2006 10:41 PM
program for writing/compiling C++ in Fedora klmbrt Linux - Newbie 10 01-26-2005 06:58 AM
compiling a java program on server using servlet? raghutv Programming 1 03-15-2003 06:17 AM
Whats the best, free, program for writing and running Java oudent Programming 8 12-08-2001 06:18 AM > Forums > Linux Forums > Linux - Newbie

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