How to restart java application

Hi ,
I have an application which have some parameters ( These parameters are configured in APP )
I want if the config values changes then our application should be restarted .
How can I do it programmitically
Thanks and regards
Anshuman

Let your program detect the changes and exit with a defined return code.
If the running script detects the Java program's having stopped with this return code,
it restarts the program.

Similar Messages

  • How to restart Java Application from state when system crash

    I want to know about the API that provide mechanism to save your program state peroidically or any specific task completed of application and if system crash and next time when application restart it should be started from previous state.
    I required solution urgently plz. replay as soon as possible

    write it yourself.
    Serializable Interface, FileOutputStream, ObjectOutputStream ... that'd be a start for you.

  • How to invoke java application from ABAP

    How to invoke java application from ABAP  ? Suppose I needto execute a EJB wihic is running on my SAP J2EE Enigne from an ABAP Program .
    Thanks,
    Manish

    Hi Manish,
    did you get some further documents concerning "abap program calls ejb"?
    If yes, could you please send me some informations.
    Thank you for your help.
    Kind regards, Patrick.

  • How to restart swing application by using shotcut key (ex :CTRL+ALT+ENTER)

    Hi,
    Currently my swing application freezs some times, it will not come back, only option i have is restart.
    Can some one can help me how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application. (in any state, my action should allow to restart).
    Thanks
    Anjan
    Edited by: 807057 on Nov 2, 2010 9:16 AM

    Currently my swing application freezs some times, it will not come back,I would work on fixing that problem. Sounds like you aren't using Threads properly and are blocking the EDT. Read the section from the Swing tutorial on [url http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html]Concurrency for more information.
    how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application.Within Swing this would be done by using "Key Bindings". A section on Key Binding is found on the tutorial link from above. However, is Swing actually is frozen then this won't work.
    Therefore this would need to be done at the OS level, which java doesn't support. You would need to use JNI, which I know nothing about.

  • How to run Java Application in Weblogic 8.1

    Hi,
    I'm new to Weblogic 8.1. I just deployed a EJB with WebLogic 8.1 Server and I
    don't know how to run my Java Application against the EJB I deployed earlier.
    I tried to run "java Client_1" in a console window. It gives me the following
    message:
    C:\temp\WebLogic\new>java Client_1
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassNotFoundException:
    we
    blogic.jndi.WLInitialContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:217)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.jav
    a:42)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    49)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at Client_1.getInitialContext(Client_1.java:55)
    at Client_1.main(Client_1.java:14)
    C:\temp\WebLogic\new>

    hi,
    i solve this one after check bea documnetaion.
    with regards
    jp

  • How to deploy Java Application to AS?

    Hello there,
    I created Java Application, created Java Web Start (JNLP) Deployment Descriptors and everything works just fine when I am running application locally (using Run Manager in JDeveloper).
    How do I publish this Java Application to Oracle Application Server to start it using Java Web Start since there are no Java Web Start Deployment Descriptors to publish Application to Oracle Application Server?
    Or is there any other (easier, better) way to Deploy Java Application to Oracle Appplication Server?
    I searched otn.oracle.com but I cant find anything usefull, maybe it is me, please help me :)...
    Thanks,
    -Andrej

    From the JDeveloper technical papaers page:
    http://otn.oracle.com/products/jdev/collateral/papers/10g/adfjclientbcwebstart.pdf

  • How to remove Java Applications from "Add and Remove Programs" list?

    I have deployed my Java applications (both JWS and Applet) via JNLP with allow-offline option enabled and without installer-desc option specified.
    My questions are:
    1. An entry is added to the Add and Remove Programs list after launching the application via JNLP. Is it due to the specification of JNLP or JWS? Is there anyway to prevent this behavior?
    2. I removed my application by clearing the cache via Java Control Panel but the entry for the application is still listed in Add and Remove Programs. How can I remove the entry in the Add and Remove Programs?
    I have tried following methods but neither works:
    1.Go to Add and Remove Programs, and click [remove] button to the right of my application.
    *Warning message like 'Application cannot be uninstalled completely' is thrown.
    2.Follow instructions listed @ [Microsoft Online Support site|http://support.microsoft.com/kb/314481/en-us] to remove my application manually via Windows registry.
    *Couldn't find appropriate registry entry to delete.
    Thanks in advance!

    Hi, guys!
    This issue has been officially approved as a new bug (Bug Id: 6946221) for the JDK 1.6_20(might include any release below) release.
    It will take a couple of days for it to be shown up in the external Bug database. However, once it becomes available for viewing on external Bug database.I would like to encourage your valuable participation to vote on this bug to get it fixed ASAP by the SUN developer teams.
    Java Bug Database @
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6946221|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6946221]
    Voting for the bug @
    [http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6946221|http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6946221]
    Thank you for your cooperation!
    Edited by: Jay-K on Apr 23, 2010 12:14 AM

  • How can my java application fill out an online form

    Hi,
    I am trying to create a Java application that will connect to a URL, fill out the form and submit it.
    How would I go about doing this?
    Thanks in advance,
    Chanie

    I'm doing something exceedingly similar, but I'm not sure how to get it to work, to be honest. Basically, I'm trying to download information from a site that requires a username and password. The html of the site is as follows, as well as my code. Any help would be appreciated!
    <form method="post" action="/cards/FALLON19790309A.php">
    <p>Username:   <input type="text" name="username" size="16" maxlength="16" value=></p>
    <p>Password:   <input type="password" name="password" size="16" maxlength="16"></p>
    <input type="hidden" name="action" value="muffinklezmer">
    <input type="hidden" name="nocache" value="1046986423">
    <input type="submit" value="Log in"></form>
    My code right now looks like this:
    URL playerCard = new URL("http://www.webpage.com");
    URLConnection pcConnection= playerCard.openConnection();     
    pcConnection.setRequestProperty("username","ABCDE");
    pcConnection.setRequestProperty("password","12345");
    BufferedReader in = new BufferedReader(
    new InputStreamReader(
    pcConnection.getInputStream()));
    pcConnection.connect();
    String inputLine = in.readLine();
    while (inputLine != null)
    System.out.println(inputLine);
    inputLine = in.readLine();
    }

  • How can my java application get its own PID?

    My java application runs under AIX?
    The application needs to get its own PID.
    There is a possibility to get it by
    Runtime.exec("ps -ef | grep <user.name>");
    But is there any other alternate possibility?
    Any idea would be great appreciated
    kind regards

    Hello! I found several ways for this in a blog from someone called Igor Minar on
    http://net3x.blogspot.com/2007/03/how-java-application-can-discover-its.html
    He found several ways:
    * Use Java management and monitoring API
    ManagementFactory.getRuntimeMXBean().getName();returns something like
    1826@localhost
    where 1826 is the PID of the JVM process, i.e. my application's process. But this hack is JVM dependent and may not work on JVM's other than Sun's
    * Use a shell script to put a property in place that is set to the PID:
    exec java -Dpid=$$ -jar myapp.jar* Java Native Interface - cumbersome and platform dependent solution
    * Use procfs (Linux solution: read /proc/self, nifty nifty, posted in the comments of the resp. post!)
    int pid = Integer.parseInt( ( new File("/proc/self")).getCanonicalFile().getName() );* From another comment: Reflection will work (on Unix): The Process class has a field called pid which can be queried:
    static int getPID(Process process) throws IllegalAccessException, IllegalArgumentException,
                                                                      NoSuchFieldException, SecurityException
         Field field = process.getClass().getDeclaredField("pid");
         field.setAccessible(true);
         return field.getInt(process);
    }But this solution looks a bit of a kludge to me. I think the /proc/self solution is best - it definitely rox my sox!
    Hope this helps!

  • How to connect Java Application to ORACLE8i over SSL connection

    Hi,
    I would like to know how to make an existent Java application connect to an ORACLE8i database over a secure SSL connection?
    can I user ResultSets?
    Could you please tell me what parameters to set on the database and, especially, what new code must be added for the Java Application so send data over an SSL connection.
    Your advice/hints will be greatly appreciated.
    Vani

    Use usual Oracle' encryption. SSL configuration is a nightmare.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Properties props = new Properties();
    try {
    props.put("user", "scott");
    props.put("password","tiger");
    props.put("oracle.net.encryption_client", "REQUIRED");
    props.put("oracle.net.encryption_server", "REQUIRED");
    props.put("oracle.net.encryption_types_client", "( RC4_56 )");
    props.put("oracle.net.encryption_types_server", "( RC4_56 )");
    props.put("oracle.net.crypto_checksum_client", "REQUIRED");
    props.put("oracle.net.crypto_checksum_server", "REQUIRED");
    props.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
    props.put("oracle.net.crypto_checksum_types_server", "( MD5 )");
    props.put("sqlnet.crypto_seed", "769764576979045769576907");
    } catch (Exception e) { e.printStackTrace(); }
    Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl)(PORT =1521)))(SDU=32767)(CONNECT_DATA=(SERVICE_NAME=orcl)(SID=orcl))", props);
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
    while (rset.next ())
    System.out.println (rset.getString (1));
    rset.close();
    stmt.close();
    conn.close();

  • How to invoce java application (which is AQ recipient) ?

    background
    one pl/sql program (sender) puts messages into the queue
    one java application (recipient) get messages from the queue
    i cannot run the java application as a triggered java stored procedure,
    so i try to produce the same effect with Advanced Queuing
    question
    how do i invoce this java application after the queue is filled?
    do i have to run the application in a loop checking every x seconds if a new message is in the queue?
    or is there a better way to solve this problem?
    thanks

    Hi Samuel,
    In your JMS application, you can issue a blocking dequeue (receive). Your dequeue call will be blocked till a message for you comes in the queue or till the specified time out. The second option you have is to use onMessage callback.
    cheers,
    Brajesh.

  • How To install Java Application[J2SE] into Windows Mobile

    Hi All,
    I have developed an application for Mobile devices[ Windows Mobile] exclusively using Java[AWT].When I try to install , the application in mobile, i got the following error.
    *"MIDlet cannot be installed because critical information is missing from the MIDlet file (.jar). - 13 Please contact the MIDlet provider for more information."*
    I didnt use any midlet classes in my application. So my question is, what the above error denotes? and How to install
    java[AWT] application into mobile?. What are all the requirements to install the application?.
    Thanks in advance.

    Hi David, thank you very much, your information was very useful, finally i got the work done.
    The problem was with the JVM which is im used in my Windows Mobile. And im installed CrE-ME in my mobile
    to execute java application.
    The following link has the details of how to install the JVM and execute the aplication (.jar ).
    http://javatolearn.blogspot.com/search/label/Java%20in%20Windows%20CE%20with%20CrE-ME
    Thanks and Regards
    Baskaran

  • How to install java application /game ?

    Hi folks,
    I finally managed to connect my Nokia 6275i to PC suite 6.8 via Bluetooth but now I have other dilemma ....
    How do I install Java application or game ?
    I downloaded dictionary and game as well ( *.jar) but when I want to install it I can't select my phone. In connection manager the phone is grayed out so I can't select it.
    Other applications like Backup, managing contact ... do work fine.
    Any ideas what to do ?
    Thanks

    anyone have a resolution to this?
    you waste a few hundred on a phone and they expect you to pay $10 more for a game?
    you disagree to this and pay $40 for a connectivity cord only to find out they really really wanted you paying that $10 a game...
    im not very familiar with the previous posters explaination,if someone would be kind enough to explain.
    i would genuinely appreciate it.

  • How to embed java application into flash player

    By using SWT flash, I able to embed flash player into java
    UI. But then now I want to embed the java application in flash
    player... Do it possible ?? or any export can help me or advice me
    on this? Thanks
    Regards,
    Sosseres

    Hi,
    In this case, you need to setup Single Sign-On (SSO) between your SAP Portal and Websphere.
    Please refer to the following URL:
    IBM WebSphere
    Here, you will find all the guides that explain how this SSO can be established. Under the General Section, you will find documentation that describe the SSO cases. Under the section of interoperability, you can find the guides like "How to Set Up SSO Between SAP NetWeaver Portal and IBM WebSphere Portal Using TAI".
    Use these guides to setup SSO.
    Regards,
    Shitij

  • How to restart an application

    My fellow WD explorers,
    Can anybody please tell me how to restart a WD application?
    What I want is the following: if I'm on a certain view within a WD application and want a button which should start the application again from scratch...
    So, everything should be initialized as if the application was started for the 1st time.
    Thanks in advance for your recommendations.
    Wouter Heuvelmans

    Hi
    The best thing you can do is you create an exit outbound plug to your window
    and give the parameter Url of type string and give your application name while
    firing the outbound plug.
    this method is used to get the url of your application
    CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
    application_name = '<your application name>
    IMPORTING
    out_absolute_url = lv_url.
    /people/thomas.szcs/blog/2006/07/18/basic-concepts-150-url-semantics
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7015b1f9-535c-2910-c8b7-e681fe75aaf8
    Regards
    Abhimanyu L
    Message was edited by:
            Abhimanyu Lagishetti

Maybe you are looking for