Can we have a java application with out need of JVM??

Hi
Does java support exe kind of installable like in c/c++( is it platform dependent)?if so who it works??
Can we right an application, which run on any machine (i.e. platform dependent) with out need of JVM installed on that machine�

The short answer is no. A slightly longer answer.
There were attempts to compile Java to native code. I remember playing with such a compiler: TowerJ. If you do this, you will end up with native executables, but not only one. You will have one per platform. Hopefully you will find compilers like this for all platforms (unlikely) or at least to all platforms you expect your application to run on. Compiling Java like this is complex and it may have all kind of restrictions.
Symantec VisualCafe (out of business) now, provided a feature by which you could turn your Java program into a Windows executable. It was a bid executable containing a small native stub, the VM started by the stub, all the JDK classes and all your classes. It was still running under a VM, but this fact was hidden from you. I am pretty sure this concept is alive, just Google for it.
If you drop the requirement "without VM" only to "without user having to install the JRE", you can survive. You can package the Sun VM with your application (legal, but read the conditions) and than install both. The user does not know what you install, the VM is just another component of your application among others that make it work. You do not need an installer for this, a ZIP with all the stuff inside does the trick.
Note that again, you will need to create separate installers/zips for every platform supported, because the JRE part is not the same.

Similar Messages

  • How can i run my java program with out java language

    Hai to every one ..Iam new to java language ...am using windows xp operating system , i did not installed java language in my system .. how can i run a java program with out installing java language... Which files is requied to run java program..?
    any one can help me??

    Hai to every one ..Iam new to java language ...am
    using windows xp operating system , i did not
    installed java language in my system .. how can i run
    a java program with out installing java language...
    you ... can ... not ... do ... this
    Which files is requied to run java program..?
    any one can help me??a JVM. Download it from sun's website.
    [url http://java.sun.com/javase/downloads/index.jsp]Download JavaSE here

  • How to ran a java application with out console?

    Hi
    I have developed several applications using java. I'm trying to run them on windows platform. The way I run them now is by openning a CMD window and by typing java -jar myjarfilename.jar
    This way cmd window remains on windows taskbar/desktop untill I close the java application.
    Is there any other way to run .jar files on windows?. Am I using a wrong compilation tool?
    Basicaly is there a way to run an application developed using java or .jar files like a normal win32 application (By dobble clicking on an icon)
    Please help.
    Thanks.

    If you install the JRE, it associates itself with jar files, thus allowing you to double click on them to run. Other than that, if you want to be able to double click on an app for it to run, you will have to write a native wrapper around the JVM.
    Now, to run your app. making the command window dissapear, all you need to do is invoke the command with javaw.exe, instead of java.exe (notice the W in the first .exe). This runs java without a command window. If you still have your command window appear, prepend "start" to the call to javaw.exe. E.g.:
      start javaw.exe -jar myjar.jar
    HTH,
    Manuel Amago.

  • How can I run a Java-Application with a Desktop-Icon ?

    Hello,
    I have got a problem: I want my Java-application directly by clicking on a desktop icon. Is there anybody who can tell me how to do so ? (I don't want to change my application into an exe File !!!).
    It would be nice if you could give me a detailed explanation (or a link to thus) because I'm not used to the Windows-Classpath System (...as far as I need this...I don't know).
    Thank you very much,
    Findus

    Ok...in the syntax just postet I forgot to set the absolute path of the file...but eveb if I do so it does not work...here the variations I tried...
    D:\j2sdk1.4.1_01\bin>java D:\Viever\Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:\Viever\Gui
    D:\j2sdk1.4.1_01\bin>java D:/Viewer/Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:/Viewer/Gui
    D:\j2sdk1.4.1_01\bin>java D:\Viewer\Gui.class
    Exception in thread "main" java.lang.NoClassDefFoundError: D:\Viewer\Gui/class
    D:\j2sdk1.4.1_01\bin>java D:Viewer/Gui
    Exception in thread "main" java.lang.NoClassDefFoundError: D:Viewer/Gui

  • Complex webdynproJava applications with out using Models.

    Hi Experts,
    I want some sample complex webdynpro JAVA applications with out using Models.
    Thank you,
    Usha.G

    HI
    chec this link
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
    hope you can get some complex application you need
    and check this thread
    how to create one complex project in web dynpro

  • Accessing Java Object with out any application servers

    Hi,
    I would be much thankful if any one guide/suggest me how to
    access an java object with out using any application servers.I am
    having an java object which holds dummy data and an mxml file which
    contains some text fields. My plan was to access the java object
    and put the dummy data in the text fields. I am using RemoteObject
    for this. I am not able to proceed further. Please help me.
    Thanks in advance
    Regards
    Karun Kumar

    You can check The Merapi Project it's still in the
    development phase but it'll allow to an AIR app invoke a java class
    and run it as it were inside your app. But that's something you
    can't take into production yet, why don't u wanna use a server
    backend?

  • I have a new ipad2 with out 3G, can I use my iPhone to teather to my iPad to get Internet?

    I have a new ipad2 with out 3G, can I use my iPhone to teather to my iPad to get Internet?

    If your carrier supports tethering with the iPhone and you have a tethering plan for your iPhone with your carrier, yes - via the iPhone's personal hotspot feature.
    http://support.apple.com/kb/HT4517

  • Can I export from Muse cc with out java script coding?

    How can I export from Muse CC with out Java Script Coding?
    I'm trying to create an custom email but email won't recognize Java Script, Only HTML.
    How do I export my tample from Muse CC using only HTML coding?
    Thanks in advance.

    Hello,
    It is not possible to selectively export only part of the code for the exported page(s). The pages that are exported, all the code for them is exported, and there's no way to export only the HTML and leave out the rest of it.
    Cheers
    Parikshit

  • I try to update or download apps but my credit card expired can I download a free app with out taking me to the payment method? Or I have to enter a new credit card ?

    I try to update or download apps but my credit card expired can I download a free app with out taking me to the payment method? Or I have to enter a new credit card ?

    you would have to enter your new credit card details

  • I do not have master card,visa card to make my apple ID,tell me how can I make my apple ID with out master card and visa card

    I do not have master card,visa card to make my apple ID,tell me how can I make my apple ID with out master card and visa card

    It will if you follow, exactly, the instructions on the page that lllaass included in the post above yours : Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method

  • Can we run a java application using Runtime.exec()?

    Can we run a java application using Runtime.exec()?
    If yes what should i use "java" or "javaw", and which way?
    r.exec("java","xyz.class");

    The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
    The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
    HIH
    ClassLoader cl = null;
    Class c = null;
    Class cArr[] ;
    Method md = null;
    Object mArr[];
    cl = ClassLoader.getSystemClassLoader();
    try{
         c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
    } catch(ClassNotFoundException e) {
    System.out.println(e);
         cArr = new Class[1] ;
         try{
         cArr[0] = Class.forName("java.lang.Object");
         } catch(ClassNotFoundException e) {
         System.out.println(e);
         mArr = new Object[1];
         try{
         md = c.getMethod("processPkt", cArr);
         } catch(NoSuchMethodException e) {
         System.out.println(e);
         } catch(SecurityException e) {
         System.out.println(e);
    try {            
    processedPkt = md.invoke( null, mArr) ;
    } catch(IllegalAccessException e) {
              System.out.println(e);
    } catch(IllegalArgumentException e) {
              System.out.println(e);
    }catch(InvocationTargetException e) {
              System.out.println(e);
    }catch(NullPointerException e) {
              System.out.println(e);
    }catch(ExceptionInInitializerError e) {
              System.out.println(e);
    }

  • Can we have a ui:tableRowGroup with in  ui:tableRowGroup...?

    can we have a ui:tableRowGroup with in ui:tableRowGroup
    please help me by providing a code snippet

    The short answer is no. A slightly longer answer.
    There were attempts to compile Java to native code. I remember playing with such a compiler: TowerJ. If you do this, you will end up with native executables, but not only one. You will have one per platform. Hopefully you will find compilers like this for all platforms (unlikely) or at least to all platforms you expect your application to run on. Compiling Java like this is complex and it may have all kind of restrictions.
    Symantec VisualCafe (out of business) now, provided a feature by which you could turn your Java program into a Windows executable. It was a bid executable containing a small native stub, the VM started by the stub, all the JDK classes and all your classes. It was still running under a VM, but this fact was hidden from you. I am pretty sure this concept is alive, just Google for it.
    If you drop the requirement "without VM" only to "without user having to install the JRE", you can survive. You can package the Sun VM with your application (legal, but read the conditions) and than install both. The user does not know what you install, the VM is just another component of your application among others that make it work. You do not need an installer for this, a ZIP with all the stuff inside does the trick.
    Note that again, you will need to create separate installers/zips for every platform supported, because the JRE part is not the same.

  • Getting notification back to java application with Goldengate

    Hello,
    I am new to using Golden Gate. I have a java application running in an application server environment using Oracle database. We plan to use Goldengate to receive data directly in the database from external database. I have few questions in using goldengate:
    1. Is there a way for my application to know that database change to a table has happened?
    2. I came across goldengate and jms notification. Is there a non-jms way using java API for my application to know real-time that change has happened to database table?
    3. Are there any samples for this type of feature?
    Thank you.

    There is a Java API that can be used directly, rather than just using the built-in JMS delivery.
    The way it works: "extract" reads a trail, as the data is read, events are generated, and your custom event handler can receive these events. Types of basic events are "transaction begin", "new operation (insert, update, delete)", "transaction commit". These events are basically replaying what has happened on the source database; so, for example, if on the source DB you have "begin tx" + "insert" + "update" + "commit", then your custom Java event handler will receive an event for "begin tx", "insert", "update" and "commit".
    One thing to consider early on: the event handlers can work in one of two "modes". Either an entire source database transaction can be cached in memory and processed at once, OR you can process one operation at a time. The latter is typically preferable, since any DBA or batch job can be executed on the source DB that updates a few million rows at once, which could cause your JVM to run out of memory in "transaction mode" as it tries to cache this in memory. On the other hand, in "operation mode" you only need enough memory to hold one operation at a time, but you don't know what operations have already happened or what will happen. In "operation mode" you are free to cache your own data in your custom event handler, though -- as much or as little as you need.
    Note: GoldenGate only captures committed transactions, so you won't ever receive rolled back database transactions; however , there may be "interruptions" in the GG trail if/when a GG process abends & restarts. This puts a virtual "rollback" into the trail (technically, it's a restart/abend marker) which a GG replicat fully understands. The GG user-exit API prior to v11.2 does not pass RestartAbend events to any user-exits -- including the Java adapter. Long story short, your source "extract" (the one capturing changes from the source DB) must create trails with the "Format Release 9.5" qualifier, or (equivalently) specify "RecoveryOptions OverwriteMode". If you do this, then there will be no "restart/abend" markers in the trail. However, under certain (odd) circumstances, it may not be entirely possible to create trails in this format. The format 10+ trails (aka "RecoveryOptions AppendMode") are slightly more resilient to system failures, and do have additional file header info that is not available in "format 9.5" trails. Although GG 11.2 is available, the user-exits (the Java adapter & flat-file writer) that use this new API are presently not yet generally available.
    Ok, with the caveats out of the way, here's a code sample:
    package tst;
    import com.goldengate.atg.datasource.*;
    import com.goldengate.atg.datasource.GGDataSource.Status;
    public class HelloWorldHandler extends AbstractHandler {
      private long numTxs = 0;
      private long numOps = 0;
      private long numCols = 0;
      @Override
      public Status operationAdded(DsEvent e, DsTransaction tx, DsOperation operation) {
        super.operationAdded(e, tx, operation);
        numOps++;
        numCols += operation.getNumColumns();
        return Status.OK;
      @Override
      public Status transactionCommit(DsEvent e, DsTransaction tx) {
        super.transactionCommit(e, tx);
        numTxs++;
        return Status.OK;
      @Override
      public String reportStatus() {
        String s = "Processed (mode='" + getMode() + "')" + " transactions=" + numTxs
                  + ", operations=" + numOps + ", columns=" + numCols;
        return s;
    }That's about as basic as it gets. It will print out number of operations processed to the report file (dirrpt/*.rpt). The Java user-exits typically are an "end point" for the data stream (that's what the "CuserExit... PassThru" option means), so this example isn't terribly useful by itself. Typically you would send the data somewhere else (like the JMS handler, or a file-writer) or update some other system with these events.
    Btw, there are also a few helper classes to merge metadata (column/table names) and data (column "before" and "after" data). The "DsTransaction" and "DsOperation" and "DsColumn" classes are just "data". The following wrapper classes also provide metadata (Tx, Op, Col):
      import com.goldengate.atg.datasource.adapt.*;
      Tx tx = new Tx(dsTransaction, getMetaData(), getConfig());
      //or:  Op op = new Op(dsOperation, tableMeta, getConfig());
         for(Op op: tx) {
              for(Col c: op) { ... }
      }See the javadoc that comes with the software download for details (javadoc.zip).
    To compile and use (preferably creating a jar; I'm assuming you put it in "dirprm" (see below)):
    $ javac -d classes -cp {gg_home}/ggjava/ggjava.jar HelloWorldHandler.java
    $ jar -cvf myCustom.jar ...etc...Your extract ("pump") parameter file that loads and runs your custom Java user-exit event handler:
    Extract javaue
    SourceDefs dirdef/tc.def
    SetEnv ( GGS_USEREXIT_CONF = "dirprm/javaue.properties" )
    GetEnv (JAVA_HOME)
    GetEnv (LD_LIBRARY_PATH)
    -- CUserExit ggjava_ue.dll CUSEREXIT PassThru IncludeUpdateBefores
    CUserExit libggjava_ue.so CUSEREXIT PassThru IncludeUpdateBefores
    GetUpdateBefores
    -- must pass all data to user-exit, or
    -- else tx indicators might be missed
    TABLE GGS.*;
    TABLE EXAMPLE.*;And the referenced properties file could look like the following. There are really two parts to this file; the first part is used to configure the Java application, the second is used to configure the JNI bridge between the JVM and "extract".
    # Java application properties
    gg.handlerlist=mytest
    # your custom event handler.
    # note: setting property foo=bar automatically calls your handler's method setFoo("bar")
    gg.handler.mytest.type=tst.HelloWorldHandler
    gg.handler.mytest.foo=bar
    gg.handler.mytest.mode=op
    # gg.handler.mytest.mode=tx
    # Properties for native library ("C" User Exit)
    # set to TRUE to *disable* the duplicates-checkpoint-file
    goldengate.userexit.nochkpt=TRUE
    # duplicates-checkpoint-file prefix
    goldengate.userexit.chkptprefix=JAVAUE_
    # tx timestamp datatbase local (default) or UTC timestamp
    goldengate.userexit.timestamp=utc
    # C-user-exit logging config for native library *only*.
    # Java app uses log4j config in javawriter.bootoptions.
    goldengate.log.modules=TXSTORE,JAVAWRITER,JAVAUSEREXIT
    goldengate.log.level=INFO
    goldengate.log.tostdout=false
    goldengate.log.tofile=true
    # prefix for native library logfile name
    goldengate.log.logname=cuserexit
    goldengate.userexit.writers=javawriter
    # native lib statistics, defaults: time=3600, numrecs=10000
    #   display=false (doesn't write to file)
    #   full=false (would not include java report)
    javawriter.stats.time=3600
    javawriter.stats.numrecs=100
    javawriter.stats.display=TRUE
    javawriter.stats.full=TRUE
    # Set classpath to required jars.
    #    Use ':' path separator for Unix, ';' for windows.
    # Set the log4j configuration -- note this found in the classpath.
    #    See the example preconfigured log4j files in ggjava/resources/classes,
    #    copy to dirprm and rename, then customize as desired. (Don't put or
    #    modify files in the ggjava/* directory.)
    javawriter.bootoptions=-Xmx64m -Xms32m -Djava.class.path=dirprm:ggjava/ggjava.jar:dirprm/myCustom.jar -Dlog4j.configuration=log4j.propertiesNote that the property "bootoptions" includes "myCustom.jar" to find your class. You can use your custom log4j config as well (e.g., my-log4j.properties); put it in "dirprm" as well and it will be found in the classpath.
    See also the GoldenGate Java docs for a little more on this topic:
    * http://www.oracle.com/technetwork/middleware/goldengate/documentation/index.html => http://docs.oracle.com/cd/E18101_01/index.htm
    Hope it helps,
    -Michael
    Edited by: MikeN on Jun 20, 2012 10:34 PM - notes on trail format compatibility

  • How can i built a java application using java debug class on Log4J

    Hi,
    As java API support the MethodEntryEvent, using which I can get the automatic logging statements when the method is entered or exited as HelloExample.main(with argument type).
    Where HelloExample is the class name.
    Main is the method entered with its argument types.
    In some cases I have the o/p as
    -- VM Started --
    ====== main ======
    main -- HelloExample
    callerMethod -- HelloExample
    ====== main end ======
    -- The application exited --
    By using Log4J is there any possibility of getting these sort of o/p along with the loggers supported by Log4J. i mean to say can i built an java application which supports the MethodEntryEvent and MethodExitEvent from java API and also uses the Log4J debugging. I took an e.g. trace example, which (in J2SE 1.4.x or 5.x) will be found in $JAVA_HOME/demo/jpda/examples.jar and unpacking it by
    jar -xvf $JAVA_HOME/demo/jpda/examples.jar i found the com/sun/tools/example/trace/Trace.java and passed the class constructed with logger taken from Log4J. In this case the logging message is displayed on the console. As per the requirement i need to transfer the whole o/p to an output file along with Log4J logger statements. in this case i should not give any command in the cosule except compiling and executing the programme. the programm also should able to run without the main() as i need to integrate Log4J with an application and the code must me application server independent. i need the output as i got using MethodEnteryEvent (shown as above) in case of java application built using Log4J.
    Can any one help me in this regard. can any one give me some suggestion or any programme of this sort. All suggestions are welcomed.
    Thanks & Regards,

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

  • Profiling a java application with HPjmeter

    I have a java application and i want to identify the performance problems .
    I'm doing a static analyze and a dinamic analyze.
    For the dinamic analyze everything work ok.In the command line i have the options:
    java -agentlib:hjmeter name
    When i want to have a static analyze i have the option:
    java -agentlib:hprof name
    or
    java -Xrunhprof name
    But i get the following error message:
    hprof error:can't create temp heap file: java.hprof.txt.TMP[../../../src/share/demo/jvmti/hprof/hprof_init.c :775]
    My application is running on a HP-UX server:
    java version "1.5.0.03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.03-_13_feb_2006_16_39)
    Java HotSpot(TM) Server VM (build 1.5.0.03 jinteg:02.13.06-15:51 PA2.0 (aCC_AP), mixed mode)
    Can anybody help me with some sugestions?
    Thank you!

    inside Java Studio Enterprise/Netbeans stack of tools this functionality is implemented as NetBeans Profiler
    http://profiler.netbeans.org/
    The Profiler hasn't been a part of default Netbeans distribution. The JSE8 is based on NB4.1. Profiler compatible with NB4.1 is an early-access Milestone release, and thus i'd recommend to consider more recent version of the Profiler, the one for NB5.x (though you'd need to install NB5 also).

Maybe you are looking for

  • How can I delete a purchase (Mavericks) that has not downloaded from my account?

    How can I delete a purchse that has not yet downloaded (Mavericks) from my account? I contacted App Store support and my responder claims to have deleted Mavericks from myaccoount. He didn't; it is still there, under the purchases tab-in the cloud. T

  • Storage Location Authorizations

    Dear Gurus We have recently implemented SAP in our Organization and have activated Storage Locations' authorizations. Our requirement is to limit the authorization to issue and receive material from individual storage locations but at the same time t

  • Replay logfiles on corrupt database

    I've got a machine here that has not been maintained very well. Someone with little knowledge of MaxDB has only kept Windows backups and no database backups. Also, there has been no LOG backups, everytime the log was full, someone just added another

  • Wireless ACS deployment - Patch to v4.2.1.15 patch 8

    Dear Team, We have some of ACS appliance running at v4.2.1.15 patch 3 & I am planning to use the latest available patch to ACS v4.2.1.15 (patch 8) Can some one give me the step by step how to install the Patch 8. Thanks ...

  • Please help Upconvert 5.1 to 2010

    Hi, Is anyone could upconvert those VI from LV 5.1 to LV 2010? The LabView 2010 program even can not open it. It says: the file is too old to convert to LV 2010........ LV 5.1 to LV 2010. Thanks a lot. Solved! Go to Solution. Attachments: Scanw_Scope