LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-23-2011, 05:23 AM   #1
mhawk
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Post how to work with java programs in linux ?


how to work with java programs in linux redhat?
 
Old 01-23-2011, 07:02 AM   #2
ashwinipatankar
Member
 
Registered: Oct 2009
Location: Bangalore, India
Distribution: Fedora
Posts: 32

Rep: Reputation: 10
Case 1: writing and compiling Java codes
write a Hello World code save it as .java
go to the terminal, then go the directory where you saved your code.
type
javac <filename>.java
all set to go.

Case II: running .jar files
java -jar <filename>
 
Old 01-23-2011, 07:58 AM   #3
vigilandy
Member
 
Registered: Mar 2010
Location: Tokyo
Distribution: Arch, Fedora
Posts: 71

Rep: Reputation: 23
mhawk, are you developing programs, or just running a java application?

ashwinipatankar gave some good tips for either case, but you also need to verify that java is installed on your machine. you can check just by typing on the command line:
Code:
java -version
If you get "command not found", you will need to install java. The procedure depends on which distribution you're using. You could also try installing java using the installer from oracle, but I recommend using the package manager for your distribution.

You can also try out openJDK, which should also be available via your package manager.
 
Old 01-24-2011, 08:10 AM   #4
bloodyscript
Member
 
Registered: Apr 2006
Distribution: Sabayon linux 5.1
Posts: 182

Rep: Reputation: 15
also if your looking for an editor program theres eclipse
 
  


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
If I get Linux will my Vista programs still work? CL54849 General 3 06-07-2008 02:04 PM
Java programs either don't work correctly or not at all Firefox Latest Old_Fogie Linux - Software 2 05-09-2006 04:30 PM
What programs work on linux crazy_SNES Linux - Newbie 16 09-19-2005 09:39 AM
New Linux User Seeks Programs That Work little_penguin Linux - Software 3 11-25-2004 10:03 AM
Linux Programs work on FreeBSD, right? Travis86 *BSD 7 08-07-2003 12:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:48 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration