Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Error running java class. - Detail: Security preference 'File system access' does not allow 'read' access to "file.stp"
Posted 26 nov 2017, 16:02 GMT-5 Version 5.3 2 Replies
Please login with a confirmed email address before reporting spam
Hello.
I'm writing a COMSOL model file using the Java COMSOL API, and I'm encountering a problem with running the files in batch mode. In particular, when I put in the code to import a CAD stp file: model.geom("geom1").feature().clear();
model.modelPath("D:\ION\NEW_DATA");
model.component("comp1").geom("geom1").create("imp"+i, "Import"); model.component("comp1").geom("geom1").feature("imp"+i).set("type", "cad"); model.component("comp1").geom("geom1").feature("imp"+i) .set("filename", "D:\NEW_DATA\DrystoreLayer_"+i+".stp"); model.component("comp1").geom("geom1").feature("imp"+i).label("DrystoreLayer_"+i); model.component("comp1").geom("geom1").feature("imp"+i).importData(); model.geom("geom1").run("fin"); When I try to run the model in batch mode using When I try to run the model in batch mode using
comsolbatch -inputfile <file.class> -outputfile <output.mph> -batchlog <log.txt>
it doesn't run successfully. Also using the builder or importing the.class file I got this error Error running java class. - Detail: Security preference 'File system access' does not allow 'read' access to 'D:\NEW_DATA\DrystoreLayer_1.stp'.
It is something related to the Java Security Management! Do you have any idea how to solve that ? I tried with java.policy but it still not worked. My JDK and JRE are 32 bits! Can that be the problem ?
Best Regards,
Ion