jbang
jbang copied to clipboard
Path error stops jbang finding parameter main class
On Windows 10 Powershell I get an error saying it can't find the main class to load. This looks like a failure to cope with spaces in the path:
PS C:\WINDOWS\system32> jbang "C:\systemsincode\Java\jbang\jbangHelloWorld.java"
Could Not Find C:\Users\Matthew O'Surname\.jbang\31237.tmp
Error: Could not find or load main class O'Surname\.jbang\cache\jars\jbangHelloWorld.java.29e25d772ac7cc3c03799c4ab6cc6061d8d0999846df1db70f534a5a69c94866.jar
Caused by: java.lang.ClassNotFoundException: O'Surname\.jbang\cache\jars\jbangHelloWorld.java.29e25d772ac7cc3c03799c4ab6cc6061d8d0999846df1db70f534a5a69c94866.jar
Even thought it exists in the right location:

What version of jbang are tou running here ? Latest change radically how windows script was done.
I got it off the latest default chocolately install last night (0.33.0)
Most likely has to do with the space in the path name. Seems to me we should be quoting more than just the user-supplied arguments, but also (some? all?) of the arguments Jbang generates itself.