Solved

How to compile and run a java program in Linux

Posted on 2002-03-30
4
408 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

636 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