Pre mature termination of Java Program (Servlet)

Hi,
Any One can help me for the above subject
i have my application on java servlets/JDBC on linux (red hat 6.2)
with Oracle 8i 8.1.6 we we fire a application which invloves some big table (10) and millions of row after 30 to 35 minutes my java application dies pre maturly.
i have 250 MB SGA and java settings in init.ora are as
java_pool_size = 50M #20971520
java_max_sessionspace_size = 90000000
java_soft_sessionspace_limit = 90000000

You use the java in the DB?
We makes DB connection thru java class.
What kind of Class do you use for Insert?
Class.forName("oracle.jdbc.driver.OracleDriver")
Do you use PreparedStatemend with addBatch over all Rows or do you set commit after every rows?
Yes we are using PreparedStatemend and committing after each row.
Do you get an exception?
No we do not get any exception.

Similar Messages

  • Abnormal Termination of Java programs caused by windows games

    I tried to find something in the foruns and newsgroups but no luck.
    Whenever I open windows games like Broodwar/Starcraft and
    Counter-Strike and close them, my Java apps disapear.
    My apps are an IRC client and jEdit.
    Do you know why and how to solve it ?
    Thanks very much :-)
    Windows 2000
    JSDK 1.4 final

    Update the video driver, then look at the command files/batch files used (if any) by the games for setup/tear-down stuff.
    It is possible for a game to cuase any/all/certain dos-programs (Java's JVM uses Command.com) to exit, by cuasing the command interpreture (command.com) to exit and go back to windows explorer shell.
    Hope that helps.

  • Terminating a java program

    Hello,
    I'm currently making a NIO-based server, but - this can sound like a dumb question - for example, when there happens an Exeception I want that the whole server shut down, so nothing is existing anymore.
    It's like in Eclipse pressing on the <Terminate Button>
    So i was thinking of using when a Exeception occur creating a new class which do the following :
    System.gc(); //collect
    System.runFinalization(); //finialize
    new NIOServer(); //starts up the server again
    but do they really remove all the exisiting java objects etc ? Or do i have todo more things ? like setting things to null or w/e ?
    Ok, so i found out that you can do System.exit(0); and that's the way togo i guess
    BUT when i call that, it closes all and do cleanup, BUT how can i restart the program?
    Thanks in advance!
    Edited by: Kolarius on Jul 20, 2009 4:51 AM
    Edited by: Kolarius on Jul 20, 2009 4:51 AM

    Kolarius wrote:
    Hello,
    >
    but do they really remove all the exisiting java objects etc ? Or do i have todo more things ? like setting things to null or w/e ?Why does it matter? If all your state information is inside a class instance and you replace the class instance it will all be eligible for garbage collection, and the space will be reused if needed.
    This isn't going to release any static references, of course.
    Trust the garbage collector, don't try to force things.
    However if you have external resources like files open, then you should close them explicitly. Structure your program so that you open these resources in a try - finally block with code to close the resource in the finally clause, so that even if there's an exception thrown the resource gets closed.
    This is the kind of thing:
    FileOutputStream fos = null;
    try {
        fos = new FileOutputStream(...);
        ... writes some stuff
      } finally {
        try {
           if(fos != null)
             fos.close();
        catch(IOExcpeption ex) {
          log.error("IO Error closing file", ex);
      }>
    Ok, so i found out that you can do System.exit(0); and that's the way togo i guess
    BUT when i call that, it closes all and do cleanup, BUT how can i restart the program?
    Well, you could always put the invocation of the java command in a loop in a batch file. The program could generate an exit code which told the batch file "run me again".
    But bouncing the JVM is probably a little drastic.

  • Error while running Java program which call a file upload servlet

    Hi all,
    I have a java program which calls a servlet and sends the file to be uploaded by the servlet. I used Jbuilder to create java program and servlet program. I compiled both the programs and compilation suceeded and my class files are avaialbe in
    WEB-INF/classes/content directory. But now I am trying to run the Java program(this contains main method) from the command prompt, which should inturn call my servlet.(I have web.xml file inside WEB-INF dir). But I receive the following error
    C:\tomcat5.5.15\apache-tomcat-5.5.16\webapps\content\WEB-INF\classes\content>java MultiContentSender
    Exception in thread "main" java.lang.NoClassDefFoundError: MultiContentSender (w
    rong name: content/MultiContentSender)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    My dir strcture is as below
    TOMCAT_HOME/webapps/content/WEB-INF/classes/content/*.class
    I am not able to figure out the error, can anyone throw some light on this issue.

    You are trying to invoke the class from the command prompt. My guess is that MultiContentSender contains a package, which means that you'll need to add your WEB-INF\classes directory to the classpath before it will work. Classes stored in this directory are expected to be invoked through tomcat, which builds it's own classpath.

  • How to send a file from a java program to a servlet and get a response

    Hi,
    How can I call a servlet from a standalone java program and send a file to a servlet using POST method and in return gets the status back from the servlet. Any help is appreciated any small sample will help.
    Thanks.

    Hi,
    I am trying the following sample I got from net and am getting the following error. Any help what I am doing wrongs:
    06/12/24 02:15:58 org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
    06/12/24 02:15:58      at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:294)
    06/12/24 02:15:58      at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
    06/12/24 02:15:58      at mypackage9.Servlet1.doPost(Servlet1.java:38)
    06/12/24 02:15:58      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    06/12/24 02:15:58      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    06/12/24 02:15:58      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    06/12/24 02:15:58      at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    06/12/24 02:15:58      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
    06/12/24 02:15:58      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    06/12/24 02:15:58      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    06/12/24 02:15:58      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
    06/12/24 02:15:58      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
    06/12/24 02:15:58      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    06/12/24 02:15:58      at java.lang.Thread.run(Thread.java:534)Here is the sample client code:
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.methods.PostMethod;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    public class PostAFile {
        private static String url =
             "http://192.168.0.17:8988/Vulcan_Materials-ServletPost2-context-root/servlet/Servlet1";
        public static void main(String[] args) throws IOException {
            HttpClient client = new HttpClient();
            PostMethod postMethod = new PostMethod(url);
            client.setConnectionTimeout(8000);
            File f = new File("C:\\load.txt");
            System.out.println("File Length = " + f.length());
            postMethod.setRequestBody(new FileInputStream(f));
            int statusCode1 = client.executeMethod(postMethod);
            System.out.println("statusLine>>>" + postMethod.getStatusLine());
            postMethod.releaseConnection();
    }Here is the sample servlet code:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import org.apache.commons.fileupload.DiskFileUpload;
    import org.apache.commons.fileupload.FileItem;
    import java.util.List;
    import java.util.Iterator;
    import java.io.File;
    public class Servlet1 extends HttpServlet
      private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
      public void init(ServletConfig config) throws ServletException
        super.init(config);
      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        try
          response.setContentType(CONTENT_TYPE);
          PrintWriter out = response.getWriter();
          java.util.Enumeration e= request.getHeaderNames();
            while (e.hasMoreElements()) {
              String headerName=(String)e.nextElement();
              System.out.println(headerName +" = "+request.getHeader(headerName));
           //System.out.println("Content Type ="+request.getContentType());
            DiskFileUpload fu = new DiskFileUpload();
            // If file size exceeds, a FileUploadException will be thrown
            fu.setSizeMax(1000000);
            List fileItems = fu.parseRequest(request);
            Iterator itr = fileItems.iterator();
    System.out.println("***************************");
            while(itr.hasNext()) {
              FileItem fi = (FileItem)itr.next();
              //Check if not form field so as to only handle the file inputs
              //else condition handles the submit button input
              if(!fi.isFormField())
                System.out.println("\nNAME: "+fi.getName());
                System.out.println("SIZE: "+fi.getSize());
                //System.out.println(fi.getOutputStream().toString());
                File fNew= new File("C:\\", fi.getName());
                System.out.println(fNew.getAbsolutePath());
                fi.write(fNew);
              else
                System.out.println("Field ="+fi.getFieldName());
            out.println("SUCCESS123456: ");
          out.close();
        catch(Exception e)
          e.printStackTrace();
    }Any help on what is wrong.
    Thanks

  • Keep getting error message when trying out a small java program in terminal

    I've been trying out running java programs in mac os x terminal. I have eclipse as well, but it's too much for me right now. I copied some programs out of the dummies book I have, just to get a feel for things -- so, I went to the desktop where the program was, and compiled it (I saved it with a .java extension). "javac javaprogram.java" to compile, which it did fine, and then 'java javaprogram' to execute it. It's just a simple line that says 'you'll love java!'. Anyway, it wouldn't execute it.
    Here's the program (written in text edit):
    class Displayer {
         public static void main (String args []) {
              System.out.println ("You'll love Java!");
    I got these messages:
    Exception in thread "main" java.lang.NoClassDefFoundError: javaprogram
    Caused by: java.lang.ClassNotFoundException: javaprogram
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    Now, I noticed that the first part of the error is "java.lang.NoClassDefFoundError: javaprogram". When I tried to run the program, it 'created' or put something on the desktop called Displayer.class, so I'm not sure what's going on. I've compared what I entered to what's in the book, and there are no mistakes on my part.
    Can anyone tell me what I'm doing wrong, and is there any book or site I can go to which will instruct me on running programs in terminal?

    For starters, rename javaprogram.java to Displayer.java and dojavac Displayer.java
    java Displayerand since you are new to Java, change your source code to public class Displayer.
    In Java, files containing a Java class named "ClassName" should/have to be named "ClassName.java".

  • How can I execute a java program from a Servlet?

    Thank You
    [email protected]

    You could call it via Runtime.exec(), just as you would from any Java program. Or better, you could redesign it as a proper Java class. Then your servlet could create an instance of the class and call its methods as necessary.

  • Communication between servlet(client behavior) and stand alone java program

    Hello all:
    I need to send a message (ascii characters sequence) from a servlet to a java program, but I'm not sure what is the best way to get it: socket, JMS or other mechanism that I don't know.
    Is the servlet who is operating how client behavior.
    Please, any comment will be appreciated, regards,
    Ulises.

    You can always start a ServerSocket on the client (kinda sounds funny, doesn't it) which will accept connections. You then open a plain old Socket on the server to connect to the client's listener. (Note, this is the reverse of a normal set-up). Once you have the connection established, you will call getOutputStream() to get a stream to write to. Likewise, you will call getInputStream() to read the data sent. You will want to investigate the java.net.* and java.io.* libraries.
    - Saish

  • Calling servlet from a java program

    Hi
    I need to call a servlet's doPost() method from a java program. I have a specific situation, where I need to call servlet from a java program. DUring this call I need to pass a file and two string to the servlet. Servelt after receiving the file and string uploads the file to the server at a specified location. I am stuck up as how to call servlet from a java program instead of a HTML or JSP.
    Can anyone help me to start with this.
    any suggestion is welcome.

    You have to establish a URLConnection with servlet from your java program.
    URL servletURL = new URL("http://localhost:8080/Myservlet?str1=abc&str2=def");
    URLConnection servletConnection = servletURL.openConnection();you can get the objectOutputStream
    ObjectOutputStream oos = new ObjectOutputStream (servletConnection.getOutputStream());
    oos.writeObject(your file object);-------------------------------------------------
    In the servlet u can get the strings using request.getParameter("str1");
    In the servlet u can get the strings using request.getParameter("str2");
    file = new ObjectInputStream (request.getInputStream()).readObject()a lot of resources are available on this ...
    hope this helps :)

  • Java program shuts down when I close Terminal.

    I use following:
    Java: 1.3.1_01
    Platform: Solaris
    Shell: bourn
    I've a java program in which, I've implemented shutdown hooks (Runtime.addshutdownhook()) for proper shut down of my application.
    I've a shell script to start & stop this application.
    Now, if I use bourn shell to start this app, when I close the terminal window, the program also shuts down.
    I tried using 'nohup' command but its not working. I also tried starting it in background by appending '&'. It is not working either.
    Can someone pls give me solution?
    - Samir

    I don't think there is a solution to your problem (other than not to close the terminal window) because according to the documentation:
    addShutdownHook
    public void addShutdownHook(Thread hook)
    Registers a new virtual-machine shutdown hook.
    The Java virtual machine shuts down in response to two kinds of events:
    1) The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit) method is invoked, or
    2) The virtual machine is terminated in response to a user interrupt, such as typing ^C, or a system-wide event, such as user logoff or system shutdown.
    The behavior you described is consistent with what I see on my Windows 98SE.
    V.V.

  • Displaying japanese chars using servlet (posted in Java programming too)

    I am trying to display the japanese characters inputed by the user using
    html form and I am using servlet...
    After reading the input and when i try to display i get ????
    how can i solve this.
    It was originally posted in Java Programming forum. but i think the question suits here....heres the link for original post
    http://forum.java.sun.com/thread.jspa?threadID=670419&tstart=0
    sorry for posts at two different forums

    After reading the input and when i try to displayDisplay on what?
    Usually, if request.getCharacterEncoding() doesn't return viable result, then you should call
    request.setCharacterEncoding() with a proper value. If user send Shift_JIS string as form
    input, then the argument value should be also "Shift_JIS". When in doubt, use "UTF-8".
    Then, you call response.setContentType("text/html; charset="Shift_JIS"), etc.

  • Coherence Help standalone java program put data in cache & Servlet to Read

    Hi,
    I have coherence 3.4 and using Oracle Application Server 10.1.3 We are in the process of developing a Web Application and want to use Coherence for caching the data. My Coherence is also installed on the same box as Oracle Application Server 10.1.3 need some help in storing the data in the coherence and reading it through the servlet. We have standalone java program that needs to put data in the cache and through servlet want to read that and display it on the page. When running the client the data is stored in the cache but when reading it through the servlet it returns null. We have included both coherence.jar and tangosol.jar in the war file and also in the path when running the standalone java program. Started the Coherence using the below command:
    C:\oracle\coherence\lib>java -cp coherence.jar -Dtangosol.coherence.cacheconfig=C:/oracle/coherence/tests/cache-config.xml com.tangosol.net.DefaultCacheServer
    here is the sample config file used when starting the server above:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
        <caching-scheme-mapping>
            <cache-mapping>
                <cache-name>VirtualCache</cache-name>
                <scheme-name>default-distributed</scheme-name>
            </cache-mapping>
        </caching-scheme-mapping>
        <caching-schemes>
            <!--
            Default Distributed caching scheme.
            -->
            <distributed-scheme>
                <scheme-name>default-distributed</scheme-name>
                <service-name>DistributedCache</service-name>
                <backing-map-scheme>
                    <class-scheme>
                        <scheme-ref>default-backing-map</scheme-ref>
                    </class-scheme>
                </backing-map-scheme>
            </distributed-scheme>
      <class-scheme>
                <scheme-name>default-backing-map</scheme-name>
                <class-name>com.tangosol.util.SafeHashMap</class-name>
                </class-scheme>
    </caching-schemes>
    </cache-config>And here is the standalone java program to put the data in the cache:
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    public class PutCache {
        public PutCache() {
        public static void main(String[] args) {
            PutCache putCache = new PutCache();
            NamedCache         cache = CacheFactory.getCache("VirtualCache");
            String key = "hello";
            cache.put(key, "Hello Cache123123");
    }And here is the Servlet code to read the data but it somehow returns null
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet1 extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
            NamedCache         cache = CacheFactory.getCache("VirtualCache");
            String value = (String)cache.get("hello");
            out.println("<html>");
            out.println("<head><title>Servlet1</title></head>");
            out.println("<body>");
            out.println("<p>The servlet has received a GET. This is the reply.</p>"+value);
            out.println("</body></html>");
            out.close();
    }Is there any other configuration I need. Any help is really appreciated.
    Thanks

    Hi,
    While starting the coherence using
    C:\oracle\coherence\lib>java -cp coherence.jar -Dtangosol.coherence.cacheconfig=C:/oracle/coherence/tests/cache-config.xml com.tangosol.net.DefaultCacheServer
    while running standaone jave program using the below command
    java -Dtangosol.coherence.cacheconfig=C:/oracle/coherence/tests/cache-config.xml Populatecache
    In the Web Application don't have any reference to cache-config.xml just using the coherence.jar & tangosol.jar.
    What are the steps or configurations I need in order to connect to the same Coherence Cache. Do I need to provide some host:port for the Coherence for storing the data in the cache. How does the java client program and Web Application knows to connect to the Coherence. As currently even if I don't start the coherence server and just run the java standalone program it goes and executes fine wondering wher exactly does it persists the cache if coherence itself is not started or just adding the jars is enough. Any help is appreciated.
    Thanks

  • Calling a servlet from a java program

    I could not find a forum for servlet hence am posting
    here
    I have a servlet that accepts prameters and
    gives some out put .
    I want to be able to call this servlet ( invoke )
    from a Java Program .
    How do i do that ..
    Any sample code /pointer would be appreciated.
    Deepa

    hi
    you can try this code.
    URL url = new URL("http://localhost:8888/yourServlet?param1=value1");
    URLConnection con = url.openConnection();
    StringBuffer sBuf = new StringBuffer();
    BufferedReader bReader = new BufferedReader(
    new InputStreamReader(
    con.getInputStream()));
    String line = null;
    while((line = bReader.readLine()) != null) {
    sBuf.append(line);
    System.out.println(sBuf);
    hope this helps
    Shrini

  • Vim and Eclim (Java): Run Java program in embedded terminal window

    Hello all,
    I'm trying to create a decent Vim setup for Java programming. I've installed Eclim, and it works alright. However, one annoyance I have is the way that Eclim runs Java programs. When run (via the :Java command in Vim), a Java program runs in a new shell instance pretty independent from Vim, and then when the program terminates (and Enter is pressed), the output is put into a new buffer at the bottom of the Vim window with the output.
    The problem with this is that I must press Enter to go back to Vim after the program terminates, and then the output buffer is automatically selected even though I most likely do not care to copy any of the output.
    So, this is what I would like to happen:
    - I run my Java program somehow (doesn't have to be with :Java)
    - A buffer containing the running program in a shell is put on the screen (if not already there)
    - The program terminates, and the focus did not change to the output buffer
    At the very least, I want the focus to not change to the output buffer after the program is done running.
    Any ways to at least somewhat accomplish what I'm trying to  get at?

    Trent wrote:
    Yeah? I had AP CS when they first introduced the GridWorld case study. I hope you get more out of the class than I did.
    I have never used Java except for that and my first CS class at university. I eventually realized that software (as a job) wasn't for me and took a route closer to EE. I still fight to avoid being called a programmer though
    I like the idea of programming for a job, not necessarily "software development", something computer science-y sound good to me.
    But anyway, to end on an on-topic note, I embedded gvim inside Eclipse as described here.

  • Java Program destroys Linux Server Display or Server logs out Automatically

    hi,
    i am facing problem when my servlet program is running.
    my servlet starts a process at server which is a simple java program which publishes PDF,
    XML, RTF files and lates long to run for about 45 minutes.
    i give a call to a shell file on the server (Red Hat Linux 9.0) which in turns calls a java
    program that runs on gnome-terminal.
    i have started Tomcat from SSh for that i have exported DISPLAY (Environment variable) from
    .bash_profile. i need to do this because i need graphics environment (X11 Windows) for jfor
    which is used print jpeg images in PDF and RTF reports.
    PROBLEM
    Some time my server display gets destroyed or the server gets Logout automatically, when my
    process is running.
    following is sode to start a gnome-terminal
    strCommand="gnome-terminal -x /root/PWAppSh/StartPartialRunOff.sh PartialRunOffApp "+
    strpubType + " "  +  strGroupNumber +" "+ id + " " + Cur_Time+" "+ strPubDate +" "+
    strFromDate +" "+ strToDate ;
    p = rt.getRuntime().exec(strCommand);
    BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(strRootPath
    + "/pw/WEB-INF/classes/pid.txt")));
                             pid= "";
                             while((pid = br.readLine()) != null)
                                  getPid=pid;
                             ses.setAttribute("process",getPid);
                             ses.setAttribute("RunType",strrunType);
                             System.out.println("#Get Process ID:"+getPid);
                             FileOutputStream fos = new
    FileOutputStream(strRootPath+"/pw/System/Mgmt/Sessions/RunoffOutput.txt");
                             Stdout_Stderr errorGobbler = new
                                  Stdout_Stderr(p.getErrorStream(), "ERROR");
                             // any output?
                             Stdout_Stderr outputGobbler = new
                                  Stdout_Stderr(p.getInputStream(), "OUTPUT",
    fos);
                             // kick them off
                             errorGobbler.start();
                             outputGobbler.start();
                             // any error???
                             int exitVal = p.waitFor();
                             System.out.println("StartRunoff ExitValue: " +
    exitVal);shell script that get executed from servlet is as followes
    cd /
    cd /share/Tomcat-4/jakarta-tomcat-4.1.31/webapps/pw/WEB-INF/classes
         echo $$ > pid.txt
         echo "Path: `pwd`"
         echo "Process ID:" $$
         chmod 777 pid.txt
         echo Redirecting ProcessID
         echo "Current shell : " $SHELL   
         export
    PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.2_08/bin:/usr/java/j2sdk1.4.2_08/lib:.:/share/amol/l
    ib/.:
         export
    CLASSPATH=.:/share/amol/lib/activation-1.0.1.jar:/share/amol/lib/ant.jar:/share/amol/lib/ava
    lon-framework-cvs-20020806.jar:/share/amol/lib/batik.jar:/share/amol/lib/fop.jar:/share/amol
    /lib/jfor-0.7.2rc1.jar:/share/amol/lib/xalan-2.4.1.jar:/share/amol/lib/mail-1.2.jar:/share/a
    mol/lib/xerces-1.2.3.jar:/share/amol/lib/jimi-1.0.jar:/share/amol/lib/logkit-1.0.1.jar:/shar
    e/amol/lib/firebirdsql-full.jar:/share/amol/lib/xercesImpl-2.2.1.jar
         exec java -server -Xmx256m -Xoss200M PW/Runoff/$1 $2 $3 $4 $5 $6 $7setting that i have done in .bash_profile file
    DISPLAY=$HOST:0
    export DISPLAY HOSTcan any one suggest or any solution to problem why my linux server Logsout ar display gets
    destroyed when my Program is runnig on Gnome terminal.
    kindly help me,
    Thanks in advance for ur most important suggestion or solution.

    Sounds a lot like a bug in some of the native libraries you use (or even in AWT). Try looking into your log files (especially for X and for your tomcat) to find out if any error messages are printed.
    Additionally there are X servers out there that don't need any concrete display hardware to run (Xvfb comes to my mind, but IIRC there are more modern alternatives available). Usign that might or might not solve your problem, but would be a good idea either way.

Maybe you are looking for