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

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

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.


1 Reply Last Post 13.09.2020, 22:25 GMT-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 login with a confirmed email address before reporting spam

Posted: 4 years ago 13.09.2020, 22:25 GMT-4

Have you dealt with the problem well,I have the same problem as you

Have you dealt with the problem well,I have the same problem as you

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.