• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAVA on Linux

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all ,

I want to run my JAVA project on Linux .

Could any body please send me the whole process .

Thanks in advance .

Ankur
 
Ranch Hand
Posts: 158
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this to the Beginner's forum where I think its a better fit.

So please add your replies there, thanks!
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic