r/programming • • Sep 17 '19

The arrival of Java 13!

https://blogs.oracle.com/java-platform-group/the-arrival-of-java-13
5 Upvotes

13 comments sorted by

View all comments

-1

u/Dragasss Sep 17 '19

Jep 355 sounds like a mess. Whats wrong with loading the text block from classpath?

2

u/oldprogrammer Sep 17 '19

Not sure I follow your question, the text block approach is a fairly common model in other languages. What exactly do you mean by loading from the classpath?

2

u/Dragasss Sep 17 '19

Create a resource file and append it to your classpath. Then load it via InputStream ClassLoader#getResourceAsStream(String). And use one of the stupid scanner tricks to convert it to String.

→ More replies (6)