How to get the path of the jruby/warbler jar file

我只是一个虾纸丫 提交于 2019-12-11 20:12:54

问题


I'm building an application using JRuby and Warbler to package it. My problem is that I want to get the path of the jar file that is currently running, without writing java...


回答1:


Does RbConfig::CONFIG["bindir"] have what you want?

$ java -cp Development/src/jruby/lib/jruby-complete.jar org.jruby.Main -e 'require "rbconfig"; p RbConfig::CONFIG["bindir"]'
"file:/Users/asari/Development/src/jruby/lib/jruby-complete.jar!/META-INF/jruby.home/bin"


来源:https://stackoverflow.com/questions/8743854/how-to-get-the-path-of-the-jruby-warbler-jar-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!