Is there anyway i can convert File in Jar to File Object. I am using some third party classes which needs File as an argument.so is there any work around to get Jar entry(some x File) to Convert to File Object.and i don't want to to create new files in hard disk to perform this work. Thanks for your time
Kumar- we ask that all our users follow our display name policy. Please change]http://www.coderanch.com/forums/user/edit]change your display name[/url] to include both a first and last name. Thanks. As for your question - it's easy to create a File object simply by using new File(name). However the third-party class you're using which expects a File object will probably also expect that there is a physical file on your hard drive which corresponds to this File object. (It will probably try to open a FileInputStream using the File object to read it.) Thus, you'll need to copy from the jar file into a new, separate file. Unless you can find another method in the 3rd-party API which uses, say, an InputStream rather than a File.