The study was good for a few days and finally succeeded. Because a Java project has been written, it is now required to be rewritten as a C # version. But it uses the Svnkit,svnkit is the Java platform. If you rewrite it to C #, use SHARPSVN, but SHARPSVN's API documentation is really unprofessional. It seems better to look at the Svnkit. So I'm going to write some operations (upload, download, delete, move, retrieve tree) and turn it into a DLL. So began the study.
The first problem is that there is a dependency between the jar packages, which turns into a DLL. A class-not-found error occurs during the run. Finally, a solution was found: there are two ways.
1. Use Fatjar to package them in one click (dependent packages can exist in the new Lib folder), then use
Ikvmc-target:library packaged Fatjar file path
To turn the jar package into a DLL.
Add a reference to the new C # project (add a well-forwarded DLL) and use the packaged function directly. (Just like using library functions)
2. The second approach is this:
Let me give you an example: A class named: GetUserName (), exporting it as a jar (Bedependent.jar). Write a class named Invokegetusername () and call GetUserName () in Invokegetusername (). Package the invokegetusername into another jar (Todependent.jar).
Next: The non-dependent jar package is first turned into a DLL, which is referred to as Bedependent.jar.
Ikvmc-target:library Bedependent.jar's Path
A BeDependent.dll is generated and then the two jar packages are synthesized:
Path of the Ikvmc-target:library-reference:bedependent.dll path Todependent.jar
Generate ToDependent.dll. After you load the reference in a new C # project, directly call Invokegetusername () directly in the program.
Note: But when I synthesized the jars of Svnkit, there was a problem. Hasn't been solved yet.
Http://www.cnblogs.com/wangjiyuan/p/jar2dll.html
How the jar package turns into a DLL (can also be done with nested jars) (RPM)