I am trying to use Java API Call specifically -> RhapsodyAppServer.getActiveRhapsodyApplication() and once the program exits, there is a segmentation fault. I can't find the location of the core dump, so asking if anyone has seen this issue. The model is open in the background and the call returns an object to that. (It is not null). The Rhapsody version is 8.3.1 and am on Linux.
./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
Thanks
Code -
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 ");
}
}
}