Open sberyozkin opened 3 years ago
That's because the generated path uses jshell and it runs the following:
/home/ggastald/.sdkman/candidates/java/current/bin/jshell -Djava.util.logging.manager=org.jboss.logmanager.LogManager --class-path=/home/ggastald/.jbang/cache/jars/main.java.3ecc6e5945ddb5560d324568ec2caae63febafbf794206fbadf0ad4b82c8290c.jar:...
Which I think it is missing a -R or -J:
/home/ggastald/.sdkman/candidates/java/current/bin/jshell -R-Djava.util.logging.manager=org.jboss.logmanager.LogManager --class-path=/home/ggastald/.jbang/cache/jars/main.java.3ecc6e5945ddb5560d324568ec2caae63febafbf794206fbadf0ad4b82c8290c.jar:...
BTW removing the flag or putting the -R
or -J
prefix still fails the execution with:
Error:
package io.quarkus does not exist
int userMain(String[] args) { return io.quarkus.runner.GeneratedMain(args);}
^---------------^
| Welcome to JShell -- Version 11.0.11
| For an introduction type: /help intro
jshell>
Is it missing users own jar ?
Btw. Even when we fix that we don't have a way to run quarkus non-blocking / in background so you can interact with it from jshell.
@stuartwdouglas you see a way to run quarkus in background and be able to interact with it from jshell ?
just saw https://github.com/bitterfox/JavaFXSupportsForJShell which use --execution flag on jshell to allow executoin on jfx thread....could be interesting to explore for quarkus too
In Quarkus, after doing
quarkus create cli --jbang
and then moving to the generatedcode-with-quarkus
and runningjbang --interactive src/main.java
reports:Note adding a package declaration to
src/main.java
makes no difference