Skip to main content



      Home
Home » Eclipse Projects » Equinox » How to get files in bundle's classpath
How to get files in bundle's classpath [message #72063] Fri, 11 August 2006 23:40 Go to next message
Eclipse UserFriend
Originally posted by: BlueDavy.gmail.com

hi,everyone!

I want to get config file in bundle's classpath,I have tried
serverl kind of methods to realize this,but all no effect.
This is the method list I used:
1.
context.getBundle().getClass().getClassLoader().getResource( "config.file")
this method return null;
2. context.getBundle().getResource("config.file")
this method return string like this
"bundleresource://1/resource/config.file",the string is useless to
execute IO;

Can somebody tell me how to get the absolutePath of files in
bundle's classpath,such as config.file?
Re: How to get files in bundle's classpath [message #72115 is a reply to message #72063] Mon, 14 August 2006 01:43 Go to previous message
Eclipse UserFriend
InputStream istr = getClass().getResourceAsStream("abc/configFile.file");

"jerry" <BlueDavy@gmail.com> д
Previous Topic:Multiple instances of same bundle
Next Topic:Ignoring version incompatibilities
Goto Forum:
  


Current Time: Fri Jul 18 06:43:24 EDT 2025

Powered by FUDForum. Page generated in 0.04595 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top