/** * Changes a current directory to a given directory. * The current directory can be changed anytime. * * @since JRuby 1.5.0. * * @param directory a new directory to be set. */ public void setCurrentDirectory(String directory) { if (provider.isRuntimeInitialized()) { provider.getRuntime().setCurrentDirectory(directory); } else { provider.getRubyInstanceConfig().setCurrentDirectory(directory); } }
/** * Changes a current directory to a given directory. * The current directory can be changed anytime. * * @since JRuby 1.5.0. * * @param directory a new directory to be set. */ public void setCurrentDirectory(String directory) { if (provider.isRuntimeInitialized()) { provider.getRuntime().setCurrentDirectory(directory); } else { provider.getRubyInstanceConfig().setCurrentDirectory(directory); } }
/** * Changes a current directory to a given directory. * The current directory can be changed anytime. * * @since JRuby 1.5.0. * * @param directory a new directory to be set. */ public void setCurrentDirectory(String directory) { if (provider.isRuntimeInitialized()) { provider.getRuntime().setCurrentDirectory(directory); } else { provider.getRubyInstanceConfig().setCurrentDirectory(directory); } }
/** * Returns a current directory. * * The default current directory is identical to a value of "user.dir" system * property if no security restriction is set. If the "user.dir" directory is * protected by the security restriction, the default value is "/". * * @since JRuby 1.5.0. * * @return a current directory. */ public String getCurrentDirectory() { if (provider.isRuntimeInitialized()) { return provider.getRuntime().getCurrentDirectory(); } return provider.getRubyInstanceConfig().getCurrentDirectory(); }
/** * Changes a current directory to a given directory. * The current directory can be changed anytime. * * @since JRuby 1.5.0. * * @param directory a new directory to be set. */ public void setCurrentDirectory(String directory) { if (provider.isRuntimeInitialized()) { provider.getRuntime().setCurrentDirectory(directory); } else { provider.getRubyInstanceConfig().setCurrentDirectory(directory); } }
/** * Returns a current directory. * * The default current directory is identical to a value of "user.dir" system * property if no security restriction is set. If the "user.dir" directory is * protected by the security restriction, the default value is "/". * * @since JRuby 1.5.0. * * @return a current directory. */ public String getCurrentDirectory() { if (provider.isRuntimeInitialized()) { return provider.getRuntime().getCurrentDirectory(); } return provider.getRubyInstanceConfig().getCurrentDirectory(); }
/** * Returns a current directory. * * The default current directory is identical to a value of "user.dir" system * property if no security restriction is set. If the "user.dir" directory is * protected by the security restriction, the default value is "/". * * @since JRuby 1.5.0. * * @return a current directory. */ public String getCurrentDirectory() { if (provider.isRuntimeInitialized()) { return provider.getRuntime().getCurrentDirectory(); } return provider.getRubyInstanceConfig().getCurrentDirectory(); }
/** * Returns a current directory. * * The default current directory is identical to a value of "user.dir" system * property if no security restriction is set. If the "user.dir" directory is * protected by the security restriction, the default value is "/". * * @since JRuby 1.5.0. * * @return a current directory. */ public String getCurrentDirectory() { if (provider.isRuntimeInitialized()) { return provider.getRuntime().getCurrentDirectory(); } return provider.getRubyInstanceConfig().getCurrentDirectory(); }
/** * Cleanly shut down this ScriptingContainer and any JRuby resources it holds. * All ScriptingContainer instances should be terminated when you are done with * them, rather then leaving them for GC to finalize. * * @since JRuby 1.5.0 */ public void terminate() { if (getProvider().isRuntimeInitialized()) getProvider().getRuntime().tearDown(false); getProvider().terminate(); }
/** * Cleanly shut down this ScriptingContainer and any JRuby resources it holds. * All ScriptingContainer instances should be terminated when you are done with * them, rather then leaving them for GC to finalize. * * @since JRuby 1.5.0 */ public void terminate() { if (getProvider().isRuntimeInitialized()) getProvider().getRuntime().tearDown(false); getProvider().terminate(); }
/** * Cleanly shut down this ScriptingContainer and any JRuby resources it holds. * All ScriptingContainer instances should be terminated when you are done with * them, rather then leaving them for GC to finalize. * * @since JRuby 1.5.0 */ public void terminate() { LocalContextProvider provider = getProvider(); if (provider.isRuntimeInitialized()) { provider.getRuntime().tearDown(false); provider.getRuntime().releaseClassLoader(); } provider.terminate(); }
/** * Cleanly shut down this ScriptingContainer and any JRuby resources it holds. * All ScriptingContainer instances should be terminated when you are done with * them, rather then leaving them for GC to finalize. * * @since JRuby 1.5.0 */ public void terminate() { LocalContextProvider provider = getProvider(); if (provider.isRuntimeInitialized()) { provider.getRuntime().tearDown(false); provider.getRuntime().releaseClassLoader(); } provider.terminate(); }