Can a applet call a JNI code

I need to develop a browser plugin or analogus plugin utility which will download from the server and and then make a local DLL call. the local DLL call includes starting a Windows exe system which will start another software (pre-installed on the client system) in another process.
I searched around with the NPAPI plugin and FireBreath frameworks. But my biggest drawback is i am novice in C++.
Can I make an applet will make a JNI call to call the windows systems dll. I know a signed applet can use the System.load function (excuse me if i am syntactically wrong) but i am not sure if it can start a exe or make a JNI call.
As i have no time to learn and code in C++ the applet path seems to be the most viable one.
Please suggest
Vishwanath

vwashimkar wrote:
As i have no time to learn and code in C++ the applet path seems to be the most viable one.
Please suggestThen you are out of luck.
I suspect you think that you can use java to directly call your dll. That won't happen.
Closest you can get to that is JNA (3rd party library "Java Native Access") and using that requires that you learn JNA and unless your dll has a simple interface figuring out how to use JNA will likely require some knowledge of C/C++ and calling semantics.

Similar Messages

  • Can an applet call one of the methods of servlet??

    hi everyone...
    i m very new servlet and applet programming and i have come accross a problem....
    i m using a applet which establishes connection with the servlet(residing on server)..i want to use few of the methods of the servlet....
    now is it possible tfor me to call the methods of this servlet using its object.???
    please help me..
    thanx in advance

    first of all thanx a lot for the reply...
    but i wanted to know can an applet call any other
    function of servlet other than get and post....as i
    hacve defined some more functions in servlet..
    please reply...I did this a while back (2003/4?) and unless it's changed you cannot do it directly, it must be GETor POST, then you could just use conditional logic to invoke another method.

  • Can Java Applet Call the ASP Page

    Hi,
    I would like to know whether the Java Applet can call the ASP page.
    If it can be done, how does the Java Applet get the value from ASP page?
    Please provide me some running example.
    Thanks.

    I would like to know whether the Java Applet can
    an call the ASP page.Something like:
    AppletContext.showDocument(new URL("http://wherever/myPage.asp"), "_blank");
    how does the Java Applet get the value from ASP page?What?
    Please provide me some running example.Nope.

  • Can an Applet call a Perl script that performs Unix file commands?

    Hi,
    I would like my applet to move a Unix file from one directory to another. (Both directories and the file are on the same server as the applet).
    In my applet I have code that calls (I think) a Perl script through a URL connection and passes the name of the file that needs to be moved:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    URLConnection urlConn = urlMove.openConnection();
    In the cgi-bin I have a perl script (fileMove.pl) that performs the move:
    #!/usr/bin/perl
    use CGI qw(:standard);
    $pfile = $ENV{?QUERY_STRING?};
    $cmd = ?mv stageArea/$pfile $pfile?;
    system $cmd;
    The Perl script works fine when I call it directly from Internet Explorer, but when I call the script from the Applet the file is not moved. Am I doing something wrong?

    Got it to work!
    Changed the Java code to:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    urlMove.openConnection();
    InputStream moveStream = urlMove.openStream();
    and in the Perl script added the line:
    print "Content-Type: text/html\n\n";
    The applet running my a PC is now effortlessly moving files on the unix server, wahoo.
    Aside: I also found that my applet web server and the files the applet reads/writes do not have to be on the same machine. In the applet's cgi-bin directory I created a "link" to the networked unix directory where the image files are actually located. I really expected the Applet I/O Security to complain, but it work like a charm. Go figure.

  • Call to JAVA code from VB

    i plan to write the interface(Presentation of the software, plz don't mistake it for java interface) in VB and all logic in JAVA...........Can you help me out. Is this possible? I mean can i make calls to JAVA code from VB ......?? Some references plz
    Thanks & Regards,
    Gurmeet S. Budhraja

    You can link the 2 projects VB and J# not Java, 'cause I don't think it's possible to like Microsoft to Sun

  • I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is click event message box will not working correct

    I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is button click event message box or popup window will not working correctly. Please any one suggest me the steps to overcome this not responding or slowness in the responding problem of Button click event.

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and protect users from unintentially damaging their Firefox, the option to disable JavaScript was removed from the Firefox Options window.
    However, the option to disable JavaScript was not removed from Firefox entirely. You can still access it from about:config or by installing an add-on.
    '''about:config'''
    # In the address bar, type "about:config" (with no quotes), and press Enter.
    # Click "I'll be careful, I promise"
    # In the search bar, search for "javascript.enabled" (with no quotes).
    # Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
    To Re-enable JavaScript, repeat these steps.
    '''Add-ons'''
    You can alternatively install an add-on that lets you disable JavaScript, such as
    *[https://addons.mozilla.org/firefox/addon/noscript/ No-Script] (to disable JavaScript on a per page basis, as required)
    *[https://addons.mozilla.org/firefox/addon/quickjava/ QuickJava] (to easily disable and enable JavaScript, automatic loading of images, and other content)
    Thank you and I hope this helps!

  • Can I get a native dump (Dr. Watson) when JNI code causes an exception?

    Is there a way to get the JVM to just not trap an exception, so that we can get a native dump? I have tried -XX:OnError="drwtsn32 -p %p". This did produce a Dr. Watson dump, but not a good one. I placed a deliberate error in the code, and called it outside of java, and got a good log file (with the fault in my DLL), but the same module called via JNI gave me a bad log file, with the fault point in ntdll.dll.
    This is happening in java 1.4.2. In the field, the jvm is provided by IBM Websphere 6 on Windows 2000. I'm unable to duplicate the error, but am running the above mentioned tests in my Eclipse 3.1 + Weblogic 8.1development environment on Win XP.

    Queer!
    This is not an error message I see when I try to execute a program not in my path!
    And when I do not specify libraries to be linked, I get a linking error!
    This seems to be a preprocessor error.
    What could it possibly be?
    Do you have the correct calling convention in the case of #ifdef __cplusplus ??
    I guess that should have been already done by your javah.
    I wonder.
    I also wonder if cl.exe actually stands for "command line" exe
    Can you pls send me all the files at [email protected] ??
    cheers

  • Can't figure, looking at the code what template is being called or where the template is in a .html.

    Can't figure, looking at the code in an .html file what templa
    te is being called or where the templa
    te is.

    Hi,
    please have a look to http://forums.adobe.com/message/3407051#3407051, point 4, where Murray explained "tool template".
    Good luck!
    Hans-G.

  • How can I make Applet call up a JFrame??

    hello ..
    I'm making a game, and I have a flash screen done in Applet (the very first logo that appears ) so I can just load it in the browser ... someone told me that I can't make another applet that would hold the menu choices and such come up in the same browser window, so I made it into a JFrame .. so I have an Applet calling up a JFrame, and I don't know how to do that ..
    any suggestions???

    Hmm...but that doesn't put it on the screen thgou, does it?
    IIRC applets embedded in the web page cannot contain menus - you have to 'break out' your applet so that it becomes a separate window.
    To do this you would have a small standard applet embedded in your web page which then invokes your main JFrame-based application (not applet!).
    When the user loads the web page, the embedded applet starts and then launches the JFrame-based application.
    eg:
    import java.awt.*;
    import java.awt.applet.*;
    public class RunApplet extends Applet {
        public void init() {
            MyApplet myA = new MyApplet();
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    public class MyApplet extends JFrame {
        private JPanel pnlCenter;
        private JLabel lblSomeText;
        public MyApplet() {
            try {
                myInit();
            catch(Exception e) {
                e.printStackTrace();
        private void myInit() throws Exception {
            //Create components to display...
            pnlCenter = new JPanel();  //Main container inside the frame.
            lblSomeText = new JLabel("GUI stuff displays here!");
            pnlCenter.add(lblSomeText);
            //Put them on the screen...
            getContentPane().add(pnlCenter);
            //Show it...
            setTitle("My First Windowed App");
            setVisible(true);
    }Hope this helps.
    Paul.

  • My phone needs a restore but I can not because my pass code is active. It only allows me to go to the emergency call screen. I can't type in my pass code What should I do?

    My phone needs a restore but I can not because my pass code is active. It only allows me to go to the emergency call screen. I can't type in my pass code What should I do?

    Thank you so much I actually did have restrictions enabled. Ur too sweet thanks again for your help

  • Iphone is locked with pass code but still we can make a call using voice control

    If our iphone is locked with pass code we can make a call using voice control.
    Press and Hold the Home button then you will get the Voice Control Menu.
    Choose Dial or Call then you can make call.
    Is it IOS Bugs or...

    It is a feature.
    You can disable it at Settings > General > Passcode > Voice Dial if you wish.

  • Can applet call IE?...

    Can applet call explorer?...
    That means if i have a applet class which show some details, then i wanna create the html page by using that details from applet and then execute it.
    Is it impossible to do that?
    As i known, there is Runtime class that can execute the program by using "Runtime.exec()" method, but we have to put the file's path(path that tell where the html file is...) as the parameter.
    But my problem is i did not prepare the html file before, it will be create on applet , and then exceute it to show on monitor...
    Do u have any idea?..
    Thank a lot..

    Your applet can call javascript, javascript can open a new window and set the
    text (html) for this window (document.write window.opener.sometext()).
    To call javascript from your applet:
              try {
                   this.getAppletContext().showDocument(
                             new URL("javascript: someJSMethod();"));
              } catch (Exception e) {
                   e.printStackTrace();
              }

  • Help! JNI code freezes inside printf() call

    Hi,
    I have a JDK 1.1.8 based java app that loads a JNI based dll. When I run the app from DOS prompt it is working fine. When I run the app from my IDE (i.e no access to console stdout/stdin), the app is freezing. So I launched VC++ 6x and attached to the Java app. Found that the JNI code that was trying to print trace messages using std C call "printf()" freeze inside printf().
    Is the lack of std dos command window an issue when running an app like this?
    I appreciate any pointers.
    Thanks
    Puri malluru

    Is the lack of std dos command window an issue when running an app like this?Could be. If the output is being redirected and the pipe is filling then the io method will block until the pipe clears. Perhaps the IDE has an output window that you need to open or init.

  • Call a C code in Java

    How is the best way to call a C code in Java ???
    Socket? Dll? ...
    And how can i do it ????
    I am creating a Interpreter in C. But the simulation is apresented
    graphically in a applet (Java).
    Thanks

    Look at the JNI section of the Java tutorial.
    http://java.sun.com/docs/books/tutorial/native1.1/index.html

  • Parsing documents in Java called via JNI

    My native application is in C running on WinXP, and I am attempting to call an API in Java using JNI. I am quite a JNI newbie so hopefully someone can shed some light on my issue. Everytime I attempt to parse a document in Java using:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true); // also tried false
    DocumentBuilder builder = factory.newDocumentBuilder();
    builder.setErrorHandler(this);
    Document document = builder.parse(new File(filename));I get an IncompatibleClassChangeError exception thrown. This happens when I parse XML, text, you name it. The Java code works fine outside of JNI. The C source snippet (minus the exception checking) looks like the following:
    testClass = (*env)->FindClass(env, "TestClass");
    testMethod = (*env)->GetMethodID(env, testClass, "test", "(Ljava/lang/String;)I");
    filename = (*env)->NewStringUTF(env, "test.xml");
    value = (*env)->CallIntMethod(env, testClass, testMethod, filename); Any suggestions would be very much appreciated.

    I believe I have found the problem, and it's (of course) an exercise in double-checking everything. It also makes me want to slay my predecessors for their confusing design choices.
    The class JNIMessage isn't in the class hierarchy of Message, though it appears to be if you're not inspecting the code closely enough. This is almost certainly the problem. I was looking in the wrong place; the JNI code is probably not suspect here.

Maybe you are looking for

  • How Can I View DVD Files?

    My guitar instructor shoots a short video (usually 5min or less) at the end of every lesson to help me review what we learned.  While these DVDs play just fine on my iMac, I'd like to copy them sometimes over to my iPad so I can view them when I'm tr

  • Table updation with field name

    Hi All, There is a question running in my mind. If i am filling multiple data in a same text area then whether it will update the database table for that column or not. Lets take an example. I have a workspace MTN, USERNAME: [email protected] and PAS

  • What's the best RAID solution for my iMac / MacBook?

    I think it's time I invested in a larger backup hard drive, and for data security I'm looking at 2-drive RAID devices. Is the Lacie 2Big Network good for this purpose? http://www.lacie.com/uk/products/product.htm?pid=10953 What's the reliability and

  • Scrolling in Facebook after ios6 update

    I am having jerky or slow scrolling in facebook, after ios6 upgrade. Its very annoying.

  • Re-Booting EX90

    Dear Guys, I have EX90, and I encoutered the problem that the unit is keep on re-booting.  I already tried the factory reset but the problem is still the same. Please kindly help for the solution regarding this problem.  Thank You.