This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dll in java

 
                      
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please anyone help me....how to use dll in java and how to call .net dll in java
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try java .net dll? I did and got quite a few interesting results
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://www.coderanch.com/how-to/java/Java-FAQ#callingCom for some options. If things haven't changed since that was written, then .Net DLLs still need a COM wrapper.
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can also check out JNA.
 
J. Aaron Gonzalez V.
Greenhorn
Posts: 1
C++ Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Well, there are a few ways to load a dll into your Java programs. One of them is by using the Class.forName method, something like loading a .jar driver when connecting to RDBMS from Java.

Hope this helps!
 
Campbell Ritchie
Sheriff
Pie
Posts: 48976
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Are you sure that Class.forName will load a dll? Surely that only loads a class.
 
Rob Spoor
Sheriff
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which in turn will load the library if the class has a static initializer block that calls System.load or System.loadLibrary. Without such a block nothing will be loaded.
 
pavan aryan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suprita xyz wrote:Please anyone help me....how to use dll in java and how to call .net dll in java


I also got a similar requirement.. kindly let me know if you have figured it out..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic