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

Get Files from jar.

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai all,
I have a query that i need to set the path a File

File file =new File("............");

I need to pass the path of some files that is inside a jar
i mean that file is inside the com.org.Test.

How i pass the path of a jar?

Can Anybody help me .....
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think it's possible with Files, but only with URLs. Take a look at java.net.JarURLConnection.

Doesn't sound like a testing-specific question, though. Moving to Java in General (intermed.)...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic