cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

jLink Java application startup failed - Creo 7 + JDK 11

JurajKosmel
7-Bedrock

jLink Java application startup failed - Creo 7 + JDK 11

Hello,

 

We have 3 jLink (java) applications/plugins correctly running on PTC Creo 7 + Java 8. Now we're testing Creo 7 + Java 11 (because of future upgrade to Creo 9/10 with Java 11). We've compiled plugins files with a same JDK11 but one of the plugins fails running with message 'Startup of application "app name" failed.' Plugins configuration is same, they're using same otk/pfc dependency, same java version for compilation and same Creo 7 instance. 

 

I've found this article but most of points are not suitable as other two plugins are running properly. Is there a more detailed log file of creo application startup to see any detailed information what goes wrong when starting plugin? Any other idea how to debug/investigate it?

 

Thank you very much.

8 REPLIES 8

Hi,

I hope you tried starting only 1 problematic application.

If you are active customer then you can contact PTC Support.


Martin Hanák

Yes, I tried several ways, even starting it separately, but no success yet. Juraj


@JurajKosmel wrote:

Yes, I tried several ways, even starting it separately, but no success yet. Juraj


Hi,

my suggestions:

 

1.] cut the application code, compile it and test it

If it works then return part of the program code -AND- repeat the same procedure.

If it does not work then cut part of the program code -AND- repeat the same procedure.

 

2.] send the code to PTC Support and ask them to test it

I am not sure if PTC Support will help you because Creo 7.0 is not supported anymore.


Martin Hanák

I've tried several options/java versions and whatever and finally I'm able to start plugin to a Running state without fail (with most of initialization code commented out as it fails with it anyway) after editing creo config.pro file and moving lines

 

add_java_class_path path/to/openjfx
jlink_java_command java --module-path path/to/openjfx --add-modules javafx.controls,javafx.fxml,javafx.swing

 

before

 

add_java_class_path path/to/my/plugin/myPlugin.jar

 

Now I continue with the application code to find out what is failing there.


@JurajKosmel wrote:

I've tried several options/java versions and whatever and finally I'm able to start plugin to a Running state without fail (with most of initialization code commented out as it fails with it anyway) after editing creo config.pro file and moving lines

 

add_java_class_path path/to/openjfx
jlink_java_command java --module-path path/to/openjfx --add-modules javafx.controls,javafx.fxml,javafx.swing

 

before

 

add_java_class_path path/to/my/plugin/myPlugin.jar

 

Now I continue with the application code to find out what is failing there.


Hi,

I wish you good luck.


Martin Hanák

It's really weird. As I wrote before, moving the plugin add_java_class_path line after openjfx/jlink lines, the plugin is able to start, but other two plugins start then fails. When switching the lines back, the plugin won't start and other two plugins are running. And finally, when I comment out classpath entry for the failing plugin, the other two plugins are not able to start, even though there is no application dependency between plugins.

 

It seems there is some relation between lines order or order of loading plugins and their dependencies, but I can't see any sense there.

Finally I've found out that plugin which dependency is added as the first, is not able to run. I'm using this configuration in this order:
 
jlink_java_command java --module-path D:\java\javafx-sdk-17.0.13\lib --add-modules javafx.controls,javafx.fxml,javafx.swing,javafx.base,javafx.embed,javafx.graphics,javafx-swt
jlink_java2 on
add_java_class_path plugin\Creo7\lib\plugin1.jar
add_java_class_path plugin\Creo7\lib\plugin2.jar
add_java_class_path plugin\Creo7\lib\plugin3.jar
add_java_class_path plugin\Creo7\lib\plugin4.jar
add_java_class_path D:\java\javafx-sdk-17.0.13\lib\*
add_java_class_path Creo7\lib\fx-gson\3.1.2\fx-gson-3.1.2.jar
add_java_class_path Creo7\lib\gson\2.8.6\gson-2.8.6.jar
 
If I switch plugin1 path with other plugin, then the other plugin is not working. It's really weird and I have no solution/cause of it. I've even tried to create a dummy empty plugin and put its jar file on first place, but in this case whole Creo crashes on startup.

Hi,

If you want to save your time, then contact PTC Support, too.

Firstly try to run your plugins with "live" version, that means with Creo 8.0 or higher.

If you will be able to reproduce the problem then report it to PTC Support.


Martin Hanák
Announcements


Top Tags