Exporting java application to runnable jar file

Александр Ляпин

Please login with a confirmed email address before reporting spam


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.

0 Replies Last Post 9 avr. 2020 à 13:43 UTC−4
COMSOL Moderator

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.


Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.