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.
Exporting java application to runnable jar file
Posted 9 apr 2020, 13:43 GMT-4 API Version 5.4 1 Reply
Please login with a confirmed email address before reporting spam
Hello,
I am following COMSOL tutorial about making GUI app from Programming reference manual. Everything works fine when I am running application from IDE (eclipse), however when I am trying to export it as a runnable jar file and run from the command line (java -jar project.jar) I am getting exception:
Exception in thread "main" java.lang.NullPointerException at com.comsol.model.util.ModelUtil.a(SourceFile:44) at com.comsol.model.util.ModelUtil.initStandalone(SourceFile:396) at BeamModelDemo.init(BeamModelDemo.java:36) at BeamModelDemo.main(BeamModelDemo.java:227)
I've tried all options with exporting libraries (export, pack, copy to folder), but the result is the same. Does anyone can explain me the reason of this error? Or maybe there some source where I can read how to properly deploy comsol-java projects?
Thank you.
Hello Александр Ляпин
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.