6

I'm trying to build an online java editor. I need the functionality that enables me to report the compilation errors to the user on clicking submit if there are any. I'm curious to know if there are any javascript libraries out there that I could use off the shelf to do this.

4
  • You really want to build a JVM in javascript? Commented Jul 5, 2012 at 20:48
  • Well not a JVM but a Java compiler. Commented Jul 5, 2012 at 20:53
  • Yeah, I think there's no big difference - after having it "compiled", there is not much work to execute it (unless you really create binaries) Commented Jul 5, 2012 at 20:56
  • @HarshalPandya - did you ever find a compiler in JS? Commented Dec 4, 2015 at 3:19

1 Answer 1

2

Take the text and call javac on it on the server side, send back the results in some structured way and display on the client side

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

1 Comment

That is exactly how I have implemented it at the moment. I just wanted to know if there was anyway I could save the calls to the server. As in make the call only if the code is free of compilation errors.

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.