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.

jlink: my experiences, resume

diego.peinado

New member
Hi, I pretend to tell you how I've learned to use jlink up to date.


I begun with async applications because are easier to setup and to debug. I have used netbeans 5.5. Only remember to load the pfcasync.jar. I have used JDK 1.6, so there is no need to try to find jdk 1.42. Important to remember also System.loadLibrary("pfcasyncmt"); before try to connect:


try{
connection = pfcAsyncConnection.AsyncConnection_Connect (null,null,null,null);
miSesion = connection.GetSession();
JOptionPane.showMessageDialog(null, "Got ProE Session");
} catch (jxthrowable x) {&nbsp ;
System.out.println("Problemas en la conexi
 
I'm very happy. I succeded in debuggin sync applications. Is there really nobody that can do that?


Very important to assign this variable to config.pro


jlink_java_command C:\Archivos de programa\Java\jdk1.6.0_02\bin\java.exe -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,address=8069


Firstyou start your sync application, it seems to frooze. Then you can attach the debugger to this VM. In netbeans: Run > attach debugger, then select connector to SocketAttach (Attaches by socket to other VMs) NOT confuse with SocketListen, Host your host, Port 8069 because that was the port I selected in the jlink_java_command.


And then you can debug. Note that you should compile the class files with some breakpoint so you can start debuggin.


Thanks.
 
Well I was happy. Now I'm glad.


I'm having a very strange behaviour. In one button I have one process that runs quite well. But in a second one, when I use the constructor of a class that worked quite well in async, in sync appli. simply do not work. It do not crash, but when I use the constructor of this class the program stops. It still work, if you want you can throw again this process or the other. When debuggin, I use the step by step, and when I do this step the program continues running. Well it exits from the CommandActionListener without any indication.


This is the commandactionlistener


class jlCreateBOMxls extends DefaultUICommandActionListener {
public jlCreateBOMxls () {}
public void OnCommand (){
miExcelASM.process_leeASM();
}


It simply finish this Oncommand from one point.


Anybody knows what can be happening ?
 
I forgot to put how I solved it and what it was.


It was only the classpath. There is a .jar library that I used in netbeans, but when using the application as sync, I did not include this library to the classpath. In this case the application do not give you any clue. Only returns.
 

Sponsor

Back
Top