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.

Problem with jlink

ajoy

New member
my java files are not correctly loading correctly in PRO E 2001 after the reinstallation of PRO E . plz help me my environmental variables are


CLASSPATH


D:\link\ajoy\models\bb;D:\PTC\proe2001\text\java\pfc.jar;D:\ PTC\proe2001\text\java\cipjava.jar


PATH


D:\jdk1.4.2-\bin;D:\jdk1.4.2-\jre\bin;%PATH%


PRO_JAVA_COMMAND


java com.ptc.pfc.Implementation.Starter
 
Was the reinstallation an different build? This can cause problems with pointing to j-link jar files from an different build than the version of pro/e that you are running. I have found pro/e will add these to the classpath without you doing it.

Do you have a "." as the first in your classpath? If you are starting your app automatically:
1. Is your jar file in the classpath?
2. menu file needs to be copied to the startup directory.
3. message file needs to be copied to the working directory.

I usually use a bat file to set my variables up. Here is an example:

echo on

E:

cd\

cd proe2001\startup\test_inch

SET MTJ_HOME=E:\proe2001\apps\mechtoolsj_v1.0.4

SET CLASSPATH=.;%MTJ_HOME%\mechtoolsj-1.0.4.jar;%MTJ_HOME%

SET PRO_JAVA_COMMAND=java com.ptc.pfc.Implementation.Starter

"E:\Program Files\proe2001_2005030\bin\proe2001.bat"


You may also need a JAVA_HOME variable if your system doesn't have one set. I usually use the JRE instead of JDK.

I hope this helps.

Carl
 
what is mean by this?


SET MTJ_HOME=E:\proe2001\apps\mechtoolsj_v1.0.4
am uploading my all classfiles and java files plz go through this 2006-07-03_154300_bb.zipand find out the error


i am using jdk and jre 1.4.2 version
 
ajoy,

I tested your app on windows 2000 running Pro/E 2001.

I placed the application under "D:\Proe2001\apps\bb".

I created a batch file to set variables and launch Pro/E:



D:

cd\

cd Proe2001\apps\bb

SET CLASSPATH=.

SET PRO_JAVA_COMMAND=java com.ptc.pfc.Implementation.Starter

"C:\Program Files\proe2001\bin\proe2001.bat"



Pro/E started and your application loaded ok and added your menu.

The problem I found was that your dialog was displayed behind the Pro/E
window instead of in front. With no way to get to the dialog. I had to
move the Pro/E window to the right before launching your app to see and
use the dialog. After that the application seemed to finish.



About the previous post:

MTJ_HOME is a made up variable to use in the CLASSPATH for an application of mine.

Also, the system I run Pro/E on knows where Java is, and Pro/E knows
where cipjava.jar and pfc.jar are located. Notice the period in the
classpath.

For the dialog problem this forum thread may help:

http://www.mcadcentral.com/proe/forum/forum_posts.asp?TID= 27726&KW=dialog



I hope this helps.
 
cmarcum,


Thank you . its really working..iwant one more help. i want to communicate part files from an assembly , do u know any coding .ie. i want to pass values to a part file inside a assembly . do u know how??
 
ajoy,


What type of values? Model parameters, feature parameters, or dimension values?


These can all be modified in a part from an assembly in J-Link.


Carl
 
Carl,


i want tochange dimensional values to a part from an assembly.


Usually i will define parameters for dimensions which i want to change.


Then i will connect that parameter to java using jlink methods.


IN my java coding>>>> 1. first i copy all files to current working directory using CopyAndRetrieve


2. then i pass the values


3. save it


but this will not work when we are dealing with assemblies


because when we change the file name of part files their dependency with assembly will loss . how to solve this problem.
 

Sponsor

Back
Top