Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Basic J-Link Use

conrat

New member
Hi,



I have been working with Java for a little while. I am not
extremely skilled in it yet, but it appears to be similar to other
programming languages and I have already made a few small programs to
calculate various things.



The thing is, I want to tie these calculated values to Pro/E, so that I can update pattern spacing and other features.



However, I seem to be having problems getting my Java apps to connect
to Pro/E. I n fact, even the sample apps to do not run. The
only one I got to run properly was the "InstallTest" sample app.



When I try to load the class file for my app, I get the following error:



Application Main failed to start: Exception: ciplib:XNativeException
smiley7.gif




I am using Main as the app name, Main.class as the class file, and start and stop for the start and stop methods.



I have searched all over the Internet for something to enlighten
me. I even checked PTC's site with no luck. The API
documentation does not contain these terms either.



Any idea of why it won't load? I get this error even if I comment
out all PTC specific code, so that none of the PTC classes are being
called. It runs fine at the command prompt.



Please let me know if you need further information.



Thanks,

Jim
 
I do not use main in my ProE programs. I use the protk.dat file to identify the java code

PROTK.DAT FILE

==========================================

name TepsMenu

startup&nb sp; java

java_app_class TepsMenu

java_app_start tepsStart

java_app_stop tepsStop

java_app_classpath TepsMenu.jar

text_dir .\text

allow_stop true

delay_start false

end



Java Class

=======================================

public class TepsMenu

{

public static void tepsStart()

{

//your java code goes hered

}//close method tepsStart



public static void tepsStop()

{

}//close method tepsStop

}//close class TepsMenu
 
Thanks. I ended up starting over and used the Install Test app as
a starting point. I ended up getting the Install Test and my app
working, though many of the PTC examples still will not run. I am
getting much more confident in J-Link though. I am thinking that
some of the problem may be running Java 2 with Pro/E 2001. I am
not sure if they support this and wonder if when we upgrade to Wildfire
2, these probelms will go away.



I will let you know how it goes.



Thanks again,

Jim
 

Sponsor

Articles From 3DCAD World

Back
Top