I previously had box running fine on Windows 10, but I’m not on Windows 11. I grabbed the latest version (with JRE), and now when I run box.exe I get:
<JAVA_HOME>/lib/ext exists, extensions mechanism no longer supported; Use -classpath instead.
.Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I can run java at the CLI and it doesn’t throw an error.
I’m not sure why you’re getting this error-- I’ve never seen anyone with it and it’s really coming from Java itself, nothing to do with CommandBox.
Did you check and see if the “jre” folder that came with CommandBox had a “lib/etc” directory in it? I just downloaded the latest Windows 64 bit “CommandBox with JRE” download and there is not one in there. So if your hard drive has one, you probably unzipped or copied the JRE file over an existing installation or something odd.
Whether or not this is a useful test depends on which version of java you ran. If you simply opened up a command window and typed java then tha was running whatever version of Java is found on your Windows PATH env var (where java). However, if you downloaded the “JRE included” version of CommandBox, then CommandBox is using the version of Java in the JRE folder, not the one on your path. In order to test if that version of Java was corrupt, you’d need to actually run something like
Sorry, the etc was a typo on my part-- I meant ext. That’s the folder Java is telling you it doesn’t like. So, it seems pretty clear why it’s erroring. Like I said, I checked the download and there is no ext folderin there so if you have one, that means you did something on your end to create it. Perhaps you can find some information on a Java forum since this is a java issue, but my recommendation is really just to either delete the folder and see what happens, or delete the entire JRE in case it’s corrupt and re-extract it.
Which directory exactly and what command exactly? I just manually created an ext folder in my JRE’s lib directory and I can confirm that both CommandBox and
throw the error you reported here. And when I remove the errant directory, the java help works again as does CommandBox. (Note the working directory of the version command above doesn’t really matter since you use the full path to java.exe to remove all ambiguitiy)
It sounds like it all comes down to the lib/ext directory existing and somehow getting created on your machine even though it’s not in the download. You’d need to troubleshoot that. I don’t have Windows 11 to test and it seems to work fine on Windows 10.,