![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Rhapsody and Java API. Topic Summary: Created On: 27-Oct-2006 12:03 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Dear All,
I try to test the new JAVA API, but in all the doucmentation, nothing is really clear. Does anyone already use this API and has some documentations about it !( how to configure eclipse, Third party tool, Rhapsody configuration, etc.....) Best Regards Nicolas |
|
![]() |
|
![]() |
|
I do not install Rhapsody so I don't know if they did anything special, but I have gotten the Java API to connect to a running instance of Rhapsody and then print out the name of the active project under windows. It was all fairly straight forward. Hope this helps...
------------------ Here is the java code ------------------------ import com.telelogic.rhapsody.core.RhapsodyAppServer; import com.telelogic.rhapsody.core.IRPApplication; import com.telelogic.rhapsody.core.IRPProject; public class RhapsodyConnection { public RhapsodyAppServer c_RhapsodyAppServer = new RhapsodyAppServer(); public IRPApplication Rhp; public RhapsodyConnection( ) { Rhp = c_RhapsodyAppServer.getActiveRhapsodyApplication(); System.out.println(Rhp.activeProject().getName()); } public static void main( String[] p_Args ) { try { //Create a new instance of our application's frame. RhapsodyConnection l_RhapsodyConnection = new RhapsodyConnection( ); } catch ( Throwable t ) { t.printStackTrace( ); //Ensure the application exits with an error condition. System.exit( 1 ); } } } ------------- Here my compile batch file ------------- @echo off rem define the CLASSPATH environment variable set CLASSPATH=.;U:\Projects\ToolCustomizations\Rhapsody\JavaAPIStuff\rhapsody.jar echo %CLASSPATH% rem define the java executables location set JAVALOC="C:\Program Files\Java\jdk1.5.0_05" echo %JAVALOC% rem Set the path to the java executables and visual studio set path=%JAVALOC%;%PATH% %JAVALOC%\bin\javac.exe RhapsodyConnection.java pause ----------- and finally my run batch file -------------- @echo off rem define the CLASSPATH environment variable set CLASSPATH=.;C:\Rhapsody70\Share\JavaApi\rhapsody.jar rem define the java executables location set JAVALOC="C:\Program Files\Java\jre1.5.0_05" echo %JAVALOC% rem Set the path to the java executables and visual studio set path=%JAVALOC%;%PATH%;C:\Rhapsody70\Share\JavaApi "C:\Program Files\Java\jre1.5.0_05\bin\java.exe" RhapsodyConnection pause |
|
![]() |
|
![]() |
|
thanks for your reply.
I will try . Nicolas |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Rhapsody and Java API.
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.