Skip to content
JRuby's native launcher executable
C++ C Ruby Shell
Latest commit 7e4d7ea Sep 9, 2014 @chrisseaton chrisseaton Merge pull request #8 from jruby/search-options
Add support for -X? and -X...
Failed to load latest commit information.
inc JRUBY-6988 and possibly others Feb 20, 2013
lib Bump version in gem side to 1.1.0 Mar 20, 2014
nbproject Add version.h to NetBeans project. Apr 13, 2010
resources Use the head Luke Oct 10, 2012
spec Remove unneeded memory and stack properties. Sep 10, 2012
.dep.inc Initial commit Oct 16, 2009
.gitignore Add "make install" target and prepare Gem package of jruby-launcher Feb 24, 2010
.travis.yml Do meaningful stuff on Travis Jun 27, 2013
COPYING Updated documentation, license info Oct 16, 2009
Gemfile Do meaningful stuff on Travis Jun 27, 2013
Makefile Remove test from make default target and bump to 1.0.17. Jun 6, 2013
README.md Mark up with Markdown Feb 11, 2013
Rakefile README moved. May 21, 2013
TODO.txt JRUBY-4408: JRuby launcher should add JAR files from lib directory to… Jan 1, 2010
argnames.h Add a --dev flag that disables our JIT and forces Hotspot tier 1. Mar 19, 2014
argparser.cpp Add support for -X? and -X... Sep 8, 2014
argparser.h Add support for -X? and -X... Sep 7, 2014
extconf.rb
jruby.cpp JRUBY-4133: JRuby native launcher should look at its binary name and … Oct 21, 2009
jrubyexe.cpp Clean up tabs and some whitespace Jan 28, 2010
jvmlauncher.cpp JRUBY-6988 and possibly others Feb 20, 2013
jvmlauncher.h JRUBY-6988 and possibly others Feb 20, 2013
nbexecloader.h Clean up tabs and some whitespace Jan 28, 2010
ng.c Revert "Revert "Instead of passing exitcode, exit with 1."" Jan 24, 2013
platformlauncher.cpp Fix JRUBY-7096 JAVA_HOME value corrupted Mar 14, 2013
platformlauncher.h Copyright notice update Jan 3, 2012
rb_w32_cmdvector.h JRUBY-4151: Unable to use single quotes in windows Feb 16, 2010
strlcpy.c strlcpy is a macro under OS X 10.9 Jul 25, 2013
unixlauncher.cpp Fix JRUBY-6620: On windows if JAVA_HOME ends in a '\' then native lau… May 12, 2012
unixlauncher.h Unix jruby launcher is compiling! Jan 25, 2010
utilsfuncs.cpp g++ is more strict (no initialization of string to NULL -- since it c… Aug 4, 2012
utilsfuncs.h Fix JRUBY-6620: On windows if JAVA_HOME ends in a '\' then native lau… May 12, 2012
utilsfuncswin.cpp Unix jruby launcher is compiling! Jan 25, 2010
version.h Bump version to 1.1. Mar 19, 2014

README.md

JRuby Native Launcher

Motivation

Maintaning JRuby.BAT was, well, to put it mildly, unpleasant. We had tens of bugs due to BAT limitations, we had weird behaviors depending on the version of Windows, we had a bunch of regressions.

See http://jira.codehaus.org/browse/JRUBY-4100 for more details.

On UNIX platforms, we had problems because a shell-script can't be put as a path in the shebang and couldn't take arguments. (#!/usr/bin/env jruby -w)

We also wanted to DRY up argument handling, even if it meant ditching shell script and writing in lowest-common-denominator C++ (!).

Compile

On UNIX, you should be able to just type make and a jruby binary will be created in the project directory. Copy this to $JRUBY_HOME/bin (or wherever your jruby executable is installed). On Windows, you should also be able to type make if you have the MinGW compiler toolkit installed.

Or, open the project in Netbeans 6.8 (with C/C++ plugin installed). If Netbeans warns that no compilers found, follow the instructions and install the required compilers. Currenty, we support MinGW. More info here:

http://netbeans.org/community/releases/68/cpp-setup-instructions.html

Then, just build it, and you're ready to go. jruby.exe, jrubyw.exe and jruby.dll will be created, they need to be copied into $JRUBY_HOME/bin directory.

Both, 32-bit and 64-bit compilers are supported. Great version of 64-bit mingw can be found here: http://www.cadforte.com/system64.html

To build 64-bit version of the launcher, use the following from the command line:

make CONF=mingw64

Run

The launcher provides a great logger, use it like this:

jruby -Xtrace LOG_FILE.log ....

TODO

See TODO.txt file for things that need to be done before this launcher could replace jruby.bat.

Thanks

The original code is by Netbeans project.

License

Read the COPYING file.

Something went wrong with that request. Please try again.