I have not used Com2Java or Com4j before, but a long time ago I used a library called JavaCOMBridge (https://sourceforge.net/projects/jacob-project/).
The version of JavaCOMBridge I used cannot handle multiple inheritance, and I don't see how there can be a good way to do it.
Forget about Visual J++. It's an abomination created by Microsoft and was sued into oblivion.
If you are experienced in both C and Java, and the amount of APIs you have to bridge is not large, I'd recommend using JNI directly.
Edit
Here's an example using Excel:
package test;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;
public class JaCoBTest {
public static void main(String[] args) {
String EXCEL_FILE = "FullPathOfAnExcelFile.xlsx";
// Using Excel as an example
ActiveXComponent app = new ActiveXComponent("Excel.Application");
// Modify a property, to show Excel window
app.setProperty("Visible", true);
// Get Excel workbook object
Dispatch workbook = app.getProperty("Workbooks").toDispatch();
// Call method, to open an Excel file
Dispatch.call(workbook, "Open", new Variant(EXCEL_FILE), new Variant("1"));
// Wait for 5 seconds
try {
Thread.sleep(1000);
} catch (InterruptedException iex) {
iex.printStackTrace();
}
// Close Excel without saving
workbook.call(workbook, "Close");
// Close is supposed to have three optional parameteters, but the line below is not working
//workbook.call(workbook, "Close", new Variant(false), Variant.DEFAULT, Variant.DEFAULT);
// Close Excel
Dispatch.call(app, "Quit");
}
}
There is one problem in the above code - I cannot get optional parameters to work. The function Workbook.Close is supposed to take three optional parameters, but the call always fail with invalid number of parameters.
I've also located the web page I used back then:
http://danadler.com/jacob/
The above page contains a link to a FAQ but it's slightly outdated.