we are building a .net application in which we need to call java methods.we created a JAR file from the CLASS, converted the JAR file to a DLL.
The DLL is referenced in the application, at run-time it is throwing a exception "java.lang.ClassNotFoundException You cann't use Dummy Type : com.crystaldecisions.sdk.framework.CrystalEnterprise". Could some help me to solve this.
Note:-Java program at runtime isn't giving exception.
I used the command D:\SriramJava>jbimp /usestubrefs /t:library BOMigrationJar.jar /out:BOMigration.dll to convert JAR to DLL.
While using the userstubrefs option in JBIMP, here is the known behavior – “If a class is referenced and not present in the input, the CLASSPATH environment variable is automatically searched for the missing class and the first found location is displayed with the error information. If this option is not specified, conversion stops if any of the referenced classes are not present in the input. If this option is specified, stub types are emitted into the created assembly for each of the missing classes. This causes the conversion to succeed, but will cause an exception to be thrown when an attempt is made to access a missing class member at run time.”
From the above, it seems that at runtime you are trying to access the missing class member com.crystaldecisions.sdk.framework.CrystalEnterprise which is not present in the input.
Also, you need to ensure that the class files do not use functionality from versions other than JDK 1.1.4 (JDK 1.2 equivalent to some) which is what J# supports. For complete information on classes supported by J# in Visual Studio 2005, you might want to refer the following- http://msdn2.microsoft.com/library/67f25kx3(en-us,vs.80).aspx
Microsoft führt eine Onlineumfrage durch, um Ihre Meinung zur Msdn Website zu erfahren. Wenn Sie sich zur Teilnahme entscheiden, wird Ihnen die Onlineumfrage angezeigt, sobald Sie die Msdn Website verlassen.