question-circle How to config a class diagram to run Java application?

3 weeks 4 days ago - 3 weeks 4 days ago #5050 by kenny
I followed the Java Designer tutorial and created a compilation artefact for my class diagram. Afterwards I set the "Main class" attribute of the artefact to the class that I want to launch.

Let's say, the artefact has a name simulator, and my main class has a name MainSimulator, which contains a static public method main(string []). I could generate the java code and compile, but when I clicked "Run application", I got the following error:

Lauching application
java -classpath "/Users/kenny/modelio/workspace/Simulator/bin/simulator.jar:/jre/lib/rt.jar" MainSimulator
Error: the main class MainSimulation cannot be found.

Execution done

My question is: how can I configure my model such that I can run a java application? It seems that it is doable with this option.

The version info:
Version 3.7.01
Build: 201803142330
System: macosx (10.12.5) 
Architecture: x86_64

BR

/Kenny

Please Log in or Create an account to join the conversation.

3 weeks 21 hours ago #5058 by pan
Dear kenny,

In the error, you have "the main class MainSimulation cannot be found" but the class is MainSimulator.
Are you sure that you used the right name for the JavaMainClass?

Please Log in or Create an account to join the conversation.

Moderators: oslcde
Time to create page: 0.026 seconds
^ Back to Top