LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-25-2009, 09:46 PM   #1
mrbubblesort
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 http://www.snmp4j.org/ java library, but it has absolutely no installation instructions. There's a .jar file in the package, so I tried
Code:
java -jar /dist/lib/SNMP4J.jar
but it says
Code:
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, 10:33 PM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
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, 01:42 AM   #3
mrbubblesort
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.
 
  


Reply


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 10:00 PM
Best Gnutella Java Library? hamtavs Programming 1 02-13-2007 04:57 PM
can't find java library to install plugin itr1275 Linux - Newbie 2 01-06-2007 11:39 AM
Error when trying to install java runtime library downinthemine Linux - Newbie 5 07-31-2003 03:49 AM
java library problem sbrattt Programming 12 05-01-2002 12:21 AM


All times are GMT -5. The time now is 02:07 PM.

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