Skip to main content
7-Bedrock
June 15, 2012
Solved

Configuring J-Link in Creo 2.0

  • June 15, 2012
  • 4 replies
  • 15769 views

Hello everyone,

 

We are currently in the process of evaluating Creo 2.0

One problem that we can not seem to solve is configuring our J-Link application (which runs succesfully in WildFire 5.0) in Creo 2.0

There seems to be something wrong and I hope someone on this forum already has experience with J-Link in Creo 2.0

 

This is the current configuration which works in WildFire 5.0

  • C:\Projects\Shape\Shape.jar is the JAR file to be used by J-Link
  • C:\Projects\Shape\Text\shape.txt is the text file used in the application
  • Environment Variable "CLASSPATH = C:\Projects\Shape\Shape.jar"
  • Protk.dat file located in C:\ptc\proeWildfire 5.0\text

name Shape

startup java

java_app_class Shape

java_app_start start

java_app_stop stop

allow_stop true

delay_start false

text_dir C:\Projects\Shape\text\

revision 0.0

end

 

This is the configuration which does not work in Creo 2.0

  • C:\Projects\Shape\Shape.jar is the JAR file to be used by J-Link
  • C:\Projects\Shape\Text\shape.txt is the text file used in the application
  • Environment Variable "CLASSPATH = C:\Projects\Shape\Shape.jar"
  • Protk.dat file located in C:\ptc\Creo 2.0\Common Files\F001\text

name Shape

startup java

java_app_class Shape

java_app_start start

java_app_stop stop

allow_stop true

delay_start false

text_dir C:\Projects\Shape\text\

revision 0.0

end

 

As you can see, the only difference is that we copied the WildFire 5.0 'Protk.dat' file to C:\ptc\Creo 2.0\Common Files\F001\text

 

If someone has anything to add, please do.

 

Kind regards...


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by BrianMartin

Hi Koen...

Did you try the J-Link Install Test application I referenced in the above thread? If the test application doesn't work, maybe you have an issue with the JRE. If it does work, then it sounds like you have an issue with your specific setup.

If the test works, I'd steal one of PTC's protk.dat files and modify it to point to your classpath and text_dir. Let us know what the results are.

In your listing above, your text file is in the directory ...\Text while your "text_dir" is pointing to ...\text (lowercase "t"). I know this shouldn't matter but at this point anything is worth a try.

Thanks!

-Brian

4 replies

12-Amethyst
July 6, 2012

Koen -

I am having the same problem here with my J-Link programs, they work fine in WF5, but fail everytime in Creo 1 and 2 - have you had any success with yours yet?

Thanks,

Josh

13-Aquamarine
July 6, 2012

Hi Josh and Koen...

Have you both made sure to add the pfc.jar archive into your CLASSPATH? From what I recall, you're supposed to have your own classes in CLASSPATH but you're also supposed to keep the default pfc.jar as well. Not sure if this will help, but it's worth a try.

Also, the J-Link documentation specifically says you need to be using the java_app_classpath field in the registry file. I didn't see this in Koen's listing. I'm not sure if this is a new requirement or not but it could be important. Upon further investigation, I don't even see PTC using this field in their own .dat files so maybe it's not relevant.

One final note... have either of you tried the J-Link Install Test application? Look at pg 420 in the Creo 2.0 J-Link User's Guide. If you look in the <loadpoint>PTC/Creo 2.0/Common Files/F001/jlink/jlink_appls directory and dig around in some of the subdirectories there, you'll find a good number of protk.dat files. I noticed one minor thing by checking these out...

In Koen's listing for text_dir he shows "C:\Projects\Shape\text\" but all of the PTC files would not have the trailing "\" on the directory. PTC shows no trailing "\" so maybe try that text_dir setting as "C:\Projects\Shape\text" instead??

One final idea... maybe the protk.dat file isn't being read correctly. Can you load the applications manually and get them to work? It's possible to manually point to the protk.dat file for instances where you don't want the application to load upon startup. Are you able to load your J-Link application after Creo is running? If so, maybe you need to add a line to your config.pro to reference the location of the protk.dat file. I can't find any documentation that says the location of the file should be moved... but now that we're using the new "Common Files" location, maybe the protk.dat files need to go someplace else? If so, you can always point to them using the config.pro option protkdat. There's also some notation about a new option labeled creotkdat but I couldn't find much on it.

I know that's a scattered bit of advice but maybe something in there will be helpful!

Thanks... and good luck. Please write back and let us know if we've made progress or if none of these suggestions worked.

-Brian

12-Amethyst
July 9, 2012

Brian -

Thanks for the suggestions - these are all excellent ideas to try, but I have already tried them and unfortunately none seem to yeild any better success. I am able to load the protk.dat file into session (mine does include the java_app_classpath line and does not have trailing '\' on any path) both manually and through the config.pro file, but when I try to start the program I get a 'Program Failed to Start' message.

I have also tried editing the code to remove the functions that placed the program command in a menu since this is no longer supported, and I recompiled it with the new j-link classes in the most recent (M010) release. None of this has had any effect.

For reference, in WF5 we run the programs from a network location, calling the protk.dat file from our standard config.pro file and the java_app_classpath line makes it possible to run the program without having to add the CLASSPATH variable to every user's computer (not that that is hard to do, but it shouldn't be necessary).

Well, I will keep plugging away at it and hopefully a solution will present itself sometime soon...

Thanks,

Josh

1-Visitor
July 11, 2012

各位大师,你们好,我在安装CREO2.0时,按照正确的步骤来安装,可是,启动时,系统总是发出警告说需要CREOSIM_SSQ. 请问,那是什么呀?

1-Visitor
September 6, 2012

Too day I'm unsuccessfully trying to run on StartInstallTest jlink in Creo 2 M10,
I get a message in the trail file and dilog:

Message Dialog: Warning Startup of application "InstallTest" failed.

I try different jre, CLASSPATH and set CREO with the standard jre that does not help.


Maybe somebody knows how to turn on DEBUG log CREO to understand the cause of this error.

Or post working configuration.

12-Amethyst
September 6, 2012

You probably have to add the location of the custom classes to your classpath (or use other methods of pointing Creo to the custom classes). I compiled the code and changed the included protk.dat file as shown below and it started (this is the method I use to locate the custom classes, there are others). Once it starts you can't do anything with it because the code is obsolete for the new ribbon interface - the command is not designated to be added to the ribbon. Read the user guide to learn more about that.

protk.dat:

name InstallTest

startup java

java_app_class StartInstallTest

java_app_classpath C:\Program Files\PTC\Creo 2.0\Common Files\M010\jlink\jlink_appls\install_test

java_app_start start

java_app_stop stop

allow_stop true

delay_start false

text_dir C:\Program Files\PTC\Creo 2.0\Common Files\M010\jlink\jlink_appls\install_test\text

end

1-Visitor
September 7, 2012

Thanks, problem solved, for fine work jlink in Creo 2 need set jre path in config.pro file.

1-Visitor
December 11, 2012

@ Brian J-Link Install Test application. Please help i can't find it I am using Creo2.0

7-Bedrock
January 22, 2014

...\Creo 2.0\Common Files\M090\jlink\jlink_appls\install_test