This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Languages and the fly likes Jruby newbie question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Jruby newbie question" Watch "Jruby newbie question" New topic
Author

Jruby newbie question

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
hi all,

i read that jruby is a Java implementation of the Ruby interpreter.

what is an interpreter? is it like a ide?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

An interpreter is a program which reads code in some computer language and immediately executes it. Some languages, like Java, are "compiled" into a special format (class files, in Java's case) before being executed, while other languages, like Ruby, are interpreted, with no intermediate format. jruby is a Java program you can just run from the command line to execute your Ruby code.

An IDE for Ruby will generally include an interpreter so you can execute the code you're working on; but an IDE is something different altogether from an interpreter.


[Jess in Action][AskingGoodQuestions]
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
thank you for your reply.

so ruby does not need to be compiled?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

No, it does not. You can run the Ruby (or JRuby) interpreter interactively, and type in a line of code and see it executed immediately. Of course, you can also save your code in one or more files and run it all at once.
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
i see. learn something new again.

thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jruby newbie question
 
Similar Threads
Ruby in Java *--------* Java in Ruby
Getting JRuby working in Ubuntu with Ruby Development Tools
Ruby (or JRuby) and JMS
Use on platforms other than the pc
Deploying/Distributing Clojure App