Solved

How to compile and run a java program in Linux

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now