Calling Java application in the server

Hi,
Is it possible to call a GUI based Java App from the oracle server? If so how?

Hi,
Welcome to MSDN.
I would suggest you consider posting this issue in the forum Mr. Monkeyboy suggested.
In addition, issues about java are not supported in these forums.
Thanks for your understanding.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to execute a java application once the server starts

    I have created a java application which executes correctly. I want this application to execute everytime I start my server. I have modified my web.xml as shown below
    <servlet>
    <servlet-name>SendEmail</servlet-name>
    <servlet-class>
    com.allcorp.alliance.tdocs.servlets.SendEmail</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    <load-on-startup>1</load-on-startup>
    </init-param>
    </servlet>
    I have extended the class with HttpServlet. When I start the server, I get the message saying the class is being initializing but it does not execute. I want the application to execute. Any idea what I need to do.

    BalusC wrote:
    Implement ServletContextListener and run the appplication on creation of the ServletContext.Well i understand implementation of ServletContextListener and by overiding contextInitialized(ServletContextEvent se) accordingly can solve the problem.
    but you need to consider two cases here first
    1).ServletContextListener is not supported by all container especially the minor onces which does not support Servlet 2.3 specification.
    2).OP does not have any idea of how to use a Servlet first if you can see he had written his intialization code in the main method.Now how can you expect him to create a listener..... :)
    I hope there are no hard issues on what i said this time.
    *@OP*
    My friend the bad news is that you need to spend bit of time learning about servlets.U'd not be writing intialization code inside a main rather you'd be doing it inside public void init(ServletConfig config) method.
    by making <load-on-startup><!--value</load-on-startup> in web.xml enables Servlet container to call init method at the time of deployment of the web application else where it'd call the init method whenever servlet encounters first request from a client.
    package com.allcorp.alliance.tdocs.servlets;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import javax.activation.*;
    * @author ssa3z
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class SendEmail extends HttpServlet{
    public void init(ServletConfig config) {
        // SUBSTITUTE YOUR EMAIL ADDRESSES HERE!!!
        String to = "[email protected]";
        String from = "[email protected]";
        // SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
        String host = "smtp.allstate.com";
        // Create properties, get Session
        Properties props = new Properties();
       // If using static Transport.send(),
      // need to specify which host to send it to
      props.put("mail.smtp.host", host);
      // To see what is going on behind the scene
      props.put("mail.debug", "true");
      Session session = Session.getInstance(props);
      try {
         // Instantiatee a message
         Message msg = new MimeMessage(session);
         //Set message attributes
         msg.setFrom(new InternetAddress(from));
         InternetAddress[] address = {new InternetAddress(to)};
         msg.setRecipients(Message.RecipientType.TO, address);
         msg.setSubject("Test E-Mail through Java");
         msg.setSentDate(new Date());
         // Set message content
         msg.setText("This is a test of sending a " +"plain text e-mail through Java.\n" +"Here is line 2.");
         //Send the message
         Transport.send(msg);
      }catch (MessagingException mex) {
        mex.printStackTrace();
    } Hope this might help :)
    REGARDS,
    RaHuL

  • Calling java application from jsp using onUnload

    I have tried to find the answer to this by searching many jsp, js and java forums, but have not had much luck. I hope someone here can help out. I have written a jsp page that passes a sql string to a java application when it loads. That application creates an xml file (a report) and returns the filename, which is the target of an onclick event. What I want to do, is to delete the file when the page unloads. I have written a separate application that will delete the file, but onclick and onunload events apparently only take JavaScript commands. I have tried to embed the jsp code into an onunload event, but it runs when the page is originally loaded. In addition, I created a separate jsp page that deletes the file, and I call that page onunload using window.open(). I can set that page to self.close(), but I can't get the page to not show itself. Even if I set the height and width to 0 (or 1), it seems to appear 100X100. Can anyone give me any suggestions on what to do in this situation? Thanks.

    When my jsp page loads, I create the file using this code:
    String filename = printtasktest.createxml(closed,encodedSQLString);
    printtasktest is a java application on the server, that
    creates a file on the server, and passes the filename back to the jsp page. Later I use this filename as a target of an onclick event:
    <div class="button" onclick="printTask('<%=filename%>')">Print This Page</div>
    printTask() is a javascript function that opens the printable page using window.print() and self.close().
    The problem I have is that the file hangs around after, and I want to delete it when the user leaves the page.

  • Putting java programs to the server

    Is there any fast way/tutorial to put a java application to the server for multi users?
    Can it be done easily by using Eclipse?
    Can any one help me please?
    Thank you.

    It's silly to say that I'm very new to Java and Eclipse.
    Actually, I've done a project to update data for a company, and I need to find a way to put it into the company server. This program using Swing to show a GUI and allow one user update data at a time. Then data will be saved to file(configuration file), therefore, only one user can do it at a time.
    Please help me for any quick tutorial or sample codes which are similar to my job.
    Thank you.

  • Running a Java application on a server.

    I made a simple Java app that acts as a server. I can't figure out how to run it though (well, I can run it on my own machine of course, but that's no good). I've looked into servlets but I get the impression that a servlet is for the web, while I want to run a socket-based program. Do I need a special server, or is myjavaserver.com (for testing) good enough?
    Thanks

    I don't want to run the application on my home machine because I don't want to leave it on all day, my internet connection is not as fast as a hosting provider's, and I don't like leaving a port open all day (although probably nothing will happen).
    So if I have a small app like import java.net.*;
    public class ServerTest {
         public static void main(String[] args) throws Exception {
              int port = 12345;
              ServerSocket servSock = new ServerSocket(port);
              while (true) {
                   Socket socket = servSock.accept();
                   System.out.println("Connection to server established.");
    } how would I run that on a hosting provider's server? At home I can just call "java ServerTest" from the command line, but for obvious reasons I cannot do this on a web server that I do not have physical access to.

  • How to call java application in Windows NT environment?

    I have a JDBC application running against oracle database on NT server. There is another non-java application need to call my java application. The programs that non-java program can call are .exe, .dll, and .bat files. I wrote a Dos script and save it as .bat file. Every time this .bat file was called, the dos screen will be shown. Anything I can do to let Dos screen not shown, or anything I can do to wrap my java classes into an .exe file? Thanks in advance.

    If your tool can run a .exe and supply arguments, why not simply invoke "javaw <jvm-args> <class> <class-args>"?

  • Calling Java application(forms) from Oracle/Developer

    Hi
    How can i call java application by using Oracle/Developer 10g. Pl. name the methods that i can use.
    regards
    Touseef

    In Oracle a Java stored procedure is a program you write in Java to run in the server, exactly as a PL/SQL stored procedure. You invoke it directly with products like SQL*Plus, or indirectly with a trigger. You can access it from any Oracle Net client—OCI, precompiler, or JDBC.
    Oracle provides a fully-compliant implementation of the Java programming language and JVM. Oracle Database Java Developer's Guide explains how to write stored procedures in Java, how to access them from PL/SQL(or developer), and how to access PL/SQL functionality from Java. -> http://download-uk.oracle.com/docs/cd/B19306_01/java.102/b14187/chfive.htm#BABGCGBG

  • How to invoke a java application in the middle of the process

    In the middle of one process, I want to invoke a java application. After the java application, the process will continue and select a path based on the result of the java application. Which activity can be used to invoke a java application in the middle of the process?
    Thanks

    BPM Changes:
    1. Under 'External Resources' create a new resource of type 'Server Configuration'. Specify the host port and path of your servlet here. This will be invoked from your process. Lets name this configuration as 'myExternalConf'.
    2. Create an interactive activity say 'InvokeMyApplication' in your process. The main task of this application should be external task. (Implementation Type = External)
    3. Create the prepareMethod method say 'prepareExternal'. Set the arguments for this method as output arguments. These arguments will be available to you in your external servlet.
    4. Create the commit method say 'commitExternal'. Set the arguments as input arguments. The external servlet will return these arguments back to the process.
    5. Check the 'Use configuration' checkbox for your main task (external task). Select 'myExternalConf' here.
    Servlet changes:
    When the user executes your 'InvokeMyApplication' activity, he will be taken to the external servlet of your external application. You will be passed the currentActivity, currentParticipant, instanceID and one more argument (which I dont remember :( ) as url parameters.
    1. In this servlet, open a PAPI/PAPI WS session for the participant passed to the servlet as url parameter
    2. Use the currentActivity ( passed in url parameter), to call prepare method on this activity. This will return you with the arguments defined in 'prepareExternal' method.
    3. Using these argumets, or otherwise, you can do whatever you want in this servlet. When done prepare the arguments to pass back to BPM.
    4. call papiService.activityCommit and return the arguments.
    5. Flow goes back to your BPM application
    Some code that might help:
    Servlet calling prerpare:
    ProcessServiceSession papisession = null;
    try{
    papisession = initializePapi();
    fuego.papi.Arguments args = fuego.papi.Arguments.create();
    args = papisession.activityPrepare(activity, instanceId, args);
    Map<String, Object> argsMap = args.getArguments();
    return argsMap;
    protected ProcessServiceSession initializePapi(){
    Properties configuration = new Properties();
    try {
    InputStream inputStream = getClass().getClassLoader().getResourceAsStream("bpm.properties");
    if(inputStream == null)
    throw new IOException();
    configuration.load(inputStream);
    } catch (IOException ex) {
    log.log(Level.WARNING, "Could not load bpm.properties", ex);
    return null;
    Servlet calling commit:
    public void commitToALBPM(Map parameters){
    try{
    papisession = initializePapi();
    fuego.papi.Arguments args = fuego.papi.Arguments.create();
    Set s = parameters.keySet();
    Iterator propNames = s.iterator();
    while (propNames.hasNext()){
    String key = (String)propNames.next();
    String val = (String)parameters.get(key);
    args.putArgument(key, val);
    papisession.activityCommit(activity, instanceId, args);
    catch (OperationException e)
    HTH
    Satinder

  • Patching/updating Java Applications in the WebLogic environment.

    Hi All,
    I'd like to get some feedback on our process and hear if there is some better/different
    ideas out there on how to handle patching/upgrading java applications in the WebLogic
    environment.
    Here is our process:
    1) We build using ANT our Enterprise application.
    2) We deploy our application using InstallAnywhere to drop the structure into
    an environment.
    If a patch or update is needed, we again build the Patch/Update using ANT, generating
    checksums for each file in every ear/war/jar file as well as any supporting files
    (.xml, .properties, .sh, etc.) used in the production structure. We then compare
    checksums against what is in production and come up with PATCH_(ear/war/jar) files
    with only the changed classes and duplicate production structure with the changed
    supporting files.
    Using ANT scripts and InstallAnywhere, we backup the files to be replaced in production,
    overwrite supporting files, extract packages (ear/war/jar), overwrite classes
    with new ones, re-package the ear/war/jar files into production environment and
    restart the server.
    We patch at a class level due to the configuration settings internal to the package
    files (ear/war/jar) that we don't want the customer to have to re-configure everytime
    we do a partial release.
    Right now, the whole process is automated except the creation of the Patch ANT
    script that extracts, overwrites updated classes, updates manifests, then re-packages.
    Any ideas on improvements or complete re-engineering of our process to help so
    we can get closer to 100% automation?
    Thanks,
    John

    The chances of two applications running at exactly the same time are miniscule. If they each have a connection to the database, and are both trying to modify the same table, then chances are one will be slightly after the other its changes would be committed last. In the case where one might delete a row just before another tries to access that row, you're going to have some sort of problem. However, those circumstances are pretty rare, and even so, some small amount of exception handling can deal with them gracefully.

  • How can we handle in flex application if the server is down?

    how can we handle in flex application if the server is down?

    You and me both. 
    As ambiguous as the original question was, I think he was just asking how to handle a server exception and I would suggest generally just using a Alert.show("your specific message (eg.  The server is currently unavailable)") in the place where you handle the fault return from your service or http call.  I'm sure there are more complicated messaging frameworks or approaches, but that seems to be enough for my apps.

  • How to manually completely remove a J2EE application from the server?

    Hello,
    I have created and deployed a certain test J2EE application.
    After I finished with it I wanted to remove it, yet I cannot do it: Any removal attempt, either by the SDM or Admin Tool, encounters exceptions and errors I cannot handle. I tried restarting the server, stopping the application yet nothing works. on telnet the application has always STOPPING ststus...
    Desperately, I have decided to manually remove this application from the server yet I don't know the steps.
    Can someone please give me a step-by-step guidance on how to completely remove this application from the server, so it won't appear anyome both at the SDM and at the deploy service of the WAS?
    Thank you in advance,
    Roy

    Hi Peter,
    I've reproduced the problem and created a thread dump. I believe these lines are the important ones:
    "SAPEngine_Application_Thread[impl:3]_10" prio=5 tid=0x080cc9d8 nid=0x18e0 in Object.wait() [8a8f000..8a8fdb8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x14450d88> (a java.lang.Object)
         at java.lang.Object.wait(Object.java:429)
         at com.sap.engine.services.ejb.EJBAdmin.destroyContainers(EJBAdmin.java:1145)
         - locked <0x14450d88> (a java.lang.Object)
         at com.sap.engine.services.ejb.EJBAdmin.commitStop(EJBAdmin.java:2529)
         at com.sap.engine.services.deploy.server.application.StopTransaction.commonCommitFinished(StopTransaction.java:262)
         at com.sap.engine.services.deploy.server.application.StopTransaction.commitCommon(StopTransaction.java:305)
         at com.sap.engine.services.deploy.server.application.StopTransaction.commit(StopTransaction.java:291)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:310)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:327)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:111)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:230)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.begin(RemoveTransaction.java:133)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3139)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:903)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:5056)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:885)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Could you please advise how to proceed from here?
    Thank you in advance,
    Roy

  • How can i let my java application closes the other opened windows

    how can i let my java application closes the other opened windows: like any other Microsoft Internet Explorer windows ... provided that my java application is not the one i used to open those other windows.... thanks in advance

    you'll have to use JNI to access the windowAPI
    then you need a list of window handles ... I think there was a function called getWindow and in order to close them you use sendMessage .... for details check out msdn (microsoft developer network)
    somwhere I saw a tool called JUtil, which might help you getting started on accessing the win api from java
    regards
    Spieler

  • Java applications on EP server

    Hi EP Experts,
    I would like to know following things.
    1. How do I migrate Java applications on Portal server? (one way using JAVA PDK)
    2. What are the different problems that are faced during migration of Java code to EP server
    3. Do we need to import specific libraries that are used specific for Java applications and are not available with WAS/EP?
    If any one has similar migration experience please share the problems that are faced and if possible solutions you got for any.
    Thank you,
    Chintamani Chitnis

    Hi,
    Check this document
    http://help.sap.com/saphelp_erp2004/helpdata/en/88/bdfc3f48ecc742e10000000a1550b0/frameset.htm
    Regards,
    Ganesh N

  • How to deploy a normal Java application onto Sun Server

    Hi
    How do you deploy a normal Java application onto the Sun server...what are the required config files one needs to set etc

    You might want to start with the Java EE 5 tutorial, available here :
    http://java.sun.com/javaee/5/docs/tutorial/doc/
    --ken                                                                                                                                                                                                                                                           

  • How to upload a java application into the oracle DB

    Hello,
    I am in search of an issue that is worrying me now for weeks. I have a java application which is independent. Now I want to upload this application to the oracle DB.The idea is for the application to sit on the DB and do it work from there, which is to transfer data to another 3rd party independent system. What is the best way of doing this? Is there any utility which can help me to upload a java application to the DB?
    Also after uploading the application in the DB, how can it be called? Is there any tutorial to guide me please?
    Thank you all for brain storming

    Check the docs for "Java Stored Procedure":
    http://www.oracle.com/pls/db92/print_hit_summary?search_string=java+stored+procedure

Maybe you are looking for

  • Photoshop CS2 (program error msg)... Help please!!

    I have installed the full creative suite 2 on my new iMac. everything works fine except photoshop?!!? Illustrator works great, In-Design works great, But when i try to open a file or create a new page in PS it tells me "Could not create document beca

  • Toshiba Satellite P205-S7469 DVD Rom Replacement

    Does anyone know how to replace the DVD Burner in a Toshiba Satellite P205-S769?  I am assuming that I need to remove the keyboard in order to get to the drive.  Is this similar to other Satellite models where I could simply remove the keyboard secur

  • Error importing file

    Hi everyone, I'm trying to importe a file to create a copy of my application, i have this error message. ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 13, column 67: PLS

  • GUI Customization of BSP HAP_DOCUMENT .

    Hi BSP Expert, I need to chnage "HAP_DOCUMENT" in BSP . it is one standard SAP BSP apllication. it based on PMS module. so, please Tell me how to customize The GUI part . Thanks in Advance. pappu kumar mehta

  • Separating one phone off one a ccount and creating another?

    My husband and I use the same apple id account and now I want to create a separate one for him as it is causing problems with messaging. how do I create a new one without losing all the apps on the phone?