• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classloader.getSystemResource unable to find db.db when using jar

 
Raymond Ng
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My program calls Classloader.getSystemResource("db.db"), and it's unable to find the db.db file if it's outside the jar. The db.db file is in the same folder as the Client.jar. Even if i set the classpath using -cp, it still can't find the file. But when I insert the db.db file anywhere inside the jar file, it's able to find it without problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic