Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I recently solved a problem I had in J-Link that could be of interest to others.
I wanted to use a library as part of my J-Link program. The library is org.netbeans.swing.outline . My program uses somewhere deep down the class ETable, which has an initialization that uses a resourcebundle for localization.
Specifically it sets up a field for a sting that directly loads a resource Bundle.properties.
private String selectVisibleColumnsLabel =
java.util.ResourceBundle.getBundle("org/netbeans/swing/etable/Bundle").getString("LBL_SelectVisibleColumns");
At first this gave me an error,
java.util.MissingResourceException
because it could not find the resource.
The library itself loaded fine, as I have been repackaging my jar to include all libraries. (Not the best practice, but easier than adding many libraries to the protk.dat)
Using Creo 8.0.8.0 and Java 11.
Solved! Go to Solution.
The problem and solution were in the classpath for my application.
Article CS309245 (https://www.ptc.com/en/support/article/CS000309245) lists 3 ways to set up a classpath.
I was using option 3 so far, with all my libraries and my program repackaged into a single jar.
I had to use option 2, to get this bundle to load, and to resolve my problem.
In my config.pro I added a line with keyword add_java_class_path and as value, the location of that library.
While using option 3, my classpath did not show the library. With option 2, my classpath does show the added library.
I hope this can help others.
The problem and solution were in the classpath for my application.
Article CS309245 (https://www.ptc.com/en/support/article/CS000309245) lists 3 ways to set up a classpath.
I was using option 3 so far, with all my libraries and my program repackaged into a single jar.
I had to use option 2, to get this bundle to load, and to resolve my problem.
In my config.pro I added a line with keyword add_java_class_path and as value, the location of that library.
While using option 3, my classpath did not show the library. With option 2, my classpath does show the added library.
I hope this can help others.