• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Executable Jar's

 
Dave Teare
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created two executable jar's, one for the client and one for the server. These work fine when used in network mode (i.e. launched seperately). However, when I run the client in stand alone mode, I require classes contained within the server jar file, and I get ClassNotFoundException's, so I need to add the server.jar to the classpath.
When I try:

The client launches correctly, but the additional classpath entry is ignored. Is this how one specifies additional classpath entries when using execuatable jars?
Or am I required to created a third jar file that contains all the classes, just so I can run in standalone mode?
Thanks!
--Dave.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple. You know how to specify a Main-Class attribute in your jar manifest. Well, you can also specify a Class-Path attribute Have a look at the JAR file specification.
- Peter
 
Dave Teare
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! It works fine now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic