Re: [jruby-user] Re: JRuby on mainframe

Keith Bennett <[email protected]> Wed, 26 Nov 2014 04:46:39 -0500
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CAJR0di5BtzmUnA+YvoLSPscQ2RNk_DNLs2txA1BVQ5jWaTBz5w@mail.gmail.com>
Is it possible although the java executable is found when you run that
command, the java executable doesn't know where to find the Java runtime?
Does this OS have environment variables?  If so, I'd suggest setting
JDK_HOME and JAVA_HOME to the root of your Java installation.

Here's a very short blog article showing what this looks like on Ubuntu:

http://niklas.istenes.se/java/set-java_home-and-jdk_home-in-ubuntu-11/

- Keith

On Tue, Nov 25, 2014 at 6:34 PM, Muralidharan S. <[email protected]>
wrote:

> Hi Christian,
>
> Thanks for the suggestion. When I execute a ruby file with the complete
> jar file, I get the below error. Apparently the same error was returned
> when another friend executed the jruby shell script in a bash shell
> environment. Let me know if this gives a clue.
>
> $ java -jar jruby-complete-1.7.16.1.jar hello.rb
> RubyBasicObject.java:522:in `getMetaClass':
> java.lang.NullPointerException
>         from RubyBasicObject.java:634:in `getRuntime'
>         from RaiseException.java:139:in `<init>'
>         from Ruby.java:3724:in `newNameError'
>         from Ruby.java:3712:in `newNameError'
>         from Ruby.java:3701:in `newNameError'
>         from RubyModule.java:3173:in `defineConstant'
>         from EncodingService.java:253:in `defineEncodingConstant'
>         from EncodingService.java:246:in `defineEncodingConstants'
>         from EncodingService.java:180:in `defineEncodings'
>         from Ruby.java:1432:in `initCore'
>         from Ruby.java:1295:in `bootstrap'
>         from Ruby.java:1220:in `init'
>         from Ruby.java:330:in `newInstance'
>         from Main.java:258:in `internalRun'
>         from Main.java:217:in `run'
>         from Main.java:197:in `main'
> Thanks,
> Murali
>
>
>
>
>
>
>
>
> christian wrote in post #1163244:
> > just my first thought:
> >
> > unless you need to "install" jruby. the quickest way to run jruby is to
> > take the jruby-complete jar (http://jruby.org/download) and execute
> > jruby
> > with ```java -jar jruby-complete.jar```
> >
> > - christian
>
> --
> Posted via http://www.ruby-forum.com/.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>