Skip to main content
14-Alexandrite
January 28, 2023
Solved

Getting Started with OTK Java Free

  • January 28, 2023
  • 1 reply
  • 7128 views

Hi All,

 

I’m trying to get to grips with the OTK Java Free toolkit to create a fairly simple tool to just output the top level assemblies from an assembly as STEP files. However, I can’t even get the sample code from the Creo install to work, including the install test  -which randomly requires a deprecated config.pro option that pops up a warning about needing a code to enable it. 

Does anyone have some good tutorials on getting a simple OTK Java free (formerly J-Link) program to work. Even just a hello world example? 
Thanks in advance. 

Best answer by Chris_Johnson

Hi Martin,

 

Thank you for this, it has been very helpful. I actually managed to solve my issue eventually. I realised that I had missed a / from my protk.dat, so my text folder said C:ptc/<app name>/text instead of C:/ptc/<app name>/ 

 

I asked tech support about it and they spotted it almost immediately. It's amazing how you just can't see things right in front of you at times!

 

Thanks again for your help.

 

Chris

1 reply

tbraxton
22-Sapphire II
22-Sapphire II
January 28, 2023

Have you explored all these tech articles?

https://www.ptc.com/en/support/article/CS76124 

 

3rd party information:

http://missingmanuals.blogspot.com/ 

http://inversionconsulting.blogspot.com/2009/06/proe-java-jlink-getting-started-2.html 

 

If you need a solution fast and want to retain a consultant for training or to create your apps then check this vendor:

https://www.felcosolutions.com/ 

14-Alexandrite
January 30, 2023

Thank you, this has got me started, I set everything up using the instructions from your second link and it all compiled and I could link it to Creo.

 

However, I now get an error about licensing, but from what I can tell the code doesn't call any of the prohibited classes in the otk.jar file. I used this article for reference: Article - CS188737 - What are the differences between J-Link and Object Toolkit Java API in Creo Parametric ? (ptc.com) Any ideas what is causing this?

 

Thanks again.

24-Ruby III
January 31, 2023

@Chris_Johnson wrote:

Thank you, this has got me started, I set everything up using the instructions from your second link and it all compiled and I could link it to Creo.

 

However, I now get an error about licensing, but from what I can tell the code doesn't call any of the prohibited classes in the otk.jar file. I used this article for reference: Article - CS188737 - What are the differences between J-Link and Object Toolkit Java API in Creo Parametric ? (ptc.com) Any ideas what is causing this?

 

Thanks again.


Hi,

simply check whether your code imports or refers to WFC or UIFC classes (taken from CS188737).