Skip to main content
1-Visitor
February 10, 2020
Question

Where to place third party library (*.jar) file for customized java class execution

  • February 10, 2020
  • 1 reply
  • 1758 views

I developed a customized class and it works well with Creo Schematics API method call.  I would like to extend my class and it needs to call some third-party methods (google guava for example).   The code has no issue to get compiled and I place the *.jar file to same direction as my customized class and I also try to place it in lib direction but my methods cannot call anything from *jar file (throw exception that class not found).

 

Where is the right folder I should put the *jar file?

 

 

1 reply

21-Topaz I
February 11, 2020

there are multiple folders you can set. Let me drop them in no particular order:

  • the config option add_java_class_path
  • the Windows environment CLASSPATH that you can set from:
    • Windows Control Panel
    • from your start script
    • from Creo's psf file (see the footer)
  • the keyword from the protk.dat : java_app_classpath

try them all.

 

 

 

 

RLEECI1-VisitorAuthor
1-Visitor
February 12, 2020

Thanks for the help. 

(1) there is no config file with .DAT. I found config.bin but this file cannot be opened with notepad.

(2) I will try this if it works 

(3) There is no protk.dat for Schematics API so I cannot try this.