File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAVA on Linux" Watch "JAVA on Linux" New topic
Author

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 .

Ankur
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

/usr/java

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
CLASSPATH=/usr/lib/java/bin:/u/javaProg/Jar/jdbc7.1-1.2.jar:/usr/lib/java/jre:
export CLASSPATH

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

/////////////////////////////////


Enjoy


Anand Karia


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

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.


http://home.arcor.de/hirnstrom/bewerbung
 
 
subject: JAVA on Linux
 
Similar Threads
WA #1.....word association
How close to real exam?
How close to real exam?
advice on how to gain linux experience while working on window
Does anyone think MS's .NET steals Sun's Java?