Using JShell class in JDK
so theres this class JShell that can be used same as the cli app, how can i instantiate and use it correctly? any examples?
8 Replies
⌛
This post has been reserved for your question.
Hey @Koblížkáč! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
JShell (Java SE 21 & JDK 21)
declaration: module: jdk.jshell, package: jdk.jshell, class: JShell
What exactly do you want to do?
hmm i see, do you know if it would be possible to add a URL/InputStream as classpath?
how exactly?
what does it point to?
well, lets say i execute it like this but its missing dependencies i have in the app which is executing it, so i want to add them to the jshell cp
but they are loaded dynamically with custom classloader
so they cant be added as class path
JShell.Builder (Java SE 21 & JDK 21)
declaration: module: jdk.jshell, package: jdk.jshell, class: JShell, class: Builder
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.