Site Overlay

Bitcoin 43085

Stack Overflow for Teams A private, secure home for your team’s bitcoin 43085 and answers. M9 1a8 8 0 1 0 0 16A8 8 0 0 0 9 1zm.

Where I could just throw a line or two of java into it and it would output the result? This question appears to be off-topic. The users who voted to close gave this specific reason:”Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. If this question can be reworded to fit the rules in the help center, please edit the question.

It’s not online but might do what you want. Bear in mind that Java is a staticaly typed compiled language so it’s not possible to interactively interpret strict Java syntax. But then, any online interpreter sandbox even for an interpreted language like Python is going to have massive limitations. There are some interpreters for C described here: stackoverflow.

True, it is not an interpreter as in the sense of the question, so a fair downvote. Jython is not a Java interpreter. It’s an implementation of Python for the JVM. The downvote was very unjustified, for the reason explained. Jython is very useful when exploring a Java API. If you require the interpreter to support Java syntax exactly, then ideone. If you want to evaluate Java snippets, you could use a Groovy interpreter.

Java code is generally valid Groovy too, and Groovy doesn’t force you to define a whole class. I installed it on Fedora with yum install bsh but how do I run it? If you have Groovy installed, the Groovy Console also works with Java Code. I like the Groovy Console but Groovy is not Java. You can type in a Java program and it’ll compile it and then run it for you and display the output.

Here’s a hello world example I just typed in. Oops, I forgot to declare main as static! GRASP contains a very useful interpreter that I’ve used to check small portions of code and do minor string processing. This may still be the recommended IDE for beginning CS students at Auburn University.

When I was still in uni, I always coded Java in Netbeans with jGRASP open in the background for exactly this usage. Not the answer you’re looking for? Browse other questions tagged java or ask your own question. Is there an interpreter for C?