Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在学习 Ruby,如果我理解正确,我可以获取我的 Ruby 脚本,并使用 JRuby 创建 Java 类文件,本质上允许我的 Ruby 脚本在 JVM 中运行。我已经成功地从我的 Ruby 脚本创建了一个 .class 文件。
我想知道,是否可以将这个类文件变成可执行文件?我应该使用 Warble 或 Rawr 来执行此操作吗?我安装了 Warble GEM,但我不知道如何使用它,我不确定它是否是我需要的……最简单的方法是什么?
在命令行中输入:
cd C:/Users/Someone/Path/To/Class/ jar cvfm executable.jar manifest.mf Foo.class
manifest.mf类似的东西在哪里
manifest.mf
主类:Foo
将 C:/Users/Someone/Path/To/Class/ 更改为您的文件的路径并更改Foo为您的类的名称。这将创建一个名为“executable.jar”的 jar 文件。
Foo