1

Is it possible to implement a program written in Java on a website coded using Ruby? Currently developing a website where data from a form must be taken in, parsed, and used to fill out objects in the application. Currently a Java Programmer which is why using Java to develop the application would be much easier. However, Ruby is similar enough that it will work if need be.

I know that there are applications such as JRuby that allow Ruby to be used in Java. Is the reverse true, and if so, how does it work?

2
  • Your question is unclear. What does it mean to "implement a program on a website"? Are you talking about writing a Java program in a web-based text editor written in Ruby? If that is your question, then yes, you can do that. You can write Java code in any text editor, it doesn't matter what language the editor is written in and whether it is web-based or a native desktop app. Commented Oct 5, 2016 at 18:30
  • 1
    "Currently a Java Programmer..." means what, exactly? You're a programmer. You can program. Just because you're unfamiliar with Ruby doesn't mean you can't figure it out. If you want to develop using Java because that's your core strength, by all means use Java and a similar framework, but if you're intending to use Ruby, use Ruby. Commented Oct 5, 2016 at 18:58

2 Answers 2

2

JRuby allows you to call Java from Ruby as well: https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby

Before going this route, if you prefer to write your web application in Java (you mentioned that you are more comfortable with Java), why not use Spring Boot? Spring Boot lets you develop with minimal setup like Ruby on Rails.

Sign up to request clarification or add additional context in comments.

Comments

0

You can go the jRuby way and mix Ruby and Java and yes it wors in both directions. See this wiki for examples and how to.

CallingJavaFromJRuby

In theory you can call a java Jar and catch the results in Ruby but for a website I advise against it.

You could present the Java functionality as a webservice but you could program the whole thing in Java or Ruby also.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.