Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to invoke a non-class file in Jar file?

 
Ronyn Woods
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a non-class file in Jar file, how to configuate its path? thanks a lot

Best Regards,
Ronyn
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you talking about a properties file? Or a file that you want to read in using IO?
Or perhaps you are talking about dlls? Or maybe you really mean interfaces? Or maybe C++ files?
Can you please explain what you are trying to do a bit more completely.
 
Steve Deadsea
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get resources such as images, configuration files, or other data out of jar files. The trick is to treat them as system resources and read them from your classpath. Please see:
http://java.sun.com/j2se/1.3/docs/guide/resources/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic