Solved

How to compile and run a java program in Linux

Posted on 2002-03-30
4
405 Views
Last Modified: 2010-03-31
Hi,
May I know how to compile and run java program in Linux.

Thanks.
0
Comment
Question by:antioch_75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 6907749
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6908290
are you looking for Java Compiler on Linux?

http://www.blackdown.org/java-linux.html
0
 
LVL 1

Expert Comment

by:mErCuR4
ID: 6908464
javac aaa.java but before that make sure ur path is set. if not u will have to specify it. Eg. /usr/jdk1.3/bin/javac aaa.java
0
 

Accepted Solution

by:
sunilvirus earned 50 total points
ID: 6909817
u need not always type the entire path.
you should do the following.

for eg. if jdk is installed in the directory /usr/jdk1.3
open the .profile file present in your home directory.

if there is a line starting with '$PATH' then add the above path to the path already present there.
if not the type $PATH=$PATH;/usr/jdk1.3

now to compile and run a java file (test.java)
for comilation: javac test.java
fro running   : java  test.java
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet example 11 76
jdbc error in jsp application 20 91
Selenium docs api java index 3 97
Java import explained 4 48
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question