?
Solved

How to compile and run a java program in Linux

Posted on 2002-03-30
4
Medium Priority
?
411 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 150 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.
Suggested Courses

719 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