Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Rhapsody and Java API.
Topic Summary:
Created On: 27-Oct-2006 12:03
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 27-Oct-2006 12:03
User is offline View Users Profile Print this message


Meledo Nicolas

Posts: 2
Joined: 19-Nov-2003

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
Report this to a Moderator Report this to a Moderator
 16-Nov-2006 18:00
User is offline View Users Profile Print this message


John Jennings

Posts: 2
Joined: 15-Dec-2005

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
Report this to a Moderator Report this to a Moderator
 9-Jan-2007 11:15
User is offline View Users Profile Print this message


Meledo Nicolas

Posts: 2
Joined: 19-Nov-2003

thanks for your reply.

I will try .

Nicolas
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.