Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Java libraries

As I'm quite new to Java, I would like to know the proper procedure of installing new libraries (those that are no available in my linux dist repositories). Where should I place them? and how to install them? For instance, I downloaded openCsv (http://opencsv.sourceforge.net/), and I have no idea how to install it.

like image 361
snoofkin Avatar asked Jan 22 '11 15:01

snoofkin


2 Answers

Be sure that the path, which you place the libaries at, is set in the $CLASSPATH Environment Variable.

For Eclipse: Project -> Properties -> Java Build Path -> Add JARs...

like image 89
lukuluku Avatar answered Sep 28 '22 13:09

lukuluku


Java libraries don't really need to be 'installed' like other applications. All you need to do is put the jar file in a specific location, and add the jar file to your classpath. How you do that depends on the linux distro you are using. If you are making a web application in eclipse, you can drop the .jar file in the WebRoot/web-inf/lib folder, and it will be bundled in with your project.

like image 23
Jeremy Vanderburg Avatar answered Sep 28 '22 12:09

Jeremy Vanderburg