This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes java code in .dll Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java code in .dll" Watch "java code in .dll" New topic

java code in .dll

Sunil Kumar

Joined: Aug 15, 2005
Posts: 14
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

Joined: Aug 15, 2005
Posts: 14
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

Joined: Mar 22, 2005
Posts: 39530
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.

Ping & DNS - updated with new look and Ping home screen widget
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Nov 05, 2004
Posts: 502
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
subject: java code in .dll
Similar Threads
Having a dilemma
How to submit from ASP to Servlet
Microsoft Dominance and the Future of Java
Java Application or .net App?
Crystal Report 10 running under Apache Tomcat App Server in Linux box