my dog learned polymorphism
The moose likes Beginning Java and the fly likes JAVA on Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAVA on Linux" Watch "JAVA on Linux" New topic

JAVA on Linux

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Hi all ,

I want to run my JAVA project on Linux .

Could any body please send me the whole process .

Thanks in advance .

Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

just install jdk into ur linux machine.

process is simple. Download jdk having .bin file. After downloading Just double click .bin file and ur installation process vill go through.

Your java folder would be created at


But be inform that ur .sh file vil run ur java program.

.sh is used to run program similiar to .bat file in window.

Let your java class files are in /u/javaProg folder.

u must ve to use jdbc7.1-1.2.jar file to run SQL commands. file name could be different as i m using postgres database this file is for that and i ve keep all my jar files into /u/javaProg/Jar folder.

Here would be da coding of .sh file

echo Running my java application.
echo Please Wait .......................
cd /u/javaProg

/usr/lib/java/bin/java Login
echo cd /
echo exit.....



Anand Karia

Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

I'm moving this to the Beginner's forum where I think its a better fit.

So please add your replies there, thanks!
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Some remarks: we don't know how experienced you are with java and linux, so you need to give us more details, what you know how to do, and what not.

Is java already installed?
Sometimes it is.
Test it with

else, go to suns webpage, download a linux-java, and install like described on the sun pages.

I wouldn't click on the bin file, like Anand told you, because you might not get - hopefully not - occuring errormessages, because the window closes after finishing.
Run if you took the bin.tar.bz2 file, and extracted it.

Don't echo noise

because it may be hindering, if you want to process the output of your program.
Rule: silent is golden.

Don't include the java-bin in your classpath.
Instead, specify in /etc/profile if you're working on a single-user machine, and

When problems with databases occur, tell us.
Don't set the classpath, if you don't need to.
I agree. Here's the link:
subject: JAVA on Linux
It's not a secret anymore!