Prettier way to do RMI?

I don't like the RMI registry. I think it makes RMI ugly because:
1. Anybody using my application has to start it independently of my application.
2. It requires extra mucking about with the classpath to get my application to work.
3. From my code's perspective, I can't tell if it is running or not until I try to publish a class, and it throws an exception.
4. If it is already running, and someone installs my application, they have to stop it, add my application's jar to the classpath, and start it again, no?
5. (optional, but probable) There's a better way to use rmiregistry, and I'm just ignorant.
So I was wondering if there is a better way to do RMI. I had a couple ideas:
A. At the bare minimum, enable my application to figure out if rmiregistry is running, and if not, configure the classpath for it (somehow... any idea how??)
and start it from inside my application... ...using Runtime.exec()... I guess.
B. What would be better is if I could just include rmiregistry.jar and call methods from it as needed... which would be okay, unless another rmiregistry was already running. And, although I have a copy of rmiregistry.jar, I have no source for it, so I have no idea how to get it going. In fact, I have no idea if the jar I have actually corresponds to a working version of rmiregistry.
... of course, neither of these ideas solves the scenario where rmiregistry is already running, but my application jar was/is not in its classpath.
So does anybody know a better way to do RMI? Or perhaps a simpler way to address the 4 problems I listed?

I don't like the RMI registry.The RMI Registry is an essential part of RMI. Without it to act as a bootstrap, you can't get started.
1. Anybody using my application has to start it independently of my application.No, see reply #1.
2. It requires extra mucking about with the classpath to get my application to work.Not if you do what it says in reply #1.
3. From my code's perspective, I can't tell if it is running or not until I try to publish a class, and it throws an exception.That's how you tell. What's wrong with that?
4. If it is already running, and someone installs my application, they have to stop it, add my application's jar to the classpath, and start it again, no?Not if you do what it says in reply #1.
5. (optional, but probable) There's a better way to use rmiregistry, Yep.
A. At the bare minimum, enable my application to figure out if rmiregistry is running, and if not, configure the classpath for it (somehow... any idea how??)
and start it from inside my application... ...using Runtime.exec()... I guess.See reply #1. Forget about the classpath problem, it disappears.
B. What would be better is if I could just include rmiregistry.jarThere is no such thing.
And, although I have a copy of rmiregistry.jar, I have no source for it, so I have no idea how to get it going. In fact, I have no idea if the jar I have actually corresponds to a working version of rmiregistry.It is almost certainly spurious. Where did you get it? What does it contain? What are the dates?

Similar Messages

  • NAPT Firewall, RMI Callbacks and JRMP MultiplexProtocol

    Hi All,
    I am looking at having an RMI client behind a Network Address Port Translation firewall receive RMI calls back from an RMI server. NAPT makes it impossible for the client to listen for connection coming from the server through the NAPT firewall.
    This is discussed at http://www.rmiproxy.com and http://cssassociates.com/rmifirewall.html but the proposed solutions do not appear to use the MultiplexProtocol protocol defined by JRMP (http://java.sun.com/j2se/1.4.2/docs/guide/rmi/spec/rmi-protocol3.html).
    The RMI FAQ
    "How can I receive incoming RMI calls through a local firewall"?
    (http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html#firewallIn) had a section for JSSE 1.3 that explained how to use the multiplex protocol (option 4). It sounds like this option referred to the JRMP MultiplexProtocol protocol.
    The multiplex protocol option has been removed from the 1.4 FAQ
    (http://java.sun.com/j2se/1.4.2/docs/guide/rmi/faq.html#firewallIn).
    Tried the "checkListen" and "socket factory" techniques mentioned in the 1.3 FAQ without success with 1.4.2. The RMI client behind the NAPT firewall runs in a signed Applet.
    Is the ability of using the JRMP MultiplexProtocol protocol available in the JRE in order to receive incoming RMI calls through a local firewall? If yes, what do you do in order to use it?
    What is the best way to have RMI callbacks work behind NAPT?
    Thanks a lot in advance!
    Cheers
    Bertrand

    As of about JDK 1.2.2, the ability of RMI clients to negotiate the multiplex protocol was
    removed, but the server-side support remains.
    Your best answer for negotiating NAT filrewalls may be the RMI Proxy http://www.rmiproxy.com, although I could be biased as I wrote it.
    EJP

  • RMI not working

    I am new to weblogic and am trying to deploy an RMI implementation class in weblogic 6.1. I went through the example and it fails. I get no stub/skel classes or the proxy class I'm supposed to get when I run weblogic.rmic. I have tried numerous ways using java.rmi and weblogic.rmi but have not had any success. When I run the client program, I always get the following:
    Error marshaling transport header; nested exception is:
    java.io.EOFException
    java.rmi.MarshalException: Error marshaling transport header; nested exception is:
    java.io.EOFException
    java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:224)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:206)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
    at sun.rmi.registry.RegistryImpl_Stub.list(Unknown Source)
    at TestRMIClient.main(TestRMIClient.java:44)

    Hi Chip,
    Can you explain what you are trying to do, I will try to see if I can help
    you.
    You can follow: http://e-docs.bea.com/wls/docs70/rmi/rmi_api.html to write
    your implementation.
    Best place to start would be with the examples shipped with WLS:
    WL_HOME\weblogic700\samples\server\src\examples\rmi folder has the examples
    and the docs that will help you run the examples.
    If this doesnt help, can you please explain what you are trying to do and I
    will see if I can help you out.
    hth
    sree
    "Chip Truax" <[email protected]> wrote in message
    news:[email protected]..
    Answer really didn't help - I've tried several different protocols, t3,iiop, http. Nothing works - it looks to me that there is no entry in the RMI
    registry, or that there is no RMI registry in Weblogic. According to docs, I
    should see my object in JNDI tree, but I see nothing. Clearly the binding is
    not working correctly. Also, the docs say I should get some sort of proxy
    class or xml file generated when the weblogic.rmic is run - but absolutely
    nothing gets output.

  • Running 2 separate programs at once w/ RMI

    Hello Java forum. I am coding a stock market simulator with Java. I need the stock prices to be CONSTANTLY dynamic. So what I have is a driverClass that is the front for the market sim. It displays the stock prices and such, and therefor must grab variables from the engineClass which is constantly looping to randomly increase or decrease the stock values of 50 different stocks. Here is a VERY watered down version of these 2 classes:
    driverClass (the front of the program)
    public class driverClass
         public static void main (String[]args)
         int stockPrice = 0, numShares = 0, totalPrice = 0;
         /*Some way to take values from the constantly running engineClass
         stockPrice = code to get value from the Dell method in the engineClass
         numShares = Keyboard.readInt();
         totalPrice = numShares * stockPrice
         System.out.print ("The stock's price is " + stockPrice);
         System.out.print (". You have " + numShares + " shares of Dell stock.");
         System.out.println (" Your net worth is " + totalPrice + ".");
    }The engineClass (constantly changes all of the stock prices)
    public class engineClass
         public static void main (String[]args)
              //Does this have to be a main method (like a driver) or can it/does it have to be in the form of an object class?
              int repeat = 100, stockValue = 20;
              while(repeat > 0)
                   Dell(stockValue);
                   repeat--;
         public static int Dell (int stockPrice)
              return stockPrice;
         //does basically this for the other 49 stocks
    }So what I need is to be able to call on a method in the engineClass FROM the driverClass while the engine is constantly changing all of the stock prices. Everyone has told me that RMI is the BEST way to do this, but RMI is extremely confusing to me. All the talk of servers and clients, while not retaining the same network meaning perhaps, still throws me off. Can someone please tell me the simplest way to use RMI to access a method in the engineClass from the driverClass with both of them running. Thanks!

    One FINAL issue to clear up it seems:
    Okay everything is going well, except it seems I have one final issue at hand. The method that I am remotely invoking is static, and I can't think of a way to make it so that it doesn't have to be. Look at my code:
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    Client:
    public class Drive
        public static void main(String[] args)
              String host = (args.length < 1) ? null : args[0];
              try
                  Registry registry = LocateRegistry.getRegistry(host);
                  RemoteInterface stub = (RemoteInterface) registry.lookup("Hello");
                  int response = stub.UnionPacific();
                  System.out.println("response: " + response);
              catch (Exception e)
                  System.err.println("Client exception: " + e.toString());
                  e.printStackTrace();
        private Drive()
    }Server:
    import java.rmi.registry.Registry;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    public class Engine implements RemoteInterface
         public static int price, total1, total2, current = 1;
         public static boolean cont = true;
        public static void main(String[]args)
              try
                   java.rmi.registry.LocateRegistry.createRegistry(1099);
                   System.out.println("RMI registry ready.");
              catch (Exception e)
                   System.out.println("Exception starting RMI registry:");
                   e.printStackTrace();
              try
                   Engine obj = new Engine();
                  RemoteInterface stub = (RemoteInterface) UnicastRemoteObject.exportObject(obj, 0);
                  // Bind the remote object's stub in the registry
                  Registry registry = LocateRegistry.getRegistry();
                  registry.bind("Hello", stub);
                  System.err.println("Stock Market Ready");
              catch (Exception e)
                  System.err.println("Server exception: " + e.toString());
                  e.printStackTrace();
             while(cont)
                   price++;
                   if(current == 1)
                        //UnionPacific();
                        current = 2;
                   else
                        //Altera();
                        current = 1;
         public Engine()
         public int UnionPacific()
              return total1;
         public int Altera()
              return total2;
    }Remote Interface:
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface RemoteInterface extends Remote
        int UnionPacific() throws RemoteException;
        int Altera() throws RemoteException;
    }So you see how this works? The main method of the server is constantly updating the totals of both Altera() and UnionPacific(). These 2 need to be invoked remotely, but in order to call them from the static main loop, they also have to be static, but the remote interface does not allow this! It is very annoying. can anyone tell me how to get around this, or a way to make it so my altera and unionpacific methods dont have to be static? THANKS!!!
    Edited by: NasaGuru on Mar 11, 2009 6:48 PM

  • Exception when using RMI in tomcat 5.5, after reloading webapp

    When I freshly start tomcat and deploy my web app, I can use RMI by creating a local registry and binding my objects.
    However, as soon as I reload the web application, RMI no longer works and gives me this exception:
    RMI error: error unmarshalling return; nested exception is:
            java.io.EOFException
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
            java.io.EOFException
            at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
            at java.rmi.Naming.lookup(Naming.java:84)
            at nl.heliotrope.tropebiz.tools.NutchRestarter.main(NutchRestarter.java:33)
    Caused by: java.io.EOFException
            at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2498)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1273)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
            at sun.rmi.server.MarshalInputStream.readLocation(MarshalInputStream.java:285)
            at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:167)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
            ... 3 moreThe code to register my RMI object:
            logger.debug("Setting up RMI");
            //bind remote manager object to rmi resource
            RemoteManager remoteManager = new RemoteManager();
            try {
                Naming.rebind(rmiResource, remoteManager);
            } catch (MalformedURLException e) {
                throw new RuntimeException("Cannot happen: " + e.getMessage());
            } catch (RemoteException e) {
                /* perhaps the registry was not started yet? Attempt.
                 * Cannot create registry automatically at web application startup,
                 * because another app may have done so already.
                logger.debug("Error registering remote manager to RMI, " +
                        "service not running? Starting the registry.");
                try {
                    LocateRegistry.createRegistry(1099);
                    Naming.rebind(rmiResource, remoteManager);
                    logger.debug("RMI Registry started and remote manager registered");
                } catch (RemoteException e2) {
                    logger.error("Failed to start RMI registry or register RemoteManager!");
                    throw new RemoteException("rebind: " + e2.getMessage());
                } catch (MalformedURLException e2) {
                    throw new RuntimeException("Cannot happen: " + e.getMessage());
            logger.debug("RMI set up successfully");And client code:
                IRemoteManager remoteManager = (IRemoteManager)Naming.lookup(RemoteManager
                        .getRMIResource("127.0.0.1", 1099));Trying set a RMISecurityManager breaks tomcat horribly by the way, but since RMI works with a fresh tomcat startup, I suppose there's no problems there.

    Hi all!
    I get the same Exception using Tomcat 5.5. When registering an object outside tomcat lookup works fine. Only when registering an object inside a webapp!
    Would be great if anyone got a tip to solve it!
    Greetings...

  • How far Web service is better than RMI??

    Hi buddies,
    can anyone pls tell me *"How far Web Services are more preferable than RMI?"*
    i am totally confused of various kind of answers?
    thanx in advance.
    bye,
    subbu

    RMI transmits objects via Serialization so is much more space and time efficient over a LAN.
    Web Services transmits XML over HTTP so it can generally negotiate firewalls, which can be a major problem with RMI systems.
    Web Services don't support callbacks or small transactions very well, where RMI does (firewalls permitting).
    The security features built into Web Services or available via XML are superior to RMI over SSL in a number of ways.
    Basically RMI is best where you want to export an extensive API via a LAN. Web Services are best when you want to export a few simple transactions via the Web.

  • Puzzled about RMI

    Folks,
    I'm just playing with RMI now and have followed the tutorial but I am a little puzzled about some behaviour I'm observing. This may be that I am missing a piece of information about RMI or how it works so if anyone can fill in the blanks then I would be most appreciative!!!
    So I've got the following Remote interface definition:
    import java.rmi.*;
    public interface RMIInterface extends Remote
        public int getValue () throws RemoteException;
        public void setValue (int val) throws RemoteException;
    }And I have some code that implements that interface. This code also contains a main method that performs some stuff with the RMI object. It is given below:
    import java.rmi.*;
    import java.io.*;
    public class RMIObject implements Remote, RMIInterface, Serializable
        private int value = 0;
        public int getValue ()
                             throws RemoteException
         return this.value;
        public void setValue (int    val)
                              throws RemoteException
         this.value = val;
        static public void main (String argv[])
         try
             RMIObject o = new RMIObject ();
             Naming.rebind ("//localhost/RMIObject", o);
             o = (RMIObject) Naming.lookup ("//localhost/RMIObject");
             o.setValue (100);
             System.out.println (o.getValue ());
             o = (RMIObject) Naming.lookup ("//localhost/RMIObject");
             System.out.println (o.getValue ());
         } catch (Exception e) {
             e.printStackTrace ();
    }As you can see, I bind the object, then get a new reference to the object, set a value then get the reference again and see what the value is.
    The output I get from this code is:
    100
    0
    Which indicates that setValue is working when the reference is local but it's not updating the remote object. Now the question is, is this the way that RMI is supposed to work? i.e. should you NOT use RMI objects for holding state? If so what's the point because effectively the object would be isolated...can anyone shed any light on this?
    BTW, I am NOT a student and this is NOT related to any exam/coursework question!!!

    Hi!
    Naming.lookup(..) actually returns a local reference to the server's stub object (which is locally present in the RMI client's machine). This stub takes care of the remote method invocations. Actually I don't understand how could you do the typecasting to the RMIObject but this is not really important right now!
    Let's see what happened in your example:
    First you registered your RMIObject in the registry.
    Then you retrieved a remote reference to it (a local stub, which implements the remote interface of the server object) and you set some variables of it.
    Then you retrieved again that stub (the java system probably instantiated an other stub object) and its variables were initialized also.
    This is not the way as the RMI should be used!
    The Naming.lookup(..) method always returns a Remote interface (if it can, or throws a RemoteException). This return value must be typecasted to the server object's Remote interface (in your example it's RMIInterface).
    Then you can use this object's (interface's) methods as you want to. (actually you use the stub object's methods which converts your calls to remote calls...)
    I hope it's clear now,
    Sany

  • Rmi running problem

    Hi i am working my way through a basic rmi example, here is the code for the server as serverDriver, the interface as SampleServer and server2 as the implementation
    of the interface
    mport java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface SampleServer extends Remote{
         public int sum(int a,int b) throws RemoteException;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    public class Server2 extends UnicastRemoteObject implements SampleServer{
         protected Server2() throws RemoteException {
              super();
              // TODO Auto-generated constructor stub
         @Override
         public int sum(int a, int b) throws RemoteException {
              // TODO Auto-generated method stub
              return 0;
    public class serverDriver {
         * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              try
                   // create the security manager
                   System.setSecurityManager(new RMISecurityManager());
                   Server2 server = new Server2();
                   // put the local instance in the registry
                   Naming.rebind("SAMPLE-SERVER",server);
                   System.out.println(" the server is waiting ");
              catch(java.net.MalformedURLException me)
                   System.out.println("Malformed URL -> " + me.toString());
              catch(RemoteException re)
                   System.out.println(" Remote Exception :" + re.toString());
    ----->
    when i run the serverdriver java -Djava.security.policy=policy.all serverDriver
    i get
    ------>
    Remote Exception :java.rmi.ServerException: RemoteException occurred in server
    thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: SampleServer
    ------->
    all of the class files are in the same directory ( i am using eclipse to compile and running from commandline using jre6 with matching compiler)
    is this error beacuse i have to compile with rmic for the interface or is this an "old way" of doing rmi ???
    thanks

                   // create the security manager
                   System.setSecurityManager(new RMISecurityManager());Remove that unless you know you need it.
                   // put the local instance in the registryThat won't work. Try Naming.rebind("SAMPLE-SERVER",server);
    Naming.rebind("//localhost/SAMPLE-SERVER", server);
    Remote Exception :java.rmi.ServerException: RemoteException occurred in server
    thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: SampleServerThe RMI Registry doesn't have SampleServer in its CLASSPATH. When you fix that, fix it for the client too.
    is this error beacuse i have to compile with rmic for the interfaceNo.

  • RMI with CLA=0X command

    If I use RMI .
    RMI can't manage apdu by programmer , right?
    If I want to use ISO 7816-4 command as below:
    Verify : CLA=00 INS=20
    Get Challenge : CLA=00 INS=84
    How to use these with RMI programming style?
    thank for your help

    If I use RMI - RMI can't manage apdu by programmer , right?You can't specify APDU-commands via RMI. RMI is a layer above the APDU command layer.
    For a better understanding you can compare RMI & APDU with some common Internet protocols. RMI is like an application protocol (HTTP or FTP ...) and APDU like TCP/IP. HTTP uses TCP/IP but if you want to send a specific TCP or IP package you can't do that via HTTP/FTP...
    If I want to use ISO 7816-4 command as below:
    Verify : CLA=00 INS=20
    Get Challenge : CLA=00 INS=84
    How to use these with RMI programming style?The same way as without RMI, get all the necessary data into one APDU and send it to the card. Make sure you use a different CLA from the one RMI uses. On card you have to process you APDU-command manually before or after the RMI-dispatch call.
    Jan

  • Vast use of RMI.

    Imagine haveing a server application connected with a database. Useing either JDO, Hibernate, or JDBC to connect with this database.
    Would you create a client application that connects with the server application and make use of this database information using RMI?
    My worries are:
    1. Whearter the connection will be slow. Imagine having a dial-up connection or even worse a J2ME client.
    2. Would it be secure. Would the transfered data be potientially reached by someone else?

    But from how I see it, one has two options in distributed applications (wheather or not using J2ME).
    The first option is to retrieve all that may be needed. at once, work on that data and then you send the changes back to the server when ready.
    Otherwise you could get the data needed for the particular task, make changes and send changes.
    So the difference between the two aproches is how much data is being retrieved and how often.
    If you go with the first aproach you will have a lot of time waiting for all the data (for all different tasks) to come, and a lot of data in the end when sending the changes (since sending changes for all tasks). However no time is used between one task and another.
    In the second aproach you are retrieving small ammount of data and thus it takes less time (since you retrieve data for one single task), and also less time when sending the changes back. However this small ammount of time will be repeated when passing from one screen to another.
    Now, If I go for the first scenario I would have no problems using sockets. But for the second scenario I see RMI as a fast way and more profesional way.
    Also RMI would make the database calls much more understandable from the client side application.
    I personally never programmed a J2ME or a full RMI application, so all the advise in the matter would really mean a lot to me.
    Thanks for all the posts so far and the URL's :)

  • Rmi server communicating with client

    Is there any way for an rmi server to communicate back to the client? What I mean is, the client connects to the server and calls some method x(). One of the arguments of x() is the client(x(AClient ac)). Assume that AClient is a JFrame and has a method y() which adds a button to the frame or something. If the server calls ac.y(), in my understanding/experience, the server would actually create a local copy of AClient and add the button to the local copy, not to the frame that the client user is looking at.Is this correct? { 
      If so, is there any way to have ac.y() add the button to the client user's frame?
        If not, does anyone have any ideas for how to implement something like this relatively easily? 
    If not, does anyone have any ideas why it's not responding that way for me?I'm trying to avoid programming socket connections for this, and would love to be able to do it with rmi.
    Thanks in advance,
    m

    Not sure exactly what your starting point is. But:
    1. The client must be a UnicastRemoteObject.
    2. If your client is behind a firewall, then the scheme probably won't work. (Explored exhaustively in this forum.)

  • RMI connection dection

    Is there a way to make RMI calls come back faster if it detects "line fault"? I can get connectException almost instantly if my contacting server has been shutdown/exited, but it seems to take forever to get a connectException when physical line between them is broken. btw this is after the naming lookup.
    Thanks

    there is no way to know if the other end is not getting the packets. it all comes down to timeouts at that point. after some amount of time, the sending end gives up. if, however, you make that timeout too short, then you may give up too soon. if you make it too long, then you wait a while before you give up. you can set most of these timeouts in rmi using system properties.

  • JNDI RMI

    I am trying to understand how JNDI works.
    1) It´s something like RMI, I mean, I attach an object to a name(url), isnt it?
    2) what is the InitialContext, like the registry server in rmi?
    Thanks

    I have the same question. I can't distinguish between 2 ways of using RMI:
    The first way, I usually see is:
    1) Create object, interface on Server
    2) Create file stub & skeleton
    3) Create interface on Client, copy stub file to Client
    4) Run rmiregistry.exe
    5)...
    The second way is:
    Using JNDI
    1) Create environment
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
    env.put(Context.PROVIDER_URL, "rmi://server:1099");
    2) Create context and lookup object by name
    Context ic = new InitialContext(env);
    Object obj = ic.lookup(name)
    If possible, pls give me step-by-step example of using JNDI. I run example of the first way already but can't find the example for the second way.
    May anybody help me?

  • Not responding whenever computer is restarted. I have to uninstall and re-instal Adobe Flash Player every day and it works. How do I fix this?

    It works until I restart the computer. I have tried every suggested fix I can find including:
    Updated - latest version installed
    Re-installed Adblock +
    Drivers up to date
    Acceleration is on
    Reset Firefox
    Malware Bites Pro runs continuous
    Safe Mode
    How do I send the crash reports?

    Basically, the script wrapper solution is: Firefox launcher gets changed to run a script, which in turn starts Firefox and also jumps through whatever hoops you need to fix the problem. Not a pretty way to do things, but if the problem is indeed in zombie processes and/or junk data in local cache, this will do the job. So, instead of running '''''YourAppPath''/firefox.exe''' it would run '''''YourBatchPath''/firefox.bat''' that contains something like this:
    * ''YourAppPath''/firefox.exe
    * [http://technet.microsoft.com/en-us/sysinternals/bb896683 pskill] -t ''YourFlashPlugin''.exe
    * del ''YourFlashCachePath''/*.*
    Of course, you'll need to do this manually first - take a look with Process Explorer at what processes FF launches and which of them fails to terminate and locate the cache (where Process Explorer / Process Monitor also helps), mop them up and see whether it helps.
    If you're not used to this sort of things, show this message to someone who is, it will take a few minutes to either have it done or disprove my hypothesis about your bug (not likely, as it's rather typical, and FF sometimes manages to half-zombify itself even in Linux).

  • How to transfer file from one machine to remote machine?

    Hi All,
    I dont know Question i am posting should go to this forum or to another form? so sorry in advance.
    In my web application i am using tomcat server. On one user action server is generating one file which i want to copy to some remote location.
    I m just confused which API should i used and which is better way like using RMI or by socket Programming or anything else?
    Any help would be greatly appreciated.
    Thanks and regards,
    Rohit kotecha.

    do you have some sort of existing java application running on the destination location which will receive the file, or are you starting completely from scratch?
    if you are starting completely from scratch, i'd suggest setting up a simple ftp or web server on the destination location.

Maybe you are looking for