0

I have a jar file exporting some functions which i want to use in my asp.net application.

How can i achieve this?

Will anything change if i use it in an windows azure application?

casperOne
  • 73,706
  • 19
  • 184
  • 253
manishKungwani
  • 925
  • 1
  • 12
  • 44

1 Answers1

2

You might be able to use IKVM to compile the jar into a .Net assembly and then use it in your asp.net application.

Todd Stout
  • 3,687
  • 3
  • 24
  • 29
  • Hi todd, I found this, compiled the .jar into a .dll, but cannot use the dll, any tutorial or blog post to guide me? the post on the ikvm page isnt very helpful ... – manishKungwani Jan 13 '11 at 18:57
  • After creating the dll, you need to add the dll as a reference to your visual studio project. What exact errors are you encountering? – Todd Stout Jan 13 '11 at 19:12
  • I added the reference, but couldn't access the package! – manishKungwani Jan 13 '11 at 19:31
  • Did you add a 'using your.java.package;' statement in the source file where you want to invoke the java code? (Or Imports in you are using VB.Net) – Todd Stout Jan 13 '11 at 19:36
  • that was where the error was, but after I got the reason that the IKVM.OpenSDK.Core.dll was missing. Thanx for the help :) --- Also, now i wish to make a list of objects from Java as a data source for a gridview. I can't do that directly as .NET converted java code doesn't have any properties? Is there any solution apart from making proxy layer of classes which will mask the java code? shall i ask this as a separate question? – manishKungwani Jan 13 '11 at 21:43
  • Take a look at this discussion: http://comments.gmane.org/gmane.comp.java.ikvm.devel/2403 I think the ikvmc -remap option might help. – Todd Stout Jan 13 '11 at 22:14
  • Hi, Although it was sufficient for int type, what is the character to be used for String data type and complex data types? anyways i posted the question as it was deviating from the main question: http://stackoverflow.com/questions/4687290/string-and-complex-data-types-in-map-xml-for-ikvm ... – manishKungwani Jan 14 '11 at 01:50