Dear Thomas:
I am using the following function "writeTable" in our "PLPConnectorTask.java" plugin code, leveraging the DW's "CompoundTableSaver" class, to export the molecules inside the active DW DEFrame into a SDF file:
private void writeTable(String fileName) {
SwingUtilities.invokeLater(() -> {
try {
DEFrame currentDEFrame = sDataExplorer.getActiveFrame();
DECompoundTableModel currentTableModel = currentDEFrame.getTableModel();
JTable currentTable = currentDEFrame.getMainFrame().getMainPane().getTable();
CompoundTableSaver dataSaver = new CompoundTableSaver(currentDEFrame, currentTableModel, currentTable);
dataSaver.saveSDFile(new File(fileName), FileHelper.cFileTypeSDV2, 0, 2, 1, null);
// assuming the 0st column contains the idcode encoded structure
// assuming the 1st column contain the 2D coordinate
// assuming the 2st column is the idColumn column
// coordsColumn if -1, then 2D-coords are generated on the fly
} catch (Exception e) {
e.printStackTrace();
}
});
}
It works well when I test the plugin inside a Java IDE (Eclipse) along with DW source code and its dependencies.
However when we packaged this "PLPConnectorTask.java" plugin as a JAR and placed it within the "plugin" folder of the standalone DataWarrior, this function call leads to the following error message seen in the dialog:

Since the error message displayed in the dialog is too short, and I could not reproduce this error inside the Eclipse IDE to see the full stack trace of this exception, I wonder if you could provide some tips and suggestions.
best,
Zhengwei
Dear Thomas:
I am using the following function "writeTable" in our "PLPConnectorTask.java" plugin code, leveraging the DW's "CompoundTableSaver" class, to export the molecules inside the active DW DEFrame into a SDF file:
It works well when I test the plugin inside a Java IDE (Eclipse) along with DW source code and its dependencies.
However when we packaged this "PLPConnectorTask.java" plugin as a JAR and placed it within the "plugin" folder of the standalone DataWarrior, this function call leads to the following error message seen in the dialog:

Since the error message displayed in the dialog is too short, and I could not reproduce this error inside the Eclipse IDE to see the full stack trace of this exception, I wonder if you could provide some tips and suggestions.
best,
Zhengwei