System : Linux 64 bit
Rhapsody version: Rhapsody 8.3 64bit
I am trying to use JAVA API to modify or regenerate GUIDs for model which is open in the background
I have a bash script which basically sets the rhapsody paths and invokes this -
$RHAPSODY_PATH/jdk/jre/bin/java -Djava.library.path=$RHAPSODY_PATH/Share/JavaApi -classpath .:$RHAPSODY_PATH/Share/JavaApi/rhapsody.jar SampleClass
Now the sampleClass looks like this -
public class SampleClass {
public static void main (String [ ] args) {
String modelName = args[0];
String root = args[1];
IRPApplication app =
RhapsodyAppServer.getActiveRhapsodyApplication();
if (app == null){
System.out.println(" failure ");
}
}
}
When I run the bashscript, I also open the rhapsody project in the background so the app here is a valid object and am able to call the methods such as getElement, getName, getGuids etc but when the program exits - I get an error ---> Now there is no core file in the directory I am so I don't know where it is being dumped but what is the problem and solution to this? All I am doing is getting the active rhapsody application which is valid.
./runSampleClass Segmentation fault (core dumped) $RHAPSODY_PATH/jdk/jre/bin/java -Djava.library.path=$RHAPSODY_PATH/Share/JavaApi -classpath .:$RHAPSODY_PATH/Share/JavaApi/rhapsody.jar SampleClass $1 $2------------------------------
VIVEK JAGANATHAN
------------------------------
#Engineering#Sustainability