Can you use Java libraries in a VB.net program?

后端 未结 8 1992
青春惊慌失措
青春惊慌失措 2020-12-03 16:36

I\'m wondering if a Java library can be called from a VB.net application.

(A Google search turns up lots of shady answers, but nothing definitive)

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 16:58

    If you can create COM components with Java, you can use tlbimp to create an interop assembly for using in VB.Net.

    If can create standard DLLs that can be used from C++ with Java, you can write P/Invoke declarations and call them from VB.Net.

    If you can create a web service with Java, you can generate proxy class from the WSDL and call it from VB.Net.

    In any case, chances are the Java component will live in a separate process. I doubt you can load both the Java VM and the CLR in the same process.

提交回复
热议问题