-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:jshell task :classes not found, be sure to compile the project first #4
Comments
@toonvanacker don't worry about that, the plugins always check whether it can execute the I should add a check to avoid the warning, but what I'm trying to say is that the message does not mean that the |
Thank you for the quick response! I mistook this warning for the root issue then. I should have been clearer from the start: my main issue is that JShell immediately exits, like so:
I'm using some Java 13 preview features, but I'm not sure if that would be at all related. |
🤔 checking your output, the JShell console is executed, but intermediately terminated but no clues why:
Could you try again as follow? execute the
If it does the same, the last instruction pleace add the Also, what unix shell are you running? Bash? or an alternative like Zsh? If the last, could you please execute it within a Bash console? just execute in your Zsh console |
I'm running Bash, so that probably isn't the issue. Sadly, neither of the above two suggestions worked out. If you have any further suggestions, I'm more than willing to try to help pinpoint the issue. If you don't have the time, that's alright. I assume it works fine for most people, I'm probably hitting some strange edge case. |
Sorry, I tested in the past the plugin only with Java 9 (the minimal version required) and 11 (the latest LTS by the way) and it was working, now testing it with Java 12, 13 and 14 I realized it fails in the same way it's failing you: executing the Jshell and then immediately exiting the process, and it was reported also in #1 but i did not pay attention on that time because I was implementing a refactor. So the good news is that at least we know why is failing: it does not work with Java 12+, and I will try to fix the problem next week, meanwhile you can try it with Java 11. If it is a problem to downgrade your Java version installed, I recommend you to setup SdkMan!, I use it and it's an amazing tool to setup different environments in the same computer and without breaking the system installation. |
Thanks for the update! |
@toonvanacker I made some tests yesterday and I couldn't figure out why the API the plugin uses to launch the JShell stops to work correctly since Java 12 when launched with Gradle. I think is related with the really bad way Gradle manages the standard input and output streams, that also cause the autocomplete and history futures built in the JShell to not work, I'll add in the README a warning about the incompatibility, but at least for now I don't have more time to investigate the issue 🤷♂️ |
I appreciate the effort, in any case. Hopefully one day it'll be fixed. |
BTW, what it works with Java 12+ is to run JShell script in a .jsh file, quote from the README:
But once executed the instructions in the .jsh file, the session is also exited, but at least it allows you to run a small script without run the all application. |
I had the same problem with JDK14.
|
Closing this because won't be fixed, and don't have any effect in the final outcome, the problem of JShell being exited earlier is not related with this, that error was fixed and the patch released yesterday: check out 1.1.0. |
Even when running
I still get the message
I haven't been able to figure out what could be causing this. Could you point me in the right direction?
I'm using Java 13.0.1 and Gradle 6.5 on macOS Catalina (10.15.4).
The text was updated successfully, but these errors were encountered: