Java interface with Microsoft C# or C++ DLLs

Can anyone provide me with examples or reference to examples where I can access Microsoft DLLs written in C# or C++ from a Java applet or application?
I know that JNI provides the interface, but I am looking for a real life example of how to use it.
Thanks.

JNA is a nice wrapper around JNI and it lets you avoid writing anything other than Java. I posted a nice, short JNA example where I call a function in Kernel32.dll from Java (http://forum.java.sun.com/thread.jspa?threadID=5222886&start=0&tstart=0). The code is towards the bottom of the first page of the post. Good luck.
- Travis

Similar Messages

  • Java interface with xml communication

    Hello everybody,
    For a project i need to make a java interface with xml communication.
    For example ; from 1 laptop I press on a java button and then i need to get a text message on the other laptop.
    The java interface is already created now the xml code for communication.
    I hope someone can help me how to start with the xml code.
    Are there any templates that i can use?

    I need to use XML for this, cause it is in the
    assignment.As far as communication is concerned, it doesn't matter that you are sending XML. You can send any kind of data. So first find out how to send data, then send data which is XML.
    I only want to know if its possible to send data/text
    from 1 laptop (windowsxp prof) to the other laptop
    (also windows xp prof).Provided the other laptop is running a server that can receive that data.
    Maybe its easier if I send data to a specific IP
    address?Provided there is a server running at that IP address that can receive that data. You can use an IP address to connect to a server but that has nothing to do with sending the data.
    Its important that the communication between 2 system
    is in XML language.XML is not a programming language. XML is a format for storing data. You can certainly send XML-formatted data between two computers.
    So i hope u have a solution for my problem.The solution would be for you to learn how communication between two computers works in the real world. If you have an assignment that says you have to make communication work, surely there was something taught to you before about how to do it?

  • Interface with device driver (API or DLL files)

    I want to make my C++ program interface with an instrument which has a device driver available at the OEM's website. It's a DLL file (not a .cpp file), but I don't know how to call DLL file from C++. I am using Measurement Studio for Visual C++ and Microsoft Visual C++ compiler. Do you have a C++ example code or tutorial about calling DLL (or API) from C++ ?

    Irene,
    Measurement Studio is simply a plug-in for Visual Studio C++. Calling a DLL is general to C/C++. It usually amounts to #including the .h file that comes with the library, like this:
    #include "MyDLL.h"
    I found the following website through Google, which is pretty thorough on calling DLLs:
    http://www.codeproject.com/dll/XDllPt1.asp
    I hope that helps.
    Matt P.
    NI

  • Question about mapping a JAVA Interface with Flex

    I am using Granite Data Services (Java backend) with my Flex
    client.
    The Java server has an Interface called
    public interface IService {String getServiceName();}
    The flex client makes a remote service call on the server
    POJO which returns any implementation of the specified interface.
    On the flex side I have an interface
    [Bindable]
    [RemoteClass(alias="com.*****.proxy.pojo.IService")]
    public interface IService{function getServiceName():String;}
    As shown i am binding it to the server interface.
    From the client I make a call to the server and handle the
    result as shown below
    var serviceInstance:IService =
    (remoteO.testInterface.lastResult as IService);
    Alert.show("Service Name :
    "+serviceInstance.getServiceName());
    The call reaches the server and the remote method is being
    called however the Alert is not working.
    Please Help !!

    //Start other thread closeT
    System.exit(0)
    //code for thread closeT
    //wait 10 s
    Runtime.getRuntime().halt()
    Gil

  • Can java interface with windows to do things

    Good evening
    I am a student and i am trying to do a project and i wanted to ask everyone here before i asked my teacher,
    what i am trying to do is this . create a class that can be run from the desktop that will give me a window of option to do following things
    1) install printer drivers
    2) run a uninstall program
    3) use keys like CTRL ALT SHIFT AND F6 to pop open windows, and is there a way that can have a password entered automatically?
    4) change registry keys
    5) call up reg keys
    6) copy files from one computer ( laptop ) to my lab class over the network onto a specific profile?
    if someone out there can just tell me weather or not Java has the capiablity of interfacing with windows control panel, or any of the above stuff let me know and just give me a push in the right direction Please.
    Derek

    Speaking of Java itself.
    1) install printer driversNo
    2) run a uninstall programNo
    3) use keys like CTRL ALT SHIFT AND F6 to pop open windows, and is there a way that can have a password entered automatically?Depends what you mean but you might be able to do this using the Robot (in the awt package.)
    4) change registry keysNo
    5) call up reg keysNo
    6) copy files from one computer ( laptop ) to my lab class over the network onto a specific profile?Depends on what you mean. Java can be used to send files to other computers. Doing that requires that you understand how the other computer (not your compute) processes are controlled.
    You can of course do all of the above with windows API (not java) calls. And this is the forum about the JNI interface which allows a Java program to access native APIs, like the Windows one. It does however require quite a bit of detail work in a language besides Java, like C or C++. It is going to be easier if you have quite a bit of experience with those. If not then plan on spending a lot of time learning (factor that into how long it will take to do your project.) And of course you would need to research the APIs for all of the above.
    If it matters the registry one is rather easy in terms of the windows API. And you can find many examples of C/C++ code to access it.

  • Java interface with Crystal Reports

    Post Author: [email protected]
    CA Forum: JAVA
    Hello everyone,I need to build a Java interface for JSP to interact with crystal reports.Could anyone recommend any book or forward me the url's where I can find the related material with examples. Eagerly Waiting for reply!Thanks,Prathima.

    Post Author: MJ@BOBJ
    CA Forum: JAVA
    The latest version of the Java Report Component (JRC) is available from the Diamond website.  This download is actually a plugin for Eclipse but you can still use the JRC runtime jars to use the SDK APIs in your JSP page.  You will also find lots of resources such as samples, videos, and forums to help you get started.  You can also refer to the DevLibrary for more information.

  • Interfacing with Microsoft Word

    Issues with taking Word to FrameMaker, FrameMaker to Word, and troubles with the Word and RTF import/export filters abound.

    Interfacing with MS Word
    Don't bother round-tripping from FrameMaker to Word unless you absolutely have to do it.
    Checkout this valuable resource. Thanks, Tim Murray:
    http://www.techknowledgecorp.com/public/word2frame.pdf.
    FrameMaker does not work like Word. The two products have some features that overlap, agreed, but each has its own unique way of conducting itself.
    If you go between FrameMaker to Word often, consider a third-party filter. Mif2Go (
    http://www.omsys.com) and Filtrix (
    http://www.blueberry.com) are two that others have praised. I have not used either.
    If problems between MS Word and FrameMaker persist, consider removing all graphics before conversion. Reimport them later by reference.
    Consider converting tables in Word to tab-delimited text before importing them into FrameMaker. Convert them back to a table after the import.
    Consider getting rid of headers, footers, table of contents, and index, from Word before importing into FrameMaker--although the TOC and index might come in fine if the planets are aligned in your favor.
    The FrameMaker MS Word and RTF import filters take a looooong time. This time gets especially long if you have some complexities in the source file. Often, Windows inaccurately reports the program as "not responding" when, in fact, the import is still on going. Give the filter a chance, an hour or so. Make a five-course lunch or otherwise occupy yourself, just to give the import filter a chance.

  • Java program to interface with Microsoft Outlook and Exchange.

    I am in the process of writing a Java GUI application that can connect to Microsoft Exchange servers and get appointments information.
    I tried using JIntegra's Java Exchange Bridge but I keep getting a "AutomationException - class not registered" error whenever my code gets to the part where it attempts to login.
    Ive configured everything properly and have the appropriate access.
    Can anyone help me or give me some ideas of another way to implement this GUI?
    Thanks

    Ive configured everything properlyQuite likely not.
    I know almost nothing about JIntegra -- but when I look at their website, I see a "Support" page and a "Knowledge Base" page. Seems to me there is a much higher density of expertise over there than there is here.
    I know in Windows you can't use a DLL unless you've registered it, which does something to your registry. And you have to be an administrator to do that. Perhaps you have to do something like that on your machine.

  • Java Interface with Package

    Hai,
    I cannot run this package with interface.
    My interface is interTest.java Under
    C:\Test\src\com\jeya
    package com.jeya;
    public interface interTest {
    public void Myname(String n);
    My java program is classTest.java under
    C:\Test\src\com\jeya
    package com.jeya;
    public class classTest implements interTest
    public void Myname (String n) {
    System.out.println(n);
    public static void main(String args[])
    classTest st=new classTest();
    st.Myname("Jeyanthi");
    After compiling interface the Class file are stored in
    C:\Test\classes\com\jeya\interTest.class
    But If I run the classTest.java, It shows the error in "implements interTest" Cannot Resolve Symbol .
    So pls help to solve this problem

    Hi Jaya,
    After you have create the package,
    you should run the file from this path, like this,
    C:\Test\src>java com.jeya.classTest
    regards
    Dhinakaran

  • Connecting Java Application with Microsoft Word Toolbar

    My project involves designing a GUI with which I will use Java for. And I also have to create a Microsoft Word Toolbar that will open the Java GUI. There will be other interactions between both the GUI and the toolbar.
    Is that possible? Or shall I use Visual Basic or .NET for the GUI?
    Advice appreciated please!

    hi
    check this
    http://help.sap.com/javadocs/NW04/current/bi/docs/connectors/sapq_howto.html
    let me know am i reached ur  point
    bvr

  • Interfacing with microsoft word program

    Just purchased my macbook pro 13, 2012 and wondered what apple apps to buy
    as to use incoming microsoft word, etc

    You should buy MS Office for Mac 2011. It is the only app that is fully compatible with PC MS Office, Word, Excel and the like.

  • Java interface with PLC (programmable logic controller)

    hi everyone,
    I'm a totally new to java as well as PLC. Pls help me if anyone has any idea to help me.
    I would like to create a road traffic simulator by using java which the simulator can communicate with PLC.
    I will create a crossroad. Each junction will have three colour lights (green, yellow, red).
    The PLC is to control the traffic lights in the simulator while the simulator will output the length of vehicle in each junction.
    How should i do?
    What should i do?
    I'm urgently looking forward for your answers. thank you!

    I'm assuming you are interested in using Java RTS (Sun's implementation of JSR-01) since you posted to this forum.
    Java RTS has more than enough predictability to simulate (and in fact replace in production) any PLC.
    My suggestion is that you use Java RTS for the complete simulation. It's much simpler since the complete logic can be executed in a single JVM no PLC would be required.
    If you need proof that Java RTS is so capable check out these videos.
    http://www.youtube.com/watch?v=xH1yUXd9krU (JavaOne 2007)
    http://www.youtube.com/watch?v=g5Ky2ApC4Y4 (JavaOne 2008)
    You can download Java RTS here
    http://java.sun.com/javase/technologies/realtime/rts/
    Note that for academic work there is no fee to use JavaRTS.
    Please stay in touch and let us know more about your porject. Traffic signaling and control is an area in which I am interested and for which, we believe, Java RTS offers significant advantages.
    Cheers, Greg

  • HANA interfacing with Microsoft front end

    Hi,
    We have a requirement where the front end will be developed with SQL server reporting services(SSRS) via ODBC and some UI parts directly connecting to native HANA via .NET web server.
    So the architecture is:
    1. HANA Native - ODBC - SSRS
    2. HANA Native - .NET Web Services - UI
    Connectivity and possible limitations are still a matter of concern.
    If anyone has worked on a similar scenario or has some information/useful links, please share it across.
    Thanks,
    Shyam

    My situation was somewhat different but running Test-CsAddressBookService would fail with error:
    'The remote server returned an error: (404) Not Found.'
    All clients were unable to retrieve contact unless the full sip address was entered.
    Environment.
    Server: Lync2013 STD
    Client: Lync2010
    Did the following:
    Checked replication under the Topology tab in CSCP- mine has a green check.
    Reinstalled .net 4.5 via add/remove programs
    Registed .net by running the following from an elevated cmd (run from .net folder) : aspnet_regiss.exe -I
    uninstalled Lync webcomponents from add/remove programs
    From Lync install media- reinstalled webcomponents.msi (browse to \Setup\amd64\Setup)
    Checked IIS>Application Pool and ensured all ASP.NET and Lync components are set to v4.0 of the .Net Framework Version
    Launched the Lync setup and reran step 2: Stetup or Remove Lync Server Components.
    Reran Test-CsAddressBookService: 
    successful
    Tested Lync client: Successful

  • HP laserjet m1217 interface with Microsoft Surface

    How so I print from a Surface RT to HP m1217 nfw MFP?
    Thanks,

    Hey,
    The RT version of the Surface does not have a full package of Windows 8.  It does not have the ability to install the drivers for the M1217nfw printer.  There is not a release of the Universal Print Driver package for RT either.  
    However, you can setup the printer for ePrint which will allow you to email a document or photo needing to be printed to the unit's email address.  Once the ePrint service receives the email it will print the document/photo off your printer.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02940150&tmp_task=useCategory&cc=us&dlc=en&lc=e...
    The above linked document will give you information about setting up a Custom Email address for your printer using ePrint services.
    Hope this helps,
    Jason
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • Java Application interface with MS Excel through DDE

    We have a financial application written in JAVA and have requests from users that want to interface with the application. Meaning, They would like the Java application interface with Excel. For example, if you had a C++ application, you could create a DDE link in Excel that points to the C++ application and receive the data.
    How could I do this with a Java Applictaion ? I was told that there was an application written that lets Java interface with Excel.
    Any ideas or does anyone know ?

    JNI

Maybe you are looking for

  • Apex long time waiting! APEX + COCOON = PDF Carl's blog

    Hello! Help me, please! I need to print reports in PDF. What I did: 1 I installed Apache Tomcat 6.0.14 2 I installed Cocoon 2.1.10 All works fine! http://localhost:8080/Cocoon opened OK 3 I copied fop_post to \apache-tomcat-6.0.14\webapps\cocoon\ , n

  • Ethernet network not working properly

    Recently my safari haven't been able to connect to the internet. specifically my ethernet. when i tried to look for what other applications that can't connect. it was almost all the apps requiring internet connection. Even the software update and app

  • Object Type Problem

    Hi I faced some problems with O8(Release 8.0.5.0.0) object types. Look at the following definition: CREATE TYPE T_JMJX AS OBJECT( LBNO NUMBER(3),...); CREATE TYPE LIST_JMJX AS TABLE of T_JMJX; CREATE TABLE JXGC.JMJXJL (JMJX LIST_JMJX,...) NESTED TABL

  • MDNSResponder problem / network traffic reduction measures in effect

    [Part I in a series of "Why Does My Machine Randomly Shut Down And Related Oddities" :-D ] Below you can see a bunch of log output which seems to show a network problem. My connection is not too fast, which I've blamed on my low tier of U-Verse, but

  • Can I set 1 laptop wireless connect with static IP to WRT610N?

    I have a WRT610N with 3 PCs wired and various wireless devices accessing.  1 of the wireless devices, running Windows 7, needs to run a static IP.  Do/Can I set this up in the router or do I need to do in the PC?