https://github.com/mgwidmann/simple_ruby_jar
A simple hello world example of using warbler to create a Java JAR out of a ruby gem's source files.
https://github.com/mgwidmann/simple_ruby_jar
Last synced: 5 months ago
JSON representation
A simple hello world example of using warbler to create a Java JAR out of a ruby gem's source files.
- Host: GitHub
- URL: https://github.com/mgwidmann/simple_ruby_jar
- Owner: mgwidmann
- License: mit
- Created: 2014-06-03T04:04:56.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-03T04:06:09.000Z (about 12 years ago)
- Last Synced: 2025-05-24T22:35:50.264Z (about 1 year ago)
- Size: 109 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SimpleRubyJar
An example application for making an executable jar file out of a ruby gem using the [warbler](https://github.com/jruby/warbler) gem.
## Creating your own
Create a new gem
```bash
$ bundle new my_gem_name
$ cd my_gem_name
```
## Create a bin/my_gem_name file to run as the "public static void main(String[] args)"
Create the bin dir and add your file inside
```bash
$ mkdir bin
(add your file to the bin folder)
```
## Edit the my_gem_name.gemspec and add your executable file (if not already done)
## Use the example [config/warble.rb] in this repo as a template for your jar
## Create your jar
```bash
$ warble
```
## Run your jar
Here is an example of running this jar created by this repo
```bash
$ java -jar simple_ruby_jar.jar
Hello World Java 1.6.0_65!
```