jbangdev / jbang-idea

IntelliJ IDEA plugin for JBang
https://plugins.jetbrains.com/plugin/18257-jbang
MIT License
20 stars 9 forks source link

Can't run groovy scripts in powershell (Jbang version 0.117.1) #113

Closed BillKress closed 1 month ago

BillKress commented 1 month ago

This error reports as:

This happens even with Hello.groovy as long as you run it in powershell.

Error: Could not find or load main class .grape.enable=false Caused by: java.lang.ClassNotFoundException: /grape/enable=false

The groovy script runner sets an option -Dgroovy.grape.enable=false to disable grape, however powershell treats the = specially. I don't use other -D= options, but I assume they might cause problems as well.

The fix is to put quotes around the option.

Workaround? Use CMD or bash for now.

Great application, thank you!

BillKress commented 1 month ago

I just realized this is the idea integration and not the jbang area. Hopefully this closed the ticket and I'll go re-enter it in the correct area.