How to access another java process?

I run two java process, A and B, any possiblity to access process A from process B?
Process A and B are started with class's main method.
Thanks.

masijade. wrote:
georgemc wrote:
laguna8 wrote:
Socket will not be appropriate for my case.
My case is: I write a document editor (just like UltraEdit), after starting the editor, there is one process running, then I right click a file and choose to open that file with my editor, it starts another editor process. What I want now is just to open that file with the editor that has already run.Don't see why sockets aren't appropriate there. Why did you dismiss them?Because he wants a single pre-finished method call answer, maybe? ;-)Teh Codez!! Indeed. It's pretty obvious that there's an entire subsection of forum users who automatically dismiss any reply which doesn't include code. If we produce an exhaustive list of all the methods by which IPC can be achieved, however archaic, he'll dismiss the lot, and then spend the rest of his life pondering this simple problem

Similar Messages

  • How to access the *.java file corresponding to a TypeElement T?

    Here is a problem:
    How to access the *.java file corresponding to a TypeElement T from a AnnotationProcessor environment?
    Let us say the hook method
    public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
    is invoked with a TypeElement T such that T.getQualifiedname() = "a.b.c.X"
    And the problem is how to locate the file that has the *.java source code for a.b.c.X?
    That is the file that has the source code for a.b.c.X say "some/path/a/b/c/X.java"?
    For simplicity, let us assume that TypeElement T corresponds to a top-level Java class.

    Pinaki wrote:
    That is not something you as the annotation processor author should be asking about. That is something you the person configuring the javac environment should set up via the -d option or its equivalent.
    I strongly recommend using a separate output directory hierarchy.That is the way the current implementation is. The annotation processor takes a -Aout= <some directory path> to write generated output relative to a user-specified location (which defaults to the class output location).That is contrary to the design of the annotation processing facility. The intended use is for that information to be configured via options like "javac -d".
    Additionally, IMO it is a serious configuration error to put generated files and input files, presumably tracked under version control, in the same directory. Interesting you said that. We are just running some "field trial" with these things and some users want them to be in the same directory of the original *.java files (especially when their source files are spread across many roots) .
    Who knows what the user wants?The user does and the user is free to (mis)configure their environment however they like ;-) However, that is the user's option and the user has control of this via the javac command line. The annotation processor is not the proper place to configure this setting; see slide 7 of http://blogs.sun.com/darcy/resource/J1_2006-BOF-0606.pdf for some thoughts on different roles in annotation processing.
    presumably tracked under version control, in the same directory.version control is another 'usability issues' that we are trying to get our heads around with this stuff. "To check-in or not?" - that seems to be the question. When presented these facilities without any cue, "the users" were divided -- some wanted them to be checked-in, some did not. The context where these generated files being used -- there exists some rationale to check them in a version control system.The right answer depends on the circumstances, but IMO generally generated files should not be checked in under version control, especially if they are derived from other source files. Checking in generated files of this nature just creates the opportunity for them to get out of date with the originating files.

  • How to access a JAVA Script variable in JSP Code

    How to access a JAVA Script variable in JSP Code. I have been unable todo this.
    Plz Suggest a way.
    Thanks
    Soumya

    try to do this code
    String s=request.getParameter("javascriptvariablename");

  • How to access another resource in Groupwise

    Could anyone tell me or direct me to a sample of some code, that shows how to access another resource in Groupwise with VB.
    The main goal is to send a appointmentsfrom another resource by accessing this resource that you have authority from own mailaccount
    or from an account I have access to.
    This so far I have come:
    Dim objApp
    Dim objAccount As Account
    Dim objDraftMsg
    objApp = CreateObject("NovellGroupWareSession")
    ' objAccount = objAccount.ObjType.egwResource
    objAccount = objApp.Login("", "") 'My own account but want to access either the account that owns the resource or from my own
    ' objAccount = objApp.objtype.egwresource("Schema")
    objDraftMsg = objAccount.WorkFolder.Messages.Add("GW.MESSAGE.APP OINTMENT")
    Dim date1 As New Date(2013, 5, 2, 8, 30, 0)
    objDraftMsg.StartDate = date1
    objDraftMsg.Duration = 1.5 / 24 ' duration
    objDraftMsg.OnCalendar = True
    objDraftMsg.Subject.PlainText = "Testar schema" ' Subject
    objDraftMsg.BodyText.PlainText = "Hlsar Giggi" ' Body
    objDraftMsg.Recipients.Add("XX")
    objDraftMsg.Send()
    Thank you un advance
    Giggi

    On 4/30/2013 1:26 PM, giggi wrote:
    >
    > Could anyone tell me or direct me to a sample of some code, that shows
    > how to access another resource in Groupwise with VB.
    >
    > The main goal is to send a appointmentsfrom another resource by
    > accessing this resource that you have authority from own mailaccount
    >
    I don't have time to write code but as I recall you have to PROXY into
    the account. There's a proxy method IIRC that returns an Account from
    which you can send mail if you were granted rights to do so.

  • How to access the java stack table "xi_af_msg" from the ABAP engine.

    Hello Guys,
    How to access the java stack table "xi_af_msg" from the ABAP engine.
    I need to access this table.

    These 3 are the tables that are for XI Adapter in ABAP Stack.
    SWFRXICNT
    SWFRXIHDR
    SWFRXIPRC
    You can also try the following tables.
    SXMSAEADPMOD                   XI: Adapter and Module Information
    SXMSAEADPMODCHN                XI: Adapter Module Chains
    SXMSAEAGG                      XI: Adapter Runtime Data (Aggregated)
    SXMSAERAW                      XI: Adapter Runtime Data (Raw Data)
    Cheers,
    Sarath.
    Award if helpful.

  • Starting New process (continous) from another java process

    Hi,
    I am running into a trouble in starting a new java process (continous process it is like daemon process ) from another java process.
    Eg;
    Caller.java runs on one JVM instance, from this Caller.java i need to start a daemon java process ConnectionManager.java (My caller.java should have to know whether ConnectionManager was successfully started as a seperate java process or not)
    Also Caller.java has to stop ConnectionManager.java(which is running as seperate process)
    Any help would be appeciated.
    Thank you very much.

    First of all the design is unusual. Your issue is basically intercommunication between two processes written in java. There are various ways to do that:
    1. Use Persistent system(File/Database) : Easiest but have external dependency.
    2. Use RPC calls both JVM,s little bit complex.
    3. Run new JVM in debug mode and connect on bootstrap port.
    4. Communicate using Sockets.
    Whatever suits you...

  • Spawning another java process after System.exit(0);

    Hi everyone
    I have an application that Im trying to test. Unfortunately one of these tests requires me to spawn another java process after a System.exit(0); has executed. Since this exits the VM its proving very difficult. Does anyone know of a way to restart the VM after the System.exit has run?
    Thanks

    Hi everyone
    I have an application that Im trying to test.
    Unfortunately one of these tests requires me to spawn
    another java process after a System.exit(0); has
    executed. Since this exits the VM its proving very
    difficult. Does anyone know of a way to restart the VM
    after the System.exit has run?Exactly what do you want to do?
    If the application is supposed to only have one exit point then add a security manager and disallow all the other exit points. Then you can use Runtime.exec() to start the second application just before the real exit point.
    However note that if there are other calls to System.exit in the application then it is very likely that this will cause some unexpected failures in terms of security exceptions.
    You could also use Runtime.addShutdownHook() which would run your second app. The hook would be called as the application exits.
    You might want to consider what happens if someone just kills the application (say with 'kill -9' or the windows task manager.) In either of those cases there is nothing that you can do in java to make that second application run.
    You might also want to consider why you are doing this in the first place. As suggested a script solution is probably a better solution.

  • How do I stop Java processes from appearing on the dock?

    I have a Java application that has a fairly extensive build process using ant. It builds fine on OSX, but constantly annoys me. There are a large number of unit tests that run using JUnit, and each test starts in a new Java process. The problem is that when each process starts (and there are about 100 during the course of the build), a new Java icon appears on the dock and stays until the process finishes. First of all, that slows down the build (since it has to do all that graphics work to keep changing the appearance of the dock). Secondly, every time a new process starts, it takes away the keyboard focus from whatever I'm currently working on. I either have to click in the window I want again, or else wait for the process to finish.
    On Windows, this is handled with an alternative version of the JVM called "javaw.exe" that does not get a foreground window. However, I see no "javaw" in the Java directory on OSX. Is there some option to start Java with that will stop this dock updating? Note that there are times when I want the dock to be updated (when I'm running a "normal" Java app).

    Even when the Guest Account / Access is disabled, the login option / and lock screen, still have a guest login.
    This is because in Preferences/ Security & Privacy/General the bottom item is turned on.
    Turn on: Disable restarting to Safari when screen is locked

  • How to use another java program to stop this running prpgram???

    Dear Sir:
    I have following code and I run it success,
    import java.util.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.*;
    public class CertainAndRepeatTime{
      public static void main(String[] args) throws IOException{
        int delay = 1;
        Timer timer = new Timer();
        ActionListener actionListener = new ActionListener() {
            public void actionPerformed(ActionEvent actionEvent) {
              System.out.println("Hello World Timer");
        System.out.println("What do you want (Certain time or Repeat time)?");
        System.out.print("Please enter \'C\' or \'R\' for that: ");
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ans = in.readLine();
        System.out.print("Please enter  ans=" + ans  + " IsTrue=  " + (ans.equals("R") || ans.equals("r")) +"\n");
        if (ans.equals("C") || ans.equals("c")){
          //System.out.println("This line is printed only once start...");
          timer.schedule(new TimerTask(){
            public void run(){
              System.out.println("This line is printed only once.");
          },delay,1);
        else if(ans.equals("r") || ans.equals("R")){
            timer.scheduleAtFixedRate(new TimerTask(){
              public void run(){
                System.out.println("This line is printed repeatedly.");
            },delay, 1000);
          while(true){
               //System.out.println("Charles print This line is printed repeatedly.");          
          } //This will make your main thread hang.
        else{
          System.out.println("Invalid Entry.");
          System.exit(0);
        System.exit(0);
    }But I hope to use another java program to stop it when it is running instead of pressing CRTL + C to stop it.
    How to do it??
    Any example??
    Thanks a lot!!

    Sorry, I think i did not express cearly. It is my fault.
    I re-write my requirements again:
    I have
    Class AAA1.java,
    Class AAA2.java,
    Class AAA3.java,
    Class AAA20.java...
    etc
    they all look like the program I posted first time,, once executed, they will run for ever, and they will be stopped until I press CRTL + C;
    Now I hope to use another java class StopProgram.java to stop them 1 by 1 or at once instead of pressing CRTL + C;
    In this case, how to code this StopProgram.java ??
    Thanks

  • How to access values in process request

    Hi guys,
    Wondering if some one could shed some light on the process of getting values in PR. The situation is that i have linked two pages and both have dateFrom and dateTo fields, the values of the fields are being copied across to the other page automatically. I would like to understand how.
    And the other is How is, how to access those values in Process Request. I want to use those dates as criteria for populating data when the user first opens the page.
    Any insight would be highly appreciated
    Regards,
    Shoaib.

    The situation is that i have linked two pages and both have dateFrom and dateTo fields, the values of the fields are being copied across to the other page automatically. I would like to understand how.
    If you have linked the pages, you would know how the values from one page is being transferred to the other page, this cannot happen automatically, you either must have 1. Passed them through URL
    2. Passed them through Session
    3. Have the same VO in both the pages and retaining the AM from P1 to P2.
    4. Requering the DB in P2 after saving the values in P1
    There could be number of ways you have done it.
    And the other is How is, how to access those values in Process Request. I want to use those dates as criteria for populating data when the user first opens the page.
    Depending on how you passed the values from P1 to P2, the method of getting these values in P2 PFR would vary, but in most cases pageContext.getParameter("paramname") should workThanks
    Tapash

  • How to invoke another Java file in Java program?

    Hello all,
    Now I am building a commnity of agents that can talk in Java, I have another Java-Based dialogue system to handle the dialogue between the agents. But I don'y know how to invoke the Java dialogue system file in the agent class.
    Is there any methods can call another .java file in a Java program?
    Help!!!!!please

    Yep, vaguest of the vaguey vague vague.
    Anyhoo,
    I'm guessing you want to call a method from a different class?
    Assuming you have the "Runner" class and then "Agent1", "Agent2", etc.
    Agent1 whatever = new Agent1();

  • How to access thru java stack

    Hi All
    can anyone pls let me know
    how to access sap thru java stack like what is ipaddress and port etc.
    Thanks in Advance
    Arun

    you can find full java administartion documentation at
    http://help.sap.com/saphelp_nwce10/helpdata/en/c8/cdfacc37efa84d914699ad31eb69b8/frameset.htm
    Also the link for accessing java page is
    http://<full hostname>:<port>
    full hostname- hostname of your SAP JAVA instance
    port no- 50000+100*Instance number
    Instance no- SAP system instance no
    Rohit

  • How to restart a java process in Oracle AS 10g

    Hi
    In Oracle AS 10g, the java process consumes 50% cpu resource due to the report invoked by a user. Now I need to restart the java back ground process?, please reply me with the syntax or with examples.
    ps -eaf
    CPU PROCESS
    50% /ORACLE_HOME/jdk/jre/bin/java -server -cp /report/oracle
    Thanks in advance
    Bala

    The copy method being using is unsupported, hence the target Portal would be in an unsupported state.
    This is unsupported as per the following note:
    Note 333867.1 - Portal Export and Import Utility Supportability Scenarios :
    Copy operations after an object is renamed:
    Exporting and importing a page group, then renaming the page group on the target system (to create a copy) and repeating the export and import operation.
    OR:
    Exporting and importing a page group, then renaming the same in source or target and repeating the export and import operation.
    Not supported.
    Please do not rename objects if you plan to perform export and import operations.
    Note: The display name can be changed, but internal name change is considered a renaming operation.
    In 10.1.4, renaming is supported, but renaming page group and pages with the intention of copying them is not supported..."

  • How to access custom JAVA webdynpro application from an iPad?

    Hi,
    We are trying to access custom JAVA webdynpro application from an iPad, but nothing is opening up from the iPad browser.
    What can be the possible reasons for this? Any kind of SICF enablement or opening up of ports in the network?
    Any inputs are welcome!!
    TIA,
    Regards
    Deepthi

    Hi,
    it is possible to show Java Web Dynpro applications on a mobile device in general, but the controls and the ui should be optimized for the mobile device.
    Safari devices are not officially supported so far for Mobile Web Dynpro.
    Supported are Windows Mobile devices and Blackberry devices. I also got some good results with Symbian devices.
    You can find more inforamtion on Mobile Always Connected at:
    ht[http://help.sap.com/saphelp_nwce711core/helpdata/en/7d/28fa3e7cb1d861e10000000a114084/content.htm|http://help.sap.com/saphelp_nwce711core/helpdata/en/7d/28fa3e7cb1d861e10000000a114084/content.htm]
    Best Regards,
    Stefan

  • Killing a Java process from another Java process

    Hi
    Is there a possible way of sending a SIGINT, SIGKILL, or any other signal from a Java process running in one JVM, to a java process running in a different JVM on the same machine.
    I've the signal handlers written in my process and they do respond to singals (e.g. on pressing Ctrl-C) on the console, but i want to write a separate program that sends this signal to the first process.
    Any ideas?
    Thanks in advance and regards
    Kashif

    The answer, as always, is that Java can't do operating-system-specific things like that, but you can use JNI to do it. However, if your code created the Java process you want to kill, via Process p = Runtime.getRuntime().exec(...), then you can use p.destroy() to kill it.

Maybe you are looking for

  • Issue with COMMIT_FORM

    Hi, please help me with this issue. I have a form with multple blocks based on database tables. All the fields are displayed on a tabbed canvas with multiple tab pages. I also have a toolbar (one of the blocks in the form) with query, commit, cancel,

  • Have installed Muse via CC - payed for it, but doesn't work

    Hi, In the very beginning I tried Muse via trialperiod. Then payed for it. Now I have payed for another year-submisson from yesterday with a new adobe account. Have downloaded muse via cc, but when opening the program it says my trial period is over.

  • I deleted mac store by an accident, how do i get it back?

    Hi reader I deleted my app store by an accident, now i dont get it back. I have tried to update my mac to newest version, but with no results.  I have got mac os x version 10.6.8. any thoughts about how i get app store back ?

  • Duplicate copies of draft messages

    Hi, I have just sent a couple of emails through Mail and have just noticed that there are 64 copies of one of the emails in Drafts and 35 of the other. It looks like one copy is being saved for every minute that I was editing my email. How do I stop

  • USR02-LTIME - Last logon Time

    Hi All we have to trace the last logon time of CRM webclient users but USR02-LTIME does not write the right time, in this sense: - you logon at 11:00 with user TEST - you see USR02-LTIME = 11:00 - you use the webclient without logoff and you see in U