user3276091
user3276091

Reputation: 263

How to create a text editor that can "run Java code" in an application?

This is the prototype of my project

enter image description here

Is there a pre-built Java text editor that I can embed so that the syntax will be just like Java?

Upvotes: 4

Views: 160

Answers (1)

Ricardo Veguilla
Ricardo Veguilla

Reputation: 3155

Using Java ScriptEngine you can embed different scripting languages in your application, including BeanShell which is based on Java.

Check Java Scripting Programmer's Guide and Where can I find a list of available JSR-223 scripting languages? for more information.

Upvotes: 2

Related Questions