2

I am writing a an interface for a web application that requires a user to write a small blob of Java in a JavaScript text area. I would like to know if there exists an editor written in JavaScript that can do Java syntax checking? Google searches produce JavaScript editors but no Java Editors written in JavaScript. (Granted, I only looked 5 pages deep)

2 Answers 2

5

Do you need syntax checking (i.e. checking if the code is valid and compilable), or just syntax highlighting (making it pretty colors)? If the latter, then search for a syntax highlighting editor, not "Java editor."

If you need actual syntax checking you'll probably need to either do that on the server side (with an Ajax call) or write a Java applet to do it in the page. Writing a Java parser in JavaScript is certainly possible, but probably beyond the practical scope of what you're trying to do.

Either way, this Wikipedia article would be a great place to start: Comparison of JavaScript-based source code editors.

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

Comments

0

You might get some ideas from this Wikipedia page.

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.