Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java code in .dll

 
Sunil Kumar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a project in asp which is running on IIS server, now i have to add component in the project, but the component is entirly in java by me. So, how can i access my component in the asp framework

Thanks and Regards
 
Sunil Kumar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way which i think is creating the .dll with the java code and access from asp. but, i am not sure can we create dll with java code or not
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can think of two possibilities.

1) When VisualStudio still had Java support, it was possible (and not even that hard) to create Java DLLs. The version that supported Java 1.1 came out in 98 or 99; maybe you can get ahold of a copy if Java 1.1 cuts it for you.

2) There are some Java/COM bridges; one of those might support Java DLLs. A good starting point for some research would be this page.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it really need to happen, I'd be looking at rewriting it (or getting someone else to) in VB or C# and exporting it as a DLL. It all depends on effort and the rest of your criteria but I can't help thinking of the saying "If your only tool is a hammer, all your problems look like nails".
 
Jayesh Lalwani
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortuanetly, a Java/COM bridge like JACOB won't work because you have to call JAVA from COM, and not the other way around

The only way I can think of is to run your Java code as a Web Service. Your C++ code can then use SOAP to call your Web Service. SOAP will add a lot of overhead though, and there will be additional headache of installing a Web Server on the clien't machine
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic