As Java 9 introduced the concept of JShell which enables us to write code without creating a class and a method, is it possible to use this feature of Java 9 in eclipse ?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
If this is not a feature ask for Eclipse, a very basic stub that you can come up with is:
When you execute this, you can further use your debug console as JShell in your IDE.
Sample screenshot:
You can use the TM Terminal to run JShell in Eclipse:
"C:\Program Files\Java\jdk-9\bin\jshell" -v
followed by EnterAlternatively, you can use a Scrapbook Page, a built-in feature of the Eclipse Java IDE and which also works with older Java versions. You will have code completion and you can use Java classes of your project: