On Mon, Jun 22, 2009 at 11:26 AM, Lagutko Nikolay<nikolay.lagu...@gersis-software.com> wrote: > I have a problem with working with JRuby in Eclipse. If required scripts > stored not in classpath directories but in other plugins JRuby cannot find > them. As I see the problem in Equinox environment. When JRuby calculates > path to required script it uses Equinox BundleClassLoader to load this > script and it will return path to file in bundle-dependent format, for > example > > bundleresource://9/./some_script.rb > > And in further calculations JRuby cannot correctly interpret this path. For > example function File.expand_path will return “/./some_script” instead of > full path “D:/path_to_plugin/some_script”. > > > > I find out how to resolve this problem with using FileLocator class from > org.eclipse.core.runtime plugin but I don’t want to have dependencies to > other plugins in my org.jruby plugin.
Well, given that bundleresource is an org.eclipse.core thing, I'm not sure that the dependency on it is unreasonable. Obviously there's nothing in standard JVM/JDK classes that knows how to convert bundleresource://9/./ into D:/path_to_plugin, so you're already going to need help. Nick illustrated the other issues with using normal File APIs for URLs. It may be that we can add more URL-aware behaviors into File/Dir or we may consider writing a small URL library that acts like IO/File/Dir instead. - Charlie --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email