I've created jar file from ruby code using warbler. File structure within jar is as below:
core.jar
----core
--------lib
------------gui.class
------------gui.rb
I've other java application from which I want to run "connect" function which is in Gui class of gui.rb.
I've tried below code in java:
ScriptingContainer SCRIPTING_CONTAINER = new ScriptingContainer;
// String CORE_JAR_PATH = "core.jar";
String CORE_JAR_PATH = "core.jar!/core/lib";
SCRIPTING_CONTAINER.getLoadPaths().add(CORE_JAR_PATH);
SCRIPTING_CONTAINER.runScriptlet("require 'gui'");
The last line in above code is giving me the exception "LoadError: no such file to load -- gui". How can I call the function of gui.rb?