I've been attempting to utilize the following command in my JavaScript:
var file = new Java.type("java.io.File");
Unfortunately, I'm encountering an error:
Uncaught ReferenceError: Java is not defined
Can anyone provide guidance on how to successfully integrate this Java library into my code? I need it for executing functions like file.listFiles()
.
Thank you in advance.