JNI / external programs / big apps

Hi. We want to develop a hotel management software using Java Web Start and have a few short questions:
1. Is it possible to use JNI in Java Web Start programs for platform-specific functions? For example to access external harware on the serial port of a windows computer.
2. Is it possible to start external Windows .exe programs from within a Java Web Start program? Like the PDF-Viewer for example.
3. How well suited do you think are Java Web Start programs for bigger applications like our hotel management software? Our software consists of a reservation planner, a content management, has massive database access, multi language support, interfaces to telephone systems, etc. I'm a bit worried about the speed of the application...
thanks for your answer!
Beeli

Hello!
1. It is possible to use JNI using JWS, see <nativelib> tag.
2. I think it is possible to run native programs if you grant the permissions. See <security> tag.
3. JWS consumes time to download the application (and its updates) at the start. But when the application is running JWS doesn't change the speed of your application. Even though you've got massive database queries...
Arno

Similar Messages

  • Leaving external program running and closing my app.

    Hello,
    I'm calling an external program from my java code and that program takes about 1hr to end its tasks so i want to en my calling program meanwhile.
    Is there a way to do this?
    thanks in advance!

    - I dont really understand what you need.
    Sorry I mean: I want to enD my calling program meanwhile
    - to close the java app and leave the another app running?
    My caller program is a console based program
    The program to be called is started by .sh script in unix/.bat in windows
    The caller program performs the call to the second and the second program is started but the problem is the caller program never ends, it just waits to the called program ends its tasks and then it ends. I dont want this.
    I want the second program be started and the caller program can ends without taking care in which moment the second program ends, of course in automatic way, with no final user ending the caller program.

  • Invoke External programs from inside App Server

    hi,
    How can I invoke an external program from a session bean (or from an MDB)?
    Can I use Runtime.exec() directly from a bean?
    If so, are there any security considerations?
    thanks,
    Sundar

    I found this article rather helpful:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to execute external program in java?

    My question is how to execute an external program in java.
    I need to call a unix command in java.
    Thanks.

    it depends on what you are trying to do. Following are the two methods
    1. Runtime.exec() : this method allows you just to call an external program as a seperate process
    2. JNI (Native Interface) :- As of right now only C and C++ are supported by this method. This method allows you to directly call the C/C++ methods from JAVA

  • Language other than bash for calling external programs

    Hi,
    sorry for the unspecific title, I couldn't think of a better summary.
    The problem is this: I have written a script to encode a DVD to H264 and Vorbis. Since it basically just performs some (OK, by now: A lot of.) management and then calls a external programs, Bash was the obvious choice.
    However, the administrative stuff the script does (evaluating user input, calculations etc.) was already a nightmare to code in Bash (lack of arithmetic, lack of data types, proper functions, lack of c-like structs etc.), and I now want to make it even more flexible in what the user (me) can ask of it (it's also going to use a config file, which is another thing that gets ugly fast). Frankly, I can't stomach that.
    So the question is this: What language would be sensible for a program the most important function of which is calling other programs?
    Simply executing them from the main program isn't enough, unfortunately, because I want to make use of multicore system by for example simultaneously extracting streams and encoding them (right now that is done through named pipes), ideally I'd need a way to multithread not internal functions/routines but external programs (Through pipes or whatever).
    I'd prefer an interpreted language, but it's not a requirement.

    I second what peets said. Perl is definitely you're best option here, in my opinion anyways. It has the best (by which I mean easiest) system interface of any scripting langauge I've worked with, and if you want a simple configuration file reader, perl's regex'es are king. Perl also takes a lot of features from the shells, such as the file test operations. If the project get's really big and hairy though, it might be worth considering python as a cleaner, stricter alternative.
    Hope that helps!

  • Opening External Programs

    Is there a way to open an external program from adobe javascript? For example. I want to invoke my external program located in:
    c:/Program Files/SignaXure/SignaXure.exe
    How can I write a script so that when I press a button the program above opens (separetely and independently). I am not experienced with javascript but I know in visual basic I could use a Shell(ProgramPath) command to do the trick.
    Thank you in advance...

    I thank you for your support. I am a windows mobile programmer and I programmed an application that allows you to use your PDA as a signature pad and then import the signature into your Windows PC. I realized that if I have a copied image in the clipboard and can easily paste it into any PDF file within Acrobat and my program does exactly that; it imports the image into the PC and then it loads it into the clipboard. The problem was that acrobat doesn't support a menu option for "Paste", so I googled around to see if I could use javascript to simulate sendkey for ctrl + v to paste but I had no luck. In the end I tought it would be easier if I reprogrammed my program to run in the background and just use a script within Acrobat to launch my application, then my app would initiate the signature capture process and automatically paste the image into Acrobat. But it seems everything I try ends up in a dead end, and in part it's due to the imposed limitations of Acrobat.
    I hope you understand where my frustration comes from - but don't get me wrong; I love Acrobat. Any ideas of how I could acomplish what I need? Maybe there might be other methods in Acrobat that I'm not aware of. Please share any ideas you might have...

  • AIR-Calling External Program

    hi, i am making an AIR application and i want to execute an external program through this, or suppose that i want to call a java program on client machine, i don't want to have any server to do this, is there any way to do that ?, plz let me know
    With Regards
    Amar Deep Singh

    I think your only option might Merapi, and that might only be for linking AIR and Java apps.
    http://merapiproject.net/
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance
    www.ChikaraDev.com
    Flex Development, Training, and Support Services

  • I can't download any external programs like Skype,firefox etc.I had skype installed before but it somehow disappeared .Mine is a macbook pro 2011.Any suggestions?Thanks

    I can't download any external programs.It used to work fine before.I had downloaded skype few months ago and then it suddenly dissapeared.When i tried to download firefox,chrome,skype etc it downloads as .dmg extension.I drag it to applications folder.Nothing happens after that,can see the download but w/o the logo of skype etc.I followed one suggestion..went to library>preferences>deleted the .psp lock file>emptied trash>downloaded skype again but still the same.
    Could it be security issue?Mine is a pre owned mac bought 3 months ago.I have now registered the serial no and apple id and transferred to my name.
    Any suggestions? Thanks

    A .dmg file is a disk image file. If you double-click it, it will mount and look like a hard drive is attached.
    Once you've mounted the disk image, you should see either an application that you drag to your Applications folder or an installation app. Just follow the instructions and the app you've downloaded will be installed.
    Good luck,
    Clinton

  • How can I execute an external program from within a button's event handler?

    I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
    I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
    I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
    I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
    So, then, how can I do this?
    Thanks
    Ted
    NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
    NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
            try {
                java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
                //pn.directory(new java.io.File("K:\\work"));
                java.lang.Process pr = pn.start();
                java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
                String tmp = new String("");
                byte b[] = new byte[1000];
                int i = 0;
                while (i != -1) {
                    bis.read(b);
                    tmp += new String(b);
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
            } catch (java.io.IOException ex) {
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
            }

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • System exec, How I say to open one file and make operation in external program?

    Hi,
    I got called an external program with the system exec.vi, but i would like the program open the file saved in the other window, i can get the file path, but how Can I put the file path in the external program and the program open the file and I tell (in this case compile), since i open one file code c and only i must to open and say to the program 'compile' and then close external program.
    Any help?. Thanks.
    Attachments:
    system_exec.GIF ‏8 KB

    Hi Fonsi,
    System Exec.vi will allow you to run commands like launching a program easily but it is difficult and many times not possible to execute commands within an application.
    A better way maybe to approach this though ActiveX. Please look at the following example that uses ActiveX to communicate with Excel.
    Writing Rows to Excel 97 and Excel 2000 Using ActiveX
    If you are not familiar to ActiveX and LabVIEW, please read the document below:
    ActiveX and LabVIEW
    I hope this
    helps.
    Sincerely,
    Feroz
    National Instruments

  • How can I display files in external program like Word?

    Using NetBeans 6.5, IE7, Windows XP
    I have not had any luck attempting to get a PDF file to display in a separate browser window,
    so I thought I might try to combine that with a new issue.
    I have 3 file types - jpg, rtf and pdf that should be able to be displayed in external programs like Word or Adobe.
    Is there a way to start an external application and pass the file name from a backing bean?
    The files would be located on the server in a directory that is mapped to the client and the applications (Word, etc.) would reside on the client.
    Can this be done from within the confines of a JSF application?
    Thanks

    I was kind of hoping that someone could point me to an example of how to do this.
    I've tried the servlet approach, but can't seem to get the file to display in a separate browser window.
    That is why I thought about maybe launching a separate application, if that is possible.

  • How can an add-on like Firesheep access and execute an external program like Winpcap? Is that a security flaw in Firefox?

    I have been reading about the Firesheep add-on that allows the user to hijack sessions of users on the network by stealing the cookie. I understand that to prevent any application from stealing the cookie, the cookie should not be passed by the site without SSL. However, my understanding of how Firesheep works is that it interfaces with Winpcap (a network sniffer). So my question is "How can an add-on execute an external program or operating system command like Winpcap?" Can any add-on do this and should I be extremely afraid of downloading any add-on because of the potential that it could have complete access to my system?

    Hi Scott-L.
    You asked a very good question and it turns out you're right.
    However, one must be aware that download an Addon on another website that Mozilla may be dangerous. Indeed, the Addons found on the Addon Center are checked (roughly).
    In addition, Firefox includes a blacklist that blocks addons identified as malicious.
    More information here: [http://www.computerworld.com/s/article/9193420/Mozilla_No_kill_switch_for_Firesheep_add_on?taxonomyId=17&pageNumber=1]

  • How do I call an external program

    From within my Java program I want to execute an
    external program and dump the output into a string
    or array of strings. In perl this is trivial $a=`dir`.
    How do I do it in Java?
    Thanx,
    Art.

    with Runtime
                try {
                        Process p = Runtime.getRuntime().exec("cmd.exe /c dir");
                        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
                        String str = "";
                        while((str = in.readLine()) != null)
                            //do what you want to with input
                        in.close();
                    catch(Exception e)
                        e.printStackTrace();
    [/code[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • When I call an external program from Labview, how can I embed the interface into the front panel?

    I'm running Labiew 6i for Linux. I'm using a system exec.vi to call an external program to do image manipulation (since there is no IMAQ for linux). How can I embed the user interface of the external program into the front panel of Labview?

    As far as I know, the only way to embed other GUIs in LabView is an ActiveX in a container.
    As long as you are using Linux, try to place (moving them on the desktop ) the two windows linked (like those 3 of WinAmp).

  • How can I run an external program without quitting Firefox?

    I want to run an external program from within Firefox, much as Outlook express is run from the email button. How do I set this up?
    Firefox doesn't import my Bookmarks from the listed html file. Any cure for this?

    I don't want to run the mail program, I want to run another program.
    Maxthon allows me to do this using External Tools. Does Firefox allow me to run other programs without leaving Firefox?
    2. Firefox allows me to load an html file which contains my bookmarks, but it doesn't load the bookmarks file. is there a solution?

Maybe you are looking for

  • Audigy 4 (not pro) to yamaha home theatre (htr-5

    ok, i read the help stuff but my questions arent being answered. Curently I have a jack that plugs into my card, (in the digital output - black) that then is connected to an rca cable via a connector. I plug the RCa cable in my digital input slot on

  • Problem with showing focus points in 3.5.1 & 10.9

    I cannot always display the focus points either by using Option + F or View > Show Focus Points on my MBP, late 2012. Prior to 3.5.1 & 10.9, either one of these commands would always display or remove, the focus points. At times I can restore the foc

  • Could not create JCOClientConnection for logical System: SAP_R3_HumanResour

    Hi, For all the standard ESS (sap.com) the JCo connection used is SAP_R3_HumanResources . All the applications are working fine. I am trying to add a test Component in one of the (sap.com~eepro) for testing a standard BAPI call for getting user detai

  • 02 3G  pay as you go not displaying number at top of contacts

    Hi I have changed the number on my I phone using the PAC code - I now recieves calls as my new number. Hoever the contacts list does not diaply any number at the top (used to display the phones original number) and my iTunes Summary page still displa

  • Cannot insert value with : into BLOB field

    I am using Oracle 10g Express Edition. Attempting to run this insert from the SQL Commands page: INSERT INTO table1 (col1, col2) VALUES ('one', '\"2.001:2372.002:002.005:Y2.018:G') Table1 info: col1 = VARCHAR2(25) col2 = BLOB After I click Run an Ent