Search code examples
java.nethibernateportingikvm

Hibernate with IKVM and ikvmc


I work on a project where we have to port a java application to .Net, but the users would like to continuously use it, so we have to provide bugfix, maintenance as well.

the java app is 2 layered with swing UI and Hibernate at the back. My idea is to introduce a service layer and split the application into more functional components behind the service layer. After this port the UI only into C# and call java component with IKVM (compile all jars with ikvmc to dlls) and finally port the components one by one. (in this way we could move forward with porting and provide support as well)

I've stared to evaluate IKVM, but I stuck at hibernate. First I wanted to call ikvmc for all libraries at once:

ikvm-7.0.4335.0\bin\ikvmc.exe -target:library -assembly:hibernate_hellow_deps antlr-2.7.6.jar commons-collections-3.1.jar commons-lang3-3.1.jar commons-pool-1.5.6.jar derbyclient.jar dom4j-1.6.1.jar hibernate-commons-annotations-3.2.0.Final.jar hibernate-core-3.6.9.Final.jar hibernate-jpa-2.0-api-1.0.1.Final.jar hibernate-validator-4.2.0.Final.jar javassist-3.12.0.GA.jar jta-1.1.jar log4j-1.2.16.jar slf4j-api-1.6.4.jar slf4j-log4j12-1.6.4.jar validation-api-1.0.0.GA.jar

I got a lot of warning, e.g:

Warning IKVMC0100: class "org.xmlpull.v1.XmlPullParser" not found

For me it seems that I have to compile with ikvmc all the jar files which are in the dependency tree of hibernate libraries and the dependencies of the dependencies, etc.

Is this the right way, should I compile all dependencies? Is this the right approach, or can I use my java components (jar files) with IKVM in another way?

I'll evaluate jnbridge as well.

thx, fifty


Solution

  • You need only compile the jar files that you needed. If this are optional components then you can ignore this warning.