Results 1 to 6 of 6
- 05-27-2008, 09:45 PM #1
Member
- Join Date
- May 2008
- Posts
- 6
- Rep Power
- 0
Simple newbie problem: import 3rd party jar
Hi,
I'm new to Java (2nd year Java student) and am like a headless chicken trying to use a third party jar file in my project.
I've tried googling for help but am clearly missing something - I would post what I've tried, but it would be pointless since I haven't really got anywhere! I would have thought this should be as easy as pie given Java's qualities but it would seem Java and stupidity are incompatible!!
Any help would be hugely appreciated!
- 05-28-2008, 04:06 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
I'm not clear what you are looking for. Adding a third party jar file to your project? What you mean third part?
- 05-28-2008, 02:13 PM #3
Member
- Join Date
- May 2008
- Posts
- 6
- Rep Power
- 0
Thanks
Hi Eranga,
Thanks for your reply.
I have a JAR file that someone has written as a wrapper for a DLL. I would like to use the wrapper (4 or so methods) in my application.
The problem is, when I try to include the JAR using a java import statement in my code it can't locate the library.
Thanks again
Jody
- 05-29-2008, 06:27 PM #4
Member
- Join Date
- May 2008
- Posts
- 6
- Rep Power
- 0
Ok I think I've bumped into how to do it:
1) Create new project
2) Right-click project -> "import"
3) General -> File system
4) Open directory containing JAR file
5) Click the checkbox next to the JAR file, click OK
6) Right click on the JAR file ->
7) Build Path -> Add to build path
8) Then in the source, import the package name as listed under the JAR tree.
The build path was what I missed! (And I wasn't sure if I had to import the jar file, or if I had to add it to the project some other way).
- 05-29-2008, 06:41 PM #5
1.Put the jar in your project in a folder called lib (make it if it does not exist.
2. right click on project >>Properties>>Java Build Path
3. Click on the Libraries tab
4. Add Jars, find the jar you just copied and click ok, then ok and the workspace should rebuild.
- 05-30-2008, 04:02 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
Help with a very simple method for a very simple beginner.
By cakeman in forum New To JavaReplies: 2Last Post: 05-04-2008, 05:27 PM -
My Simple Refresh Problem
By pmcastillo in forum New To JavaReplies: 0Last Post: 03-26-2008, 07:59 AM -
New to JSF, simple problem with Eclispe and Tomcat
By nibeck in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 12-16-2007, 05:53 PM -
simple problem - code wont compile
By dirtycash in forum New To JavaReplies: 1Last Post: 11-20-2007, 05:49 PM -
problem with a simple java code
By boy22 in forum New To JavaReplies: 2Last Post: 08-03-2007, 02:46 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks