How to do JNI in Linux

hi guys,
i am new to Linux plotform
i have some .so files writen in C++
and i have the Java code. But how to call the methods in .SO file from Java thru JNI.
thanx in advance.
---Subbu

Subbu,
Here's a link to a short tutorial on using JNI [ http://www.javaworld.com/javatips/jw-javatip141.html ]. I find working thru even a simple tutorial to be helpful. The other place is the following link [ http://java.sun.com/docs/books/jni/html/jniTOC.html ], although I'd work thru one or more tutorials before diving into the Sun docs.
hth,
adym

Similar Messages

  • How to Use JNI for linux based C programs

    Hi all,
    I am doing my project in JAVA for my Institute. There is a Central server. All the API's have written in C. The C APIs are Linux based.
    The problem is getting records from the database through API.
    I tried the Java Native Methods. I am able to do that in console with out problem. Since my project is web based I want to fetch the records through the C APIs in JSP. Is it possible? How to do that?
    Please Help me.
    -Prathap

    Why can't you use JDBC?
    I tried the Java Native Methods. I am able to do that in console with out problem. Since my project is web based I want to fetch the records through the C APIs in JSP. Is it possible? How to do that?JSP runs in a server. Which is just a big console application. Same as any other.
    Basic process.
    1. Write the JNI
    2. Insure the JNI is in the servers shared library path. This can depend on the user that the server runs under (unlikely to be you.)
    3. Add the java code into the server.

  • How to embed mplayer in Linux with JNI

    Hello All,
    I was wondering if anyone here knows to get a Linux based video player to draw on the awt Canvas. I am trying to play the streaming video in ASX / WMV format on Linux. And MPlayer is one such player that can play almost anything.
    For windows, there are a few options to embed the native media player and I am thinking of going with jawin as it hides most of the native implementation. But I have not much idea about how to do it in Linux. Couldn't find many examples / guides either.
    If someone has an idea / links and would like to share it, it'll be highly appreciated.
    Thanks in advance,
    Rex

    I could advance a little more and got the JNI library to draw on the awt Canvas. But still can't get another native program like gedit to draw on the Canvas.
    This is what I am doing to draw the rectangles (from Sun's example) -
    gc = XCreateGC(dsi_x11->display, dsi_x11->drawable, 0, 0);
    XSetBackground(dsi_x11->display, gc, 0);
    for (i=0; i<36;i++)
    XSetForeground(dsi_x11->display, gc, 10*i);
    XFillRectangle(dsi_x11->display, dsi_x11->drawable, gc,
    10*i, 5, 90, 90);
    XSetForeground(dsi_x11->display, gc, 155);
    XDrawImageString(dsi_x11->display, dsi_x11->drawable, gc,
    100, 110, testString, strlen(testString));
    But how do I pass the handle 'gc' to another program like gedit to draw on this surface instead of opening it's own window ? It'll be a great help if someone could share an idea on this.
    Thanks,
    Rex

  • How to Create NFS in Linux

    Hi all,
    I am very much new to Linux Admin, i am basically working as a apps dba, i have two servers, i installed Oracle Linux on that, now i want to create NFS file system, i have created u01 mount pioint in Linux1 and u01 in linux 2 with same space , i am able to ping both servers and i am able to do ftp both servers, could any one explain me how to create NFS in linux servers,
    Thanks

    On the server, edit the file <tt>/etc/exports</tt> to list the directories you
    want NFS to offer, and to which systems they should be offered:
    /u01    *(rw,sync,no_root_squash)
    /u02    *(rw,sync,no_root_squash)
    /u03    *(rw,sync,no_root_squash)The <tt>*</tt> matches any system/network and the <tt>(rw)</tt> says let the
    other systems read and write the tree, the <tt>sync</tt> forces the server NFS
    to finish the I/O before telling the clients the I/O is done, and the optional
    <tt>no_root_squash</tt> lets root on a client system access the files as if
    they were root on the NFS server; this may not be what you want.
    # /sbin/chkconfig nfs on
    # /sbin/service nfs startOn the NFS client, edit the <tt>/etc/fstab</tt> file to have lines that look
    like this:
    myserver:/u01 /u01 nfs rw,rsize=32768,wsize=32768,sync,nointr,hard 0 0
    myserver:/u02 /u02 nfs rw,rsize=32768,wsize=32768,sync,nointr,hard 0 0
    myserver:/u03 /u03 nfs rw,rsize=32768,wsize=32768,sync,nointr,hard 0 0and then from the client make sure you can see the offered files:
    # /usr/sbin/showmount -e myserverand if you can, do this on the client:
    # mkdir /u01 /u02 /u03
    # mount /u01
    # mount /u02
    # mount /u03If the clients ever reboot, the NFS files will be mounted automatically and you
    will not need these last 3 commands.
    The RDBMS has its own requirements for the options in the <tt>/etc/fstab</tt>
    entry, so the <tt>rw,rsize=...</tt> example may need to be adjusted a little.
    Happy NFS'ing.

  • How to use jdeveloper with linux?

    how to use jdeveloper with linux?
    Hello, i've download jdeveloper, and i have java1.4 installed. But i can't run jdeveloper i have jdev.exe and jdev but when i put /usr/local/jdev/bin/jdev a have a message like file not found. I don't know what to do.
    Help please!!!
    Ori.

    You need to go to the directory where you unzipped JDeveloper, for example:
    cd opt/jdev/jdevj2eebase1013/jdev/bin
    Once there, do this:
    chmod +x jdev
    chmod +x ojc
    Now you can try this:
    nohup ./jdev &
    or simply
    ./jev
    I usually create a soft link in ~/bin

  • How to open Designer in Linux environment.

    I have installed Business Objects XI 3.1 on Linux 5.
    Now I want to create Universe and Desktop Intelligence Reports.
    1.     How do I open Designer. In windows we can open it from Program file. How to do it in Linux environment.
    2.     Do we need to install client component on Windows and then connect it to Linux Bo server.
    --Kuldeep

    Kuldeep,
    You misunderstood.
    The client tools are Windows only. The server portion of the install can be on Windows/*nix.
    The only way to launch Designer, Deski, Import Wizard etc. is from a Windows machine that can login to the CMS on *nix.
    You cannot launch client tools from *nix.
    Best,
    Srinivas

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • How to compile form in linux server

    Hi All:
    Any one can say how to compile form in linux server using form builder fmb.

    If you are talking about forms 10g then here is the method
    1) run x windows interface on your machine
    2) login to linux server
    $ export DISPLAY=<IP address of machine>:0.0
    $ frmcmp.sh module_type=form module=myform.fmb userid=user/password@connectstring compile_all=yes
    Regards
    Anuj

  • How to install JCO in linux system?

    How to install JCO in linux system?Thanks.

    Hi,
    This is SAP Business one system administration forum. Please find correct forum and repost above discussion to get quick response.
    Please close this thread here with helpful answer.
    Thanks & Regards,
    Nagarajan

  • How to install JMF in Linux

    How to install JMF in Linux?

    Thank you AndrewThompson64
    You have done a great job.You are welcome.. but really, the only
    'great' thing I did was a quick search on
    'Java install linux'
    to show that link (that I knew was around
    here somewhere) at the top of the
    search reasults!
    Thanks for your interest to help me.You are welcome. :-)
    Next time you get stuck, 'drop back by'* and
    I'll show you some more clever search tips. ;-)
    * ..but really, you will gain a lot if you simply
    'lurk' around the forum and read other posts,
    even as you are writing code..

  • How to install JDBC in Linux

    Dear All,
    I want to install JDBC for JDK1.6. I have installed the JDK; now please let me to know how to install JDBC on Linux for JDK1.6.
    Thanks & Regards,
    Aqeel Nawaz

    Hi Aqeel,
    Download the ojdbc.jar file for your database and add it to your CLASSPATH.

  • How to install D2k in Linux

    Hello,
    Any one can say the steps for how to install D2k in linux.
    Thanks&regards
    Dhamodaran

    Developer 2000 is a deprecated developer platform. AFAIK, By the time it was named D2K it was supported on Windows platforms only (98, NT, 2000), - Linux was not so popular during those old days-.
    You could "run" Dev2K on Linux by means of a Virtual Machine. However I suggest you to download a linux compatible Developer Suite 10gR2, it is certified with SLES-9, RHEL4, and OEL4, using a 10gR1 or 10gR2 Database Server.
    ~ Madrid.

  • How to create instance in linux

    Hi guys
    how to create instance in linux? I know that in order to create a instance in window, we can use oradim cmd. But what about linux?

    user11148588 wrote:
    hi
    after i performed DR. DBCA does not show the recovery database. can anyone advise me what i should do in order for DBCA to display the database?DBCA gets its knowledge of existing databases from the oratab file. Did you create an entry there? Most *nix OS's will have it in the /etc directory; if I remember correctly it will be in /var/opt on Solaris.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Does anyone know how to install qmail on linux platform

    Does anyone know how to install qmail on linux platform and the site name where we can download the rpm of qmail.

    Yeah i know that this is java forum but i'm doing a
    project on j2ee which needs qmail to be installed.And
    i thought that even java people who are working on
    qmail may know that.Yes, but you should still post that question in another forum. I bet that most software developers knows how to boil eggs, but should I ask about that here?
    Kaj

  • How to install Oracle9iDS on linux (Step by step)

    Hi friends,
    Can you tell me how to install 9iDS on linux?
    Take care,
    Tarek

    For howto
    www.suse.com/oracle

Maybe you are looking for

  • XP as server, and Win 7 as client

    I have a windows XP desktop and a Thinkpad on Windows 7. I want to turn my desktop into a server and access the hard drive from my laptop when im at work. Is there any way to do this from within in windows? or a way to do this for free? I only want t

  • Increase the line items

    Dear all This program only upload the 800 line item we want the data upload through Excle sheet 9000  line item , i am new in abap please advise how can increase  the no of the line item ,if possible please add the program on same REPORT  ZBDC_PROGRA

  • Crystal generates empty pages for a datasource with a lot of data

    Hi, I hope someone have some hints to solve my problem with generating large reports. I have SAP Crystal Reports runtime engine for .NET Framework 4 32-bit installed on my Microsoft Windows 2008 R2 Enterprise Server. Since I update Crystal Reports to

  • Same as laurenbby1.

    Looking for answer to enable activation of download flash player 10.3 or 11 to 64 bit PC.

  • Upgrade failure to 11.1.102.63

    Today I was having problems viewing Flash video on Firefox so I checked for possible upgrades and turned out Flash had one available. I tried to upgrade to 11.1.102.3 and no matter how many times I did when I restarted Firefox I get this message when