Skip to main content
14-Alexandrite
Jan 28, 2023 8:44 AM UTC
Solved

Getting Started with OTK Java Free

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. 

14-Alexandrite
Feb 8, 2023 10:32 PM UTC

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

8 replies

tbraxton
22-Sapphire II
Jan 28, 2023 1:29 PM UTC

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/ 

Translate
14-Alexandrite
Jan 30, 2023 1:53 PM UTC

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.

Translate
24-Ruby III
Jan 31, 2023 5:06 PM UTC

@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).

Translate