The moose likes Beginning Java and the fly likes Problem using external jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem using external jar file" Watch "Problem using external jar file" New topic

Problem using external jar file

vinayjg kumar

Joined: Dec 24, 2011
Posts: 5
Hi all,

First of all, I am new to java. I was using mail.jar file with my swing application to send and receive mails. I am using netbeans and I have added mail.jar library to the path. It works fine when I run my code with netbeans. At dist folder it generates the executable jar file. When I double click that file the window opens. But it doesn't work with mail. No mail related features are displayed. I doubt about the mail.jar library that, it may not be visible to executable jar file that was generated by netbeans, however the mail.jar file is in the lib folder which is inside of dist folder. How do I fix it. Please help. Thanks

John Jai

Joined: May 31, 2011
Posts: 1776
Check if the mail.jar is added correctly in the classpath of your jar's manifest file.
vinayjg kumar

Joined: Dec 24, 2011
Posts: 5
Thanks John. My problem is cleared. I didn't knew about the class path inside of jar file. Thanks again
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Problem using external jar file
It's not a secret anymore!