Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-25-2009, 08:46 PM   #1
LQ Newbie
Registered: Oct 2008
Location: Tokyo
Distribution: Debian / Ubuntu
Posts: 14

Rep: Reputation: 1
How do you install a java library?

This should be an easy question answer, I just have very little experience with java.

I'm on Solaris, and I just downloaded the SNMPJ4 java library, but it has absolutely no installation instructions. There's a .jar file in the package, so I tried
java -jar /dist/lib/SNMP4J.jar
but it says
Failed to load Main-Class manifest attribute from SNMP4J.jar
There's also a build.xml file in the package, but I have no clue what to do with that. Do I have to run a command to install it, do I just copy the jar file to some directory, or do I do something else perhaps?
Old 08-25-2009, 09:33 PM   #2
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
With java .jar files no installation is really necessary. It needs to be put in the CLASSPATH of what ever needs to call into it.

The build.xml file is an ant build script. if you have ant installed you can type ant in the directory where the build.xml is and it will run it.
Old 08-26-2009, 12:42 AM   #3
LQ Newbie
Registered: Oct 2008
Location: Tokyo
Distribution: Debian / Ubuntu
Posts: 14

Original Poster
Rep: Reputation: 1
Thank you very much! I just set my classpath to the directory with the .jar file and it worked like a charm.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
install from source - unable to find the libcurl library - but library is installed pulper Linux - Newbie 2 02-23-2009 09:00 PM
Best Gnutella Java Library? hamtavs Programming 1 02-13-2007 03:57 PM
can't find java library to install plugin itr1275 Linux - Newbie 2 01-06-2007 10:39 AM
Error when trying to install java runtime library downinthemine Linux - Newbie 5 07-31-2003 02:49 AM
java library problem sbrattt Programming 12 04-30-2002 11:21 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration