Running a Java App on 2 different machines

Hello all
I have a very interesting java application that gathers information and saves it to a database.
To scale the application, I would like to run it on 2 different computers. I have a 400MHz W2K desktop and a 800Mhz W2k laptop.
They will have to share the 2 static vectors. -- to ensure they are not doing/repeating the same work
how would you guys approach this
how would you approach this
stephen

Thanks 3 questions.
1. RMI seems to be a quick way to go -- could someone give me an example of how that would work -- if i know just the 2 ip address of the box ? I'm also under the impression i would have to set permission for that kind of access to the computers.
2. What does JSD stand for and how would it work ?
3. How would the JMS solution work ?
4. What is the maximum information I can store in javanamespaces -- i might have to loop through 1 million objects in a vector and make decisions based on that.
stev

Similar Messages

  • Running multiple java apps simultaneously, using different versions of jre.

    I have a situation where I have 3 or 4 applications (and one applet) that were built over time, each with a different version of the jdk (ranging from 1.2.2.005 to 1.3.2). I need to know of a way (and it must exist) to run each of these applications on the same machine, and at runtime, have each application (or applet) run with its respective version of the jre. Certainly, one could change some source code and make all programs compatible with a particular jre, but that doesn't solve my problem if a new app is built with a new version of the jdk down the road. Currently, each runs fine by themselves, but if I try to run them together as different processes, some won't do anything because the default jre may not be what it needs. Would the Java Plug-in software have a role to play in this? Is there a way to specify (link) which application should use which jre?
    P.S. These applications (right now) don't have to interact or interface in any way. I just need to have them all running as separate processes on the same machine and be able to jump from one to the other.

    Write a batch file that sets the environment properly and restores it afterwards, here is a sample batch file we use which switches to IBM's JRE to run an app:
    OLDPATH=$PATH
    PATH=$PATH:"/usr/local/java/IBMJava2-13/jre/bin"
    OLDCP=$CLASSPATH
    CLASSPATH="/usr/local/java/IBMJava2-13/jre/lib/rt.jar:."
    OLDHOME=$JAVA_HOME
    JAVA_HOME="/usr/local/java/IBMJava2-13/jre"
    # put the command to execute your program here
    java -jar app.jar
    PATH=$OLDPATH
    CLASSPATH=$CLASSPATH
    JAVA_HOME=$JAVA_HOME
    This is for Linux, but it should be possible to write one for Windows too.

  • How do I run multiple java apps in one JVM to reduce memory use?

    Hi all,
    I saw an article either on the web or in a magazine not too long ago about how to "detect" if the app is already running, and if so, it hands off the new instance to the already running JVM, which then creates a thread to run the Java app in. As it turns out, my app will be used in an ASP environment, through Citrix. We may have as many as 50 to 100 users running the same app, each with their own unique user ID, but all using the same one server to run it on. Each instance eats up 25MB of memory right now. So the question is if anybody knows of a URL or an app like this that can handle the process of running the same (or even different Java) apps in one JVM as separate threads, instead of requring several instances of the JVM to run? I know this article presented a fully working example, and I believe I know enough to do it but I wanted ot use the article as a reference to make sure it is done right. I know that each app basically would use the same one "launcher" program that would on first launch "listen" to a port, as well as send a message through the port to see if an existing launcher was running. If it does, it hands off the Java app to be run to the existing luancher application and shuts down the 2nd launching app. By using this method, the JVM eats up its normal memory, but each Java app only consumes its necessary memory as well and doesn't use up more JVM instance memory.
    Thanks.

    <pre>
    import java.util.Properties;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.lang.reflect.Method;
    import java.lang.reflect.InvocationTargetException;
    import java.util.Enumeration;
    import java.util.NoSuchElementException;
    public class RunProg implements Runnable, Cloneable
    private String iProg;
    private String iArgs[];
    public static void main(String args[])
    new RunProg().main();
    // first step is to start main program itself
    private void main()
    Properties properties = System.getProperties();
    try
    properties.load(new FileInputStream("RunProg.properties"));
    catch(IOException e)
    System.setProperties(properties);
    int i = 0;
    System.out.println("enter main, activeCount=" + Thread.activeCount());
    while(true)
    String program = properties.getProperty("Prog" + i);
    if(program == null)
    break;
    StringTokenizer st = new StringTokenizer(program);
    String[] args = new String[st.countTokens() - 1];
    try
    RunProg rp = (RunProg)this.clone();
    rp.iProg = st.nextToken();
    for(int j = 0; st.hasMoreTokens(); j++)
         args[j] = st.nextToken();
    rp.iArgs = args;
    Thread th = new Thread(rp);
    th.setName("prog" + i + "=" + program);
    th.start();
    System.out.println("prog" + i + "=" + program + ", started");
    catch(CloneNotSupportedException e)
    System.out.println("prog" + i + "=" + program + ", can't start");
    i++;
         System.out.println("end of main, activeCount=" + Thread.activeCount());
    // next step is to start all others one by one
    public void run()
    try
    Class c = Class.forName(iProg);
    Class p[] = new Class[1];
    p[0] = String[].class;
    Method m = c.getMethod("main", p);
    Object o[] = new Object[1];
    o[0] = iArgs;
    m.invoke(null, o);
    catch(ClassNotFoundException e)
    System.out.println(iProg + "ClassNotFoundException");
    catch(NoSuchMethodException e)
    System.out.println(iProg + "NoSuchMethodException");
    catch(InvocationTargetException e)
    System.out.println(iProg + "NoSuchMethodException");
    catch(IllegalAccessException e)
    System.out.println(iProg + "NoSuchMethodException");
    System.out.println(Thread.currentThread().getName() + ", ended");
    System.out.println("exit run, activeCount=" + Thread.activeCount());
    // setup SecurityManager to disable method System.exit()
    public RunProg()
         SecurityManager sm = new mySecurityManager();
         System.setSecurityManager(sm);
    // inner-class to disable method System.exit()
    protected class mySecurityManager extends SecurityManager
         public void checkExit(int status)
              super.checkExit(status);
              Thread.currentThread().stop();
              throw new SecurityException();
    * inner-class to analyze StringTokenizer. This class is enhanced to check double Quotation marks
    protected class StringTokenizer implements Enumeration
    private int currentPosition;
    private int maxPosition;
    private String str;
    private String delimiters;
    private boolean retTokens;
    * Constructs a string tokenizer for the specified string. All
    * characters in the <code>delim</code> argument are the delimiters
    * for separating tokens.
    * <p>
    * If the <code>returnTokens</code> flag is <code>true</code>, then
    * the delimiter characters are also returned as tokens. Each
    * delimiter is returned as a string of length one. If the flag is
    * <code>false</code>, the delimiter characters are skipped and only
    * serve as separators between tokens.
    * @param str a string to be parsed.
    * @param delim the delimiters.
    * @param returnTokens flag indicating whether to return the delimiters
    * as tokens.
    public StringTokenizer(String str, String delim, boolean returnTokens)
    currentPosition = 0;
    this.str = str;
    maxPosition = str.length();
    delimiters = delim;
    retTokens = returnTokens;
    * Constructs a string tokenizer for the specified string. The
    * characters in the <code>delim</code> argument are the delimiters
    * for separating tokens. Delimiter characters themselves will not
    * be treated as tokens.
    * @param str a string to be parsed.
    * @param delim the delimiters.
    public StringTokenizer(String str, String delim)
    this(str, delim, false);
    * Constructs a string tokenizer for the specified string. The
    * tokenizer uses the default delimiter set, which is
    * <code>"&#92;t&#92;n&#92;r&#92;f"</code>: the space character, the tab
    * character, the newline character, the carriage-return character,
    * and the form-feed character. Delimiter characters themselves will
    * not be treated as tokens.
    * @param str a string to be parsed.
    public StringTokenizer(String str)
    this(str, " \t\n\r\f", false);
    * Skips delimiters.
    protected void skipDelimiters()
    while(!retTokens &&
    (currentPosition < maxPosition) &&
    (delimiters.indexOf(str.charAt(currentPosition)) >= 0))
    currentPosition++;
    * Tests if there are more tokens available from this tokenizer's string.
    * If this method returns <tt>true</tt>, then a subsequent call to
    * <tt>nextToken</tt> with no argument will successfully return a token.
    * @return <code>true</code> if and only if there is at least one token
    * in the string after the current position; <code>false</code>
    * otherwise.
    public boolean hasMoreTokens()
    skipDelimiters();
    return(currentPosition < maxPosition);
    * Returns the next token from this string tokenizer.
    * @return the next token from this string tokenizer.
    * @exception NoSuchElementException if there are no more tokens in this
    * tokenizer's string.
    public String nextToken()
    skipDelimiters();
    if(currentPosition >= maxPosition)
    throw new NoSuchElementException();
    int start = currentPosition;
    boolean inQuotation = false;
    while((currentPosition < maxPosition) &&
    (delimiters.indexOf(str.charAt(currentPosition)) < 0 || inQuotation))
    if(str.charAt(currentPosition) == '"')
    inQuotation = !inQuotation;
    currentPosition++;
    if(retTokens && (start == currentPosition) &&
    (delimiters.indexOf(str.charAt(currentPosition)) >= 0))
    currentPosition++;
    String s = str.substring(start, currentPosition);
    if(s.charAt(0) == '"')
    s = s.substring(1);
    if(s.charAt(s.length() - 1) == '"')
    s = s.substring(0, s.length() - 1);
    return s;
    * Returns the next token in this string tokenizer's string. First,
    * the set of characters considered to be delimiters by this
    * <tt>StringTokenizer</tt> object is changed to be the characters in
    * the string <tt>delim</tt>. Then the next token in the string
    * after the current position is returned. The current position is
    * advanced beyond the recognized token. The new delimiter set
    * remains the default after this call.
    * @param delim the new delimiters.
    * @return the next token, after switching to the new delimiter set.
    * @exception NoSuchElementException if there are no more tokens in this
    * tokenizer's string.
    public String nextToken(String delim)
    delimiters = delim;
    return nextToken();
    * Returns the same value as the <code>hasMoreTokens</code>
    * method. It exists so that this class can implement the
    * <code>Enumeration</code> interface.
    * @return <code>true</code> if there are more tokens;
    * <code>false</code> otherwise.
    * @see java.util.Enumeration
    * @see java.util.StringTokenizer#hasMoreTokens()
    public boolean hasMoreElements()
    return hasMoreTokens();
    * Returns the same value as the <code>nextToken</code> method,
    * except that its declared return value is <code>Object</code> rather than
    * <code>String</code>. It exists so that this class can implement the
    * <code>Enumeration</code> interface.
    * @return the next token in the string.
    * @exception NoSuchElementException if there are no more tokens in this
    * tokenizer's string.
    * @see java.util.Enumeration
    * @see java.util.StringTokenizer#nextToken()
    public Object nextElement()
    return nextToken();
    * Calculates the number of times that this tokenizer's
    * <code>nextToken</code> method can be called before it generates an
    * exception. The current position is not advanced.
    * @return the number of tokens remaining in the string using the current
    * delimiter set.
    * @see java.util.StringTokenizer#nextToken()
    public int countTokens()
    int count = 0;
    int currpos = currentPosition;
    while(currpos < maxPosition)
    * This is just skipDelimiters(); but it does not affect
    * currentPosition.
    while(!retTokens &&
    (currpos < maxPosition) &&
    (delimiters.indexOf(str.charAt(currpos)) >= 0))
    currpos++;
    if(currpos >= maxPosition)
    break;
    int start = currpos;
    boolean inQuotation = false;
    while((currpos < maxPosition) &&
    (delimiters.indexOf(str.charAt(currpos)) < 0 || inQuotation))
    if(str.charAt(currpos) == '"')
    inQuotation = !inQuotation;
    currpos++;
    if(retTokens && (start == currpos) &&
    (delimiters.indexOf(str.charAt(currpos)) >= 0))
    currpos++;
    count++;
    return count;
    </pre>
    RunProg.properties like this:
    Prog1=GetEnv 47838 837489 892374 839274
    Prog0=GetEnv "djkfds dfkljsd" dsklfj

  • How to make a shortcut to run my Java app in Windows?

    Hiya, Coders :-)
    I am an absolute beginner.
    I have copied a little window program from "Java 2 in easy steps".
    I run it from the command line and a little window pops up.
    I cannot find a way to start the app without the command prompt.
    How can I make a shortcut to start it?
    Julian (-_-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hiya, Coders ;-)
    As it happens, I have a game from UJ Software: "Shisen for Java".
    It has a shortcut, of course.
    Here are all its details just in case it helps ...
    The game folder is here:
    C:\Program Files\UJ Software\Shisen for Java\jShisen.jar
    Contents of the installed shortcut ...
    General:
    Type of file: Shortcut
    Opens with: Java(TM) Platform SE binary
    Location: C:\Documents and Settings\Julian Bury\Start Menu\Games
    Shortcut:
    Target Type: Executable Jar File
    Target location: Shisen for Java
    Target: "C:\Program Files\UJ Software\Shisen for Java\jShisen.jar"
    Start in: "C:\Program Files\UJ Software\Shisen for Java\"
    Run: Normal window
    I don't suppose this will help.
    It strikes me that nobody knows for certain how to run a java app!
    I have two beginner's books, neither of which mentions anything beyond the command prompt.
    Tricks to minimize the console window are just not professional!
    The solution must be written authoritatively somewhere ...
    has anyone seen it, please?
    Increasingly disturbed ...
    Julian *(-_-)*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Running multiple java apps simultaneously, each using a different jre.

    I have a situation where I have 3 or 4 applications (and one applet) that were built over time, each with a different version of the jdk (ranging from 1.2.2.005 to 1.3.2). I need to know of a way (and it must exist) to run each of these applications on the same machine, and at runtime, have each application (or applet) run with its respective version of the jre. Certainly, one could change some source code and make all programs compatible with a particular jre, but that doesn't solve my problem if a new app is built with a new version of the jdk down the road. Currently, each runs fine by themselves, but if I try to run them together as different processes, some won't do anything because the default jre may not be what it needs. Would the Java Plug-in software have a role to play in this? Is there a way to specify (link) which application should use which jre?
    P.S. These applications (right now) don't have to interact or interface in any way. I just need to have them all running as separate processes on the same machine and be able to jump from one to the other.

    However ... if you have the programs running in Java1.x, I
    wouldn't recommend to let it run under Java 1.y; atleast
    not without thorough testing.I do it all the time and have not had a problem. I'm
    currently using JDK 1.4 beta 3 and I regularly run a
    Java application written with JDK 1.1.
    It sounds like the programs you are running are
    relying on behavior that is not guaranteed. If that
    behavior changes in a later version, it can break your
    program. Program to the contracts provided by other
    classes and packages, and you should have few or no
    problems.I guess you are right. Maybe you can help me with the following problem (this is off this topic, I know): I have Swing JDK 1.2 and Swing from JDK 1.3. I have to register keys on components.
    In JDK 1.2 I can use registerKeyBoardAction, in JDK 1.3 I have to use input maps and action maps. Both solutions only work with certain JDK. What I did was writing code which detects the java version and takes the appropriate action to register the keys. To make the thing compile in 1.2, I have to use reflection for the input/action map methods, because they are only available in 1.3.
    Any idea how to solve this more elegantly ?

  • Problem running my Java apps in my LG phone. Please help!

    Hi all!!
    I am quite new to the world of J2me, altough I've been coding Java for quite a few years now.
    Recently I bought a LG u 8120 phone with Java-support so I decided it was time to step into the mobile Java-world.
    Now I have written my first small app, a simple timer application which my phone (strangely enough) does not already have.
    So what happens is this : I create my app on my PC and package it with the WTK into a jar -file and a jad-file which i transfer to the phone.
    After this I can see the name of my app in the list of available programs in the phone. But when I try to run it: Nothing. The Java logo shows up for a few seconds and then I am tossed back to the menu.
    I have thought of the following as possible problems:
    1. the 8120 does not support MIDP2.0
    2. I am doing something wrong transfering the files
    3. I have missed out on one or several necessary steps in the process
    Anyone who have developed Java apps for LG phones who can give me some hints?
    I've used the Sun J2ME Wireless Toolkit 2.2 with MIDP2.0 and CLDC1.1 .
    The apps works fine in the emulator. The problem starts when I want to run it in the phone. The phone I've tried is an LG u8120. LG apparently does not want to make life easy for its customers, so there is no support for transfering Java apps in the vendor-supplied software. I suppose that's because they want you to only download stuff from their site. However, after surfing around on some discussion forums for a while I found a program called G-thing which can be used to upload Java apps to LG-phones via USB.
    Any help is very appreciated!
    Thanks,
    Sarah

    Thanks,
    I have tried this and ruled out some of the possible causes.
    When I added some more exception handling, I could see that a "java.lang.IllegalArguenException" is thrown.
    When I ran the AudioDemo package that came with WTK2.2 I noticed that the examples that uses WAV-files do not work while the rest works fine.
    My new theory is now that the u8120 does not support the WAV-format, so I will try with an mp3 instead and see what happens.
    Anyone who knows if LG-phones support WAV-format?
    /Sarah

  • Running a java app

    To pass on a finished java application what file do I pass over. I don't create a .exe file is there a .java file or something that I just need to give to someone and what do they need to have installed to run it??

    All I have done so far is to write the java application which I can run on my machine my the usual java FirstSupport.java
    No this application has to be put into another location to test. This machine has no java or anything on it so it totally needs set up. There will be no change to the software by this machine at all.
    I have copied just the .class files.
    Eventually will there be just an executable file that we supply without having to install the java JDK etc on the machine as no change to the software will take place!!!
    I feel a bit silly asking this but it never came into my head before this and now I have no clue how to go about it

  • URGENT: How to run a Java program from a different directory?

    Hi.
    How do I run a Java program from a directory that the file is not located in? So lets say im in c:\Java. But the file is in c:\Java\abc\efg\.
    What would be the command to run the Java file from c:\Java.
    I can't remember it and I need it asap.
    Cheers.

    If the class you are trying to run is MyApp.class, try
    c:\Java\>java -cp abc\efg MyAppThe actual classpath you specify will depend on whether or not MyApp.class is in a package (I've assumed it isn't) and whether or not any 3rd party jars are involbed (I've assumed not).
    Edited by: pbrockway2 on Apr 1, 2008 6:42 PM
    The command arguments read as "Run the MyApp class using as a classpath abc\efg relative to here (c:\Java)".

  • Why the constructor of the base class calls first when u run the java app.

    why the constructor of the base class calls first when u run the java application

    For the record the other very exciting questions are:
    pls give the differences between application server and web server with examples
    will u pls narrate the differences between servlet context and servlet config.....
    where can we find servlet config...
    is there any methods to access servlet config

  • Run two java apps in separate jvm's on the same machine?

    At the command line, when you type:
    java MyClass
    and then type:
    java MyClass
    are the two programs (assuming neither terminated prior to the other's execution) is it running in a separate Java Virtual Machine or the same one?
    And if they're running in the same JVM, is there a way to run the second program in a separate JVM for testing purposes even though they're on the same computer? (btw I'm running windows XP).

    thanks all...just a quick follow up question. Are two
    separate jvm's on the same computer a good
    representation of two jvms running on separate
    computers?Don't know what you mean by "a good representation."
    They're two separate processes. For basic testing, not worrying about performance, etc., and if your code doesn't do anything special to treat two VMs on the same box differently than two VMs on separate boxes, it's probably a reasonable approximation.

  • Running multiple java-apps in single JVM?

    We have about 125 Citrix clients running on 5 Citrix Servers. We are investigating a new very big development project which will cover about 10 main projects with 15 Applications each. The complete project will be written in Java.
    Basically, each module will have it's own JVM. BUt, when each client runs a couple of modules, the servers will surely run out of memory...
    I searched for way's to run different modules within 1 single JVM but it seems to be 'not done', because of 'System.exit()', 'Static Variable' probs to name only 2.
    Any idea's on how to implement this?
    thanks.

    thanks for the reply.
    Yes, I assume the server will run out of memory.
    1) Our citrix servers are consuming about 3/4th of their 4Gb memory capacity without any java_application running.
    2) Each of our 5 Citrix servers has 25 users active
    3) Each JVM takes about 20mb memory
    4) Each user will run at least 3 app's simultaneously
    Abouve results in 3*20=60Mb / user * 25= 1,5Gb memory extra needed.
    Can you give me an example of a Thread.sleep(60000) test_pgm?
    and/or an example for a "classloader" program to launch each app in its ow sandbox (in same JVM)?
    (eventually a link to get more info on this)
    thanks

  • Running a Java app on a network

    In my vb days I wrote a program for my company. We had a server computer running Windows Server 2003 and 4 client computers. I simply copied the executable to the server and made a shortcut to it from each of the client computers. Now that I am re-writing the app with Java I would like to know the correct way to do this and I have a couple of specific questions on the matter:
    1. If I run this program the same way, will I only need a virtual machine on the server computer or will the program actually execute on the client computer?
    2. What if (and it will happen without doubt) the program is being run from all four clients at one time, will four seperate instances of my program be running? Will the JVM keep each instance seperate to prevent undesired results from another instance modifying variables etc in stored memory from another instance?
    3. If this is not going to work or this is the "dirty" way of doing this, what is the correct way to do this?
    As a note the reason I took this approach rather than just installing the app on each client is because their is a lot of text file manipulation in this app. It creates text files, writes information, then saves it to a directory for re-opening and modifying later. It was simple to set the path to the directory by just placing the directory in the same folder as the executable. I didn't know how to sync the directories containing the files so that the directories on each computer would stay alike. Otherwise client A would only have access to to text files saved on that computer, and client B would only have access to text files saved on that computer etc. And I didn't want to hard code the path into the program.
    Any thoughts/input on the matter would be greatly appreciated.
    Thanks,
    Mike

    In my vb days I wrote a program for my company. We
    had a server computer running Windows Server 2003 and
    4 client computers. I simply copied the executable to
    the server and made a shortcut to it from each of
    the client computers. Now that I am re-writing the
    app with Java I would like to know the correct way to
    do this and I have a couple of specific questions on
    the matter:the correct way is creating an executable JAR and make a shortcut from each client to it on the server. Or use Westart.
    1. If I run this program the same way, will I only
    need a virtual machine on the server computer or will
    the program actually execute on the client computer?Just like your VB stuff, this will always run on the client, so each client will need a JVM.
    2. What if (and it will happen without doubt) the
    program is being run from all four clients at one
    time, will four seperate instances of my program be
    running? One on each client, yes.

  • How to run a Java App

    Hi all you people,
    Something bothers me, since I play around with Java, which is not very long. What is the best way to run a program? Java is platform independent. That means, different platforms - differnet ways to start a program. On Windows you usually have a little Icon, the same under Linux KDE etc. Doubleclick and away you go. But what I always read in most of the Java tutorials is "Start Command, go to directory, type 'java myclass'". There must be a better way to do this?
    I am a VB programmer and if I compare the deployment tools in VB with my tools in Visual Age for Java 2.0 I must say, VB is way ahead in this area. I always say, things must be easy to use. For me that's the reason why e.g Linux isn't on most of the desktops. It is just too complicated to install. Is this the same with Java? Or is there a better way than 'java myclass' from the command line?
    Sorry the post became a bit long. And sorry if this is a dumb question. I am new to Java.
    Cheers
    Peter

    For Windows, a shortcut works. Create a shortcut that has a Target line "c:\windows\javaw.exe xxxx", and it starts a Swing app - without a DOS window appearing. The shortcut is just like any that's on the desktop.
    Bat files work as expected. When you get a little more experience look into "executable Jars" - they can be set up to start an app by clicking on them. You can also exec a non-java program from java, you can...
    Well, you get the idea.
    hth - Chuck

  • ???Exit JAVA app in Win2K LOCKS MACHINE???

    When i hit the X button in the top right to close my apps
    Win2000 Locks up completly.
    Why?
    What do i install to fix this problem?
    Im running JSDK 1.4.1_01
    win 2k
    dont know what service packs or crap is installed!
    Someone help, i need to give presentations using java on this machine!

    Uninstal the Java SDK and then reboot (do a cold boot). This will clear out all the Sun Java stuff and then delete the directory (and all the subdirectories) that used to have Java in it. After you do this, go into your systems temp directory and clear everything out. After that then reinstall the SDK. Cold boot again. Some where in your system the java install has become messed up--Windows does that from time to time (all flavors of Windows even the "NT" class of produt).

  • Running a Java App like a service in linux and not closing with window

    I know its not really a question i should ask you but thought you might have a quick answer for me, I have trying to running a small java application on one of the servers. I want it to run almost like a service, what i mean is i dont want the application to end when the terminal session is ended. So i thought i should put an entry into the /etc/rc.local file as follows (Final Line):
    cd /home/bluepoint/Teamselect_ServerApp_v1.0/bin/
    java Server
    #!/bin/sh
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.
    touch /var/lock/subsys/local
    /home/bluepoint/kmyfirewall.sh
    su - bluepoint "/usr/local/tomcat/jakarta-tomcat-5.0.28/bin/startup.sh"
    cd /home/bluepoint/startme.sh
    As you will see it call a shell script which contains only the following lines (or see attached):cd /home/bluepoint/Teamselect_ServerApp_v1.0/bin/
    java Server
    but nothing happens when i restart the server. The DB, sendmail, tomcat etc start fine but not my app.
    The application works fine if i start it in a terminal window so i know it can run.
    Any ideas what im doing wrong??
    Kind Regards

    It's probably not happening because you missed the -c from the su command. However this isn't the correct approach to daemon processes on linux (which is what you're after).
    What you need to do is to place a script in the /etc/init.d directory. This script should take a single argument and start the daemon if the argument is "start", and stop it if "stop". Check out the scripts already in there to see how it's done.
    Then go to System Settings/Server settings/Services and enable the new service for the normal run level.

Maybe you are looking for

  • CPU Usage - Generating Word Docs from RoboHelp X5

    If you have generated a fair-sized document through RoboHelp, and you are having problems with your CPU usage pegging out around 100%, bouncing up and down between 50% and 100%, the page repainting as you scroll through the document, etc., this solut

  • Referencing DLL in JApplet

    i have native elements i wish to include in one of my JApplets I've tested the DLL using a command line style program, and it connects fine. Hence I am confident the DLL itself was built properly. However, when i use an init() method instead of a mai

  • TB sees my html attachment as a text document

    I recently switched email programs from Outlook Express to Mozilla TB. In Outlook I would get a daily email report with an html attachment. I would double click the attachment and it would open in the web browser. Now, however, TB sees the attachment

  • IPhoto will not print

    IPhoto will not print at all and just hangs up. I can not even force quit it. I have two printers connected a HP envy 5532 and a Brother HL-2130 and both work fine with all other programmes.

  • Fit vs. Fill

    When using a Lightbox slideshow there are options for Fit Content or Fill Frame. They both seem to result in the same display. I'd like the lighbox to show vertical images vertical and horizontal images horizontal. When option does that? Bob