This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Program will not run on another machine.

 
Tim Bryant
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I successfully completed my first java project by using netbeans. The program runs perfectly on the machine which I built it on. However when i copy the executable Jar file to another machine and try to run it I get class not found exceptions.

For example : java.lang.ClassNotFound Exception: net.sourceforge.jtds.jdbc.Driver
java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver

Is everything the program needs to run not packaged into the jar when it's created?

Thanks for any help you can give.
 
Paul Clapham
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. You'll want to modify the process of creating your executable jar so that the jar's manifest contains a reference to your AS/400 JDBC driver jar. You'll also want to install that JDBC driver jar in the right place (whatever the manifest says) before running your executable jar.
 
Vijay Tidake
Ranch Hand
Posts: 146
Hibernate Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When you prepare the jar using netbeans it require a lib folder in the classpath for the jar that you are using in your project.
for eg-the folder must be having eg.jar and lib folder in same folder.

Hope this helps
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic