@@ -228,16 +228,15 @@ end
228
228
val fileSep = System .getProperty(" file.separator" )
229
229
val core = Platform .getBundle(" org.knime.core" )
230
230
val coreClassPath = core.getHeaders.get(" Bundle-Classpath" ).toString
231
- val corePluginPath = FileLocator .resolve(FileLocator .find(core, new Path (" ." ), null )).getPath
231
+ val corePluginPath = FileLocator .resolve(
232
+ FileLocator .find(core, new Path (" ." ), null )).toURI().normalize().getPath
232
233
val base = Platform .getBundle(" org.knime.base" )
233
234
val baseClassPath = base.getHeaders.get(" Bundle-Classpath" ).toString
234
- val basePluginPath = FileLocator .resolve(FileLocator .find(base, new Path (" ." ), null )).getPath
235
+ val basePluginPath = FileLocator .resolve(
236
+ FileLocator .find(base, new Path (" ." ), null )).toURI().normalize().getPath
235
237
val ruby = Platform .getBundle(" org.knime.ext.jruby" )
236
- val rubyPluginPath = FileLocator .resolve(FileLocator .find(ruby, new Path (" ." ), null )).getPath
237
- val ext = new StringBuffer ()
238
- ext.append(basePluginPath + fileSep + " lib" )
239
- ext.append(corePluginPath + fileSep + " lib" )
240
- ext.append(getJavaExtDirsExtensionPath)
238
+ val rubyPluginPath = FileLocator .resolve(
239
+ FileLocator .find(ruby, new Path (" ." ), null )).toURI().normalize().getPath
241
240
242
241
val classpath = ArrayBuffer [String ]()
243
242
classpath ++= coreClassPath.split(" ," ).view
@@ -249,12 +248,15 @@ end
249
248
.map(s => FileLocator .find(base, new Path (s), null )).filter(_ != null )
250
249
.foreach { u => classpath.add(FileLocator .resolve(u).getFile) }
251
250
252
- classpath += basePluginPath + fileSep + " bin"
251
+ classpath += basePluginPath + " bin"
253
252
classpath += getJavaClasspathExtensionPath
254
253
if (RubyScriptNodePlugin .getDefault.getPreferenceStore.getBoolean(PreferenceConstants .JRUBY_USE_EXTERNAL_GEMS )) {
255
254
val str = RubyScriptNodePlugin .getDefault.getPreferenceStore.getString(PreferenceConstants .JRUBY_PATH )
256
255
System .setProperty(" jruby.home" , str)
257
256
}
257
+ // jruby 9000 gems support
258
+ classpath += rubyPluginPath + " lib" + fileSep + " ruby" + fileSep + " stdlib"
259
+
258
260
var container = new ScriptingContainer (LocalContextScope .THREADSAFE )
259
261
// container.setCompatVersion(CompatVersion.RUBY2_0)
260
262
container.setCompileMode(CompileMode .JIT )
0 commit comments