Running and application without java

Hi,
I have made an application installer (in java) for my project..
My concern is that how can i run my installer on a machine that doesnt have java installed on it,, possible solution could be to bundle the jre withmy installer and via batch file set the path pointing to my jre..but I dont want the black cmd line window to be appeared..
By the way install shield and other installers uses their own jre ,, I want to know how do they do that..
Thanks in advance
Dexter108

I very much doubt you can do what you want. How can a Java program run without Java installed ? It is not possible.
If Install Shield, etc do it somehow as yourself 'Are these programs written in Java or some other language?' I suspect they are written in C++ and so can do what they like as far as being able to install a JRE because they are not dependent on Java being installed.
You would be better Zipping up all the files you need (including the JRE installer) and using this as the installer. This would at least provide the user with all files required. They can then manually run the JRE installer and once they have done this your app should work.

Similar Messages

  • Help! Run AIR Applications without Adobe AIR.

    Hello, I wanted to ask that is there any way to run AIR applications without having Adobe AIR in the computer. It's really annoying when you have to give someone your application to use and then the person needs Adobe AIR to run it. Any suggestions?

    Where to start...
    AIR is a lot like Java in the sense that it requires a run-time engine to be installed. This engine has all "things" required to for the application to run. In a similar way, applications such as 3DMax or Word require that the operating system be present for them to run. Those programs are written using API calls that are present within the target operating system. Likewise, AIR and Java apps are written using API calls that are present within their run-time. To bring it full circle, AIR is an application written in C, that uses APIs for the target operating system. So, when you perform certain functions within AIR, it then knows how to execute needed operating system functions (as needed). AIR also provides a lot of higher level functionality and management that make your life as a programmer a lot simpler.
    Looking at iOS or Android, we have the same thing happening. Some developers are writing apps using Objective-C (iOS) or Java (Android) that are using APIs specific to those operating systems. This is the same as writing your app in C like 3DMax.

  • Run External application without Exiting main application

    Hi,
    I am trying to implement a function that executes the external program from within my java application. I am using windows xp. I had googled for this and found some code but so far I am able to run the application in a condition if my main application exits. Instead I want to run the application without exiting my main application. How can I do that:
    Code I am using is:
    ========================
    try{
    Runtime.getRuntime().exec("external program");
    System.exit(0);
    catch (Exception err){
    err.printStackTrace();
    System.exit(-1);
    =========================
    my problem is I cannot run the external program without the line "System.exit(0)". If I remove that line, the external program only starts after I exit my main java application. Is there a way to run the external application without leaving the main application?
    By the way I am using the latest version of JDK 6 update 2 and Netbeans 5.5.1
    Thanks

    I tried and I tried and I couldn't make the same problem occur unless I specfically had a long task execute BEFORE calling the runtime command. See the code below:
    I tried a bunch of things, including having a GUI run before the Runtime call, after the runtime call. Neither affected the movie from being played.
    I tried with different versions of the runtime command, none of it made a problem.
    I tried running the application with a long task that would keep the main thread busy for a while AFTER I launched mplayer - no problem.
    The only thing that made the app work the way you describe was when I built the long task that keeps the main thread active for a while BEFORE I launched mplayer (which is the state of the code as I pasted it below).
    So my guess is that you have a single threaded application and you add the call to mplayer at the very end of your program's execution - thus it doesn't get called until the last thing. My suggestions:
    1) Move the call to the Start of your code, not the end
    2) Move your other work to a new thread so that it can be kicked off without holding the main thread in check.
    package movies;
    import inheritance.BaseWindow;
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        OutputStream os;
        StreamGobbler(InputStream is, String type)
            this(is, type, null);
        StreamGobbler(InputStream is, String type, OutputStream redirect)
            this.is = is;
            this.type = type;
            this.os = redirect;
        public void run()
            try
                PrintWriter pw = null;
                if (os != null)
                    pw = new PrintWriter(os);
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    if (pw != null)
                        pw.println(line);
                    System.out.println(type + ">" + line);   
                if (pw != null)
                    pw.flush();
            } catch (IOException ioe)
                ioe.printStackTrace(); 
    public class MyMainClass
        public static void main(String args[]) throws InterruptedException
             //This is just a GUI as a test
            BaseWindow bw = new BaseWindow();
            bw.show();
            //Keep App Running for a while
            int count = 0;
            while (count < 200) {
                 Thread.sleep(20);
                 count++;
                 System.err.println(count);
            if (args.length != 1)
                System.out.println("USAGE java movies.MyMainClass \"<movie to play>\"");
                System.exit(1);
            try
                Runtime rt = Runtime.getRuntime();
                //String[] cmds = new String[] { "cmd", "/c", "C:\\Mplayer\\mplayer.exe", args[0]};
                //String[] cmds = new String[] { "C:\\Mplayer\\mplayer.exe", args[0]};
                //Process proc = rt.exec(cmds);
                Process proc = rt.exec("C:\\Mplayer\\mplayer.exe "+args[0]);
                // any error message?
                StreamGobbler errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERROR");           
                // any output?
                StreamGobbler outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUTPUT");
                // kick them off
                errorGobbler.start();
                outputGobbler.start();
                //Keep App Running for a while
    //            int count = 0;
    //          while (count < 2000000) {
    //                 Thread.sleep(200);
    //                 count++;
    //                 System.err.println(count);
                // any error???
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);
            } catch (Throwable t)
                t.printStackTrace();
    }I will restate myself:
    "I was not able to repeat the problem, except as described, as long as I took the hints mentioned in the article I posted into account and actually put them into action."
    Of course, as soon as I ignored those hints, I was able to reproduce the error described above quite easily in all the different tests I made... But I guess the OP implemented those fixes, right? He did say he read the article...
    Message was edited by:
    stevejluke

  • Java Web Start 1.6 fails to start application without Java Consol on Vista

    Hi All,
    I've faced with problem related to starting my application in IE 7 on Vista SP1 using Java Web Start (JRE 1.6.0_12 and 1.6.0_13). I suppose that issue appears after 11th update of JRE 1.6 since it works fine before.
    There were set settings to indicate initial and maximal size of the Java heap in the JNLP file.
    Application consist of 2 JAR files and they are signed with the same certificate.
    When user tried to start application there is no any activity after accepting certificate. After starting application javaw.exe just disappeared from processes list without any message or error.
    When I changed default setting in Java Control Panel to show Java Console, I noticed that the application began to start. But it's not a solution of the issue, since all customers cannot be required to turn on Java console.
    I believe this is a bug in JRE as the application starts with Java console and doesn't without it.
    When I browsed the web looking for the solution or an advice I found Release notes for 1.6.0_014 where it was said that 6u14 Java Web Start failed to launch and notifies that JARs were not signed, if an insecure Java system property was specified in a sandbox JNLP file. In spite of that 14th updated wasn't used and there was no notification I tried to start application without settings for the Java heap and it worked.
    Could someone help me with advice, since the application cannot be started with default heap size settings.
    Thanks in advance.
    Edited by: vovanst on Jul 28, 2009 8:06 AM

    Hi,
    as the 6u15 just arrived and the above mentioned bug should've been fixed (though I was unable to verify through the release notes), the error is still in there.
    We have no timestamped jars, neither ours nor the bouncy castle ones, all certs are valid, ours is self signed.
    6u13 runs, 6u14/6u15 won't.
    I followed the instructions here: http://bouncycastle.org/devmailarchive/msg10415.html to no avail.
    The bcprov.jar is wrapped in its own jnlp and referred as extension from the "main" jnlp.
    The interesting parts of the stack trace are these:
    Caused by (via getCause): java.lang.SecurityException: JCE cannot authenticate the provider BC
         at javax.crypto.Cipher.getInstance(DashoA13*..)
         at javax.crypto.Cipher.getInstance(DashoA13*..)
    Caused by (via getCause): java.util.jar.JarException: Cannot parse https://localhost:8443/deploy/bcprov.jar
         at javax.crypto.SunJCE_c.a(DashoA13*..)
         at javax.crypto.SunJCE_b.b(DashoA13*..)
         at javax.crypto.SunJCE_b.a(DashoA13*..)
         at javax.crypto.Cipher.getInstance(DashoA13*..)
         at javax.crypto.Cipher.getInstance(DashoA13*..)
    For me it seems there's a problem with resolving the url of the bcprov.jar, which would explain the lack of a delay which normally occurs when JCE verifies the signature of the bcprov provider classes. The error pops up almost instantly.
    I'm clueless what to do now. Did Sun really achieve to completely destroy JCE provider functionality in Javaws, forcing us to use an alternative implementation?
    Patric

  • Unable to run my application using java web start

    i have created one application and use java web start to download the application. all the files are succesfully downloaded but when i try to run the application an expected error occur. this only happen in my machine but not in other machine i'm currently using
    -jsdk1.4.2
    -windows 2000 professional 5.00.2195 service pack 3
    -pentium III 870 Mhz
    -x86-based PC
    -RAM 256 Mhz
    Anyone knows why, plz help me with this puzzle

    Please post the information from the Web Start "Exception" and "Wrapped Exception" tabs when the error occurs (I assume the error was in fact unexpected ;-)
    A blind stab in the dark would be that you don't have write permission to the cache directory on the second machine. Also worth checking that the proxy settings on the second machine are the same as the first (if they are on the same network).

  • How can i run external application without specifying the full path?

    for example, ms word executable file is winword.exe, but in java i am using the following command:
    Runtime.getRuntime().exec("\"C:\\Program Files\\Microsoft Office\\Office10\\winword.exe\");
    the thing is, i dont know where ms word is installed on every machine, so rather than making an assumption, do you know how i can run ms word without specifying the full path?
    thanks

    1) You could ask the user to tell you where it's at (and remember for next time)
    2) You could do a file search for it (and remember it for next time)

  • Run Swing application without opening DOS prompt window

    is it possible to run a Swing application without opening a command interface window in MS Windows?
    thanks

    Don't know if you mean that, but if you try to call javaw.exe instead of java.exe there pops no prompt up.

  • Run .air application without installation?

    Is it possible to have a .air file or something similar which
    runs in the AIR runtime but does not need to be installed?
    Something like an executable or maybe like Java .jar file.

    Hi Rob,
    There's one primary reason, and that is for client testing
    cycles. I've not done many AIR projects but I've immediately found
    clients hesitant to "install" anything that is not final. Of course
    I tell them that AIR has a very lightweight installation, can be
    easily updated as I make new versions, etc, but... you know
    clients. Then I might make a mistake, like change the app id and
    they end up with two versions installed and have a conniption. So
    it would be nice to give a client a single file they can just run
    and see how they like it, especially for early versions of a
    project where we are mainly testing UI experience, not
    functionality.
    Other than that, it's more of a nice-have for some situations
    with little utility apps than anything critical. There may be
    installation permission reasons or running from external device or
    other reasons for some people, but that does not really apply to me
    at this time.

  • Want To create Zip file  using java,And Unzip without Java Program

    I want to create a zip text file using java, I know Using ZipOutputStream , we can create a zip file, , But i want to open that zip file without java program. suppose i use ZipOutputStream , then zip file is created But for unZip also difftrent program require. We cant open that zip file without writing diff java program.
    Actually i have one text file of big size want to create zip file using java , and unzip simply without java program.Its Possible??
    Here is one answer But I want to open that file normal way(
    For Exp. using winzip we can create a zip file and also open simply)
    http://forum.java.sun.com/thread.jspa?threadID=5182691&tstart=0

    Thanks for your Reply,
    I m creating a zip file using this program, Zip file Created successfully But when im trying to open .zip file i m getting error like "Canot open a zip file, it does not appear to be valid Archive"
    import java.io.*;
    import java.util.zip.*;
    public class ZipFileCreation
         public static void main (String argv[])
         try {
         FileOutputStream fos = new FileOutputStream ( "c:/a.zip" );
         ZipOutputStream zip = new ZipOutputStream ( fos );
         zip.setLevel( 9 );
         zip.setMethod( ZipOutputStream.DEFLATED );
    //     get the element file we are going to add, using slashes in name.
         String elementName = "c:/kalpesh/GetSigRoleInfo092702828.txt";
         File elementFile = new File ( elementName );
    //     create the entry
         ZipEntry entry = new ZipEntry( elementName );
         entry.setTime( elementFile.lastModified() );
    //     read contents of file we are going to put in the zip
         int fileLength = (int)elementFile.length();
         System.out.println("fileLength = " +fileLength);
         FileInputStream fis = new FileInputStream ( elementFile );
         byte[] wholeFile = new byte [fileLength];
         int bytesRead = fis.read( wholeFile , 0 /* offset */ , fileLength );
    //     checking bytesRead not shown.
         fis.close();
    //     no need to setCRC, or setSize as they are computed automatically.
         zip.putNextEntry( entry );
    //     write the contents into the zip element
         zip.write( wholeFile , 0, fileLength );
         zip.closeEntry(); System.out.println("Completed");
    //     close the entire zip
         catch(Exception e) {
    e.printStackTrace();
    }

  • How to run and compile a java servlet on Tomcat?

    Hi, I am very new to servlets in Tomact.
    I went to the java tutorial and from the address below I copy an example (SimpleServlet).I try to run and compile it in Tomcat, But I don't know how can I do that. I appreciate if somebody tell me the command line for compiling and running this example and the necassary steps. (My Tomcat is installed perfactly).
    http://java.sun.com/docs/books/tutorial/servlets/overview/simple.html
    Thankx

    Hello,
    I have the similar question.
    Instead of going thru sun's tutorial, I tried onjava's ("http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1").
    I could see the jsp page, but when I tried to add a servlet, I got an error "Page not found". I followed exactly the same way they describe. The only thing I noticed was the resulting page on the tutorial had the URL of ".../servlet/...".
    Is this "servlet" directory something we are supposed to create our own? If so, under what directory? Or do we need to set up anything in order for the servlet to be referenced that way?
    Thanks in advance.

  • How to run Other application from Java

    I want to run other applications such as IE.exe, notepad.exe from Java? How can I run?

    Dear Friend, the following is the code to open IExplorer from Java Program
    class RunTimeTest {
    public static void main(String args[]) {
    try {
    Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\IEXPLORE.exe");
    catch(Exception e) {
    [\code]
    ALL THE BEST
    Shiva                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Run JSF Application without MySQL Installed in LAN...???

    Hi all,
    I am developing JSF Application with MySQL as backend. Now I want to test it on the LAN in which I don't want to install MySQL. I have a ".sql" file of my DB. Can Anyone suggest me How can I achieve that?
    If it is possible then, please explain it if possible........
    I know that, web application is for server, but my requirement is something like that. I have to create a package which runs my application on LAN, rather than on Internet. So want the solution for that. Any help will be appreciated.
    Thanks in advance,
    JSF GEEKS

    Thanks for your reply,
    But, can you explain in detail, because I don't know much about that. I have one .sql file and now what I should do for that. If is there any link or some tutorial for that then it will be great for me.
    Thanks for your support,
    JSF GEEKS

  • Can I Run WebDynpro Applications without Installing EP .0

    Hi,
    I Have Installed Netweaver Developer Studio 7.0 .on My Machine.
    Can Any one Tell me that Without Installing Enterprise portal can i Run Webdynpro Applications.
    Reply ASAP.
    Regards
    Kiran

    Hi julio Alberto,
    Thanks for U R Reply.
    I am New to Webdynpros.
    I am Having Pack of Dvds but i Dont which DVD contains WAS?
    Give the name of the DVD.So that I can Install WAS?
    Reply ASAP
    Regards
    Kiran

  • Help running an application with java

    public void actionPerformed(ActionEvent event)
          if (event.getActionCommand().equals("Application"))
              getContentPane().runApplication(Application);
    }What would replace "runApplication(Application)"?
    Thanks.

    What on earth are you trying to do with that code?
    Do you just want to execute an external application via java, such as with the Runtime.exec() method?
    try {
       Runtime.getRuntime().exec(...);
    } catch ( ... )Something similar to that?

  • How do I run my application without the java prefix?

    Hi, I am new to Java but have been created some cool applications that run in the terminal.
    The problem is that every time I run my program I have to type "java +<program name>+", even after I compile the program with javac.
    My question is how do I make it so I can just type "<program name>" without the prefix of "java"?

    Write a shell script that includes the command you want to run.
    Edited by: pbrockway2 on Apr 5, 2008 3:27 PM
    I guess you're using Windows (or you wouldn't be asking ;). If so, shell scripts are called "batch files". Have a read of this:
    [www.computerhope.com/batch.htm|http://www.computerhope.com/batch.htm]
    (Executable jar files are another approach, but they are quite a bit more work. If your intention is to run a particular command like
    java MyAppthen a batch file is easiest.)

Maybe you are looking for

  • My monitor is not recognized correctly before I'm logged in.

    I have a Dell U24H14 monitor. Connected with a Mini DP to DP port cable. In preferences I've set the monitors to extends. Not duplicate. This is al working just fine. BUT: When I boot my MacBook, with the monitor connected, half way during the boot p

  • IMac to Vizio VX32L HDTV

    Wanting to connect my iMac to the tv. i'm kinda of confused as to which way I should go. First off, Mini-DVI out, right? If so, then M-DVI to RGB or HDMI? Am I going to need an adapter like the macbooks?

  • Os 9 problem

    amimated pics will not display correctly message appears shortly after os 9 starts coping from mac os x to a classic application failed you may be able to copy between mac os x and classic applications. if not, you need to restart classic that is exa

  • Send a Link to the client

    Can i send a link to the client rather than sending it through echo sign database? I am trying to add a link to my email so that my client can just click on the link and sign the document

  • Library indirect jump bug?

    I wanted to get oratcl running and experienced "core dumps" all the time. A bit of investigation indicated that the small code snippets that essentially do jumps to the real code via jumptables (in the client object libraries) will be relocated with