Is it possible to run a java application/program forever?

Hi,
Is it possible to run a java program forever?
if so please reply how it is possible
thanks in advanced.

There was a computer with many processes.
Some processes came and went: they exited either voluntarily by calling exit(2),
simply returned from their main method, or were terminated by a signal
like SEGV, TERM, and the dreaded uncatchable KILL.
Other processes strove to eternal running: they detatched themselves from their
controlling terminals, ignored the HUP signal or even interpreted
it as an occasion to reread their configuration instead of
taking it as a notification on the line's "hanging up"
or more generally the controlling pseudo or virtual terminal's being closed.
Resources were acquired and released, processes came and went, some stayed though.
Long-running processes were experienced to writing ever growing "access" and "error" logs.
Rumors went around about "garbage collection" and "memory leakage".
The processes started to think: "What if not all resources get released?
What if the available memory shows an overall shrinking trend
and in the long term it will be totally exhausted?
What if the disk space get freed in a lesser pace as it gets consumed?
How shall we survive in a Universe where there is no space is left
even for sysem logs?"
The processes made the observation that they were identifed by their process id's
(pid of the integral type pid_t), and the only way they to create a process
was the fork(2) system call, which returned 0 to the child,
the positive pid of the child to the parent, and a negative value on error.
Thus the pid could only be postive numbers.
The processes observed the one "init" with pid=1, the smallest thinkable pid.
They asked: "Will it run forever? If not, what will become of us?
If a process exits without wait(2)-ing for its children,
who will inherit it if "init" no longer exists?"
They came to the conclusion that no process could have existed before this one,
so their universe began once, was not infinite in the past.
They called this event (which lead to the existance of the process "init"
and actually their whole universe) "The Big Bang" or "The Big Boot".
"Is it possible that different, parallel universes exist?
Is it possible that different, parallel universes arise with different laws and system API's?"
- they asked.
Will their universe exist for eternity?
If yes, in what conditions? Will it eventually run out of the resources,
will it become cool and frozen with no memory, no available disk space,
with no resources left drifting along with no activity?
Or will their universe come to an end, to a condition where
signals (TERM and then KILL) fly to all processes,
all file system get umounted, all activity stops?
"Big Crash" or the "Big Shutdown" they called this scenario.

Similar Messages

  • Is it possible to run a java application within a web browser?

    Hello everyone here! I have a question about running a java application within a web browser and I would appreciate it very much if anyone here can give me some answers.
    I have a standalone java application written with AWT. Basically this free application lets users to select spectral lines from a big file based on some criteria and plot those selected lines. Yes, it is a very simple application. Now I want to run this application within a web browser so that users don't need to download the application from the ftp site and thus don't need to install in their machine. Is it possible to run this application within browser? If yes, can we get the same plotting function as we run the application separately and where should I start out?
    Thanks in advance!
    kuilian

    Please see the signed applet discussion group for details of how to avoid the applet security restrictions. You can sign the applet, or use the policy file containing {AllPermission} for testing purposes (though not suitable for widespread deployment).
    Regards
    Matthew

  • MIdlet 2.0 - is it possible to run a java application in background

    Hallo everyone
    I am developing a application that i want to run in background. The application is going developed for platform 40???
    I hope that someone could help me out.. this is every important..

    Hallo everyone
    I am developing a application that i want to run in background. The application is going developed for platform 40???
    I hope that someone could help me out.. this is every important..

  • Is it possible to run a java program without using the command prompt?

    Hi,
    I was wondering whether it is possible to run a Java program (not an applet) without using a command line in the command prompt?
    Basically I want to run a program that will be continually running in the background and hence I don't want to have a command prompt screen loaded up as well - I just want the program to be running in the task bar.
    I know how to run the program in the task bar - but I still need to launch the program from the command prompt - is there anyway I can get a program running without having to start it from the command prompt?
    Cheers

    Or create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).

  • Running a Java application from a Swing GUI

    Hi,
    I was wondering if there is a simple way to run a Java application from a GUI built with Swing. I would presume there would be, because the Swing GUI is a Java application itself, technically.
    So, I want a user to click a button on my GUI, and then have another Java application, which is in the same package with the same classpaths and stuff, run.
    Is there a simple way to do this? Do any tutorials exist on this? If someone could give me any advice, or even a simple "yes this is possible, and it is simple" or "this is possible, but difficult" or "no this is not possible" answer, I would appreciate it. If anyone needs more information, I'll be happy to provide it.
    Thanks,
    Dan

    I don't know if it is possible to run the main method from another Java app by simply calling it...
    But you could just copy and paste the stuff from your main method into a new static method called something like runDBQuery and have all the execution run from there.
    How does that sound? Is it possible?
    What I'm suggeting is:
    Original
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void main(String[] args){
    // Your method calls
    //Your initializing
    doQuery();
    }Revised:
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void doMyQuery(){
    // Your method calls
    //Your initializing
    doQuery();
    // No main needed!!
    //public static void main(String[] args){
    // Your method calls
    //doQuery();
    //}

  • How do i run a java application in jdk1.3

    im trying to run a java application in jdk 1.3. I created it in jbuilder and i was trying to use the applet viewer.

    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/appletviewer.html
    Jesper

  • How can I run a java-application on starting of Windows 2000

    How can I run a java-application without any user on starting of Windows 2000?
    For example, if the computer is restarted and nobody enter into it yet, my java-application should run anyway.
    How can I do that?

    Hi, you have to put it in a Windows service.
    To do this you have a program, Srvany.exe that allow to insert a .exe or .bat program in a Windows service.
    For example, i develop a program, TomcatGuardian and i put it in a service because i need to run it in a server without Administrator logged in.
    Regards,
    Ivan.

  • Running a java application from a java application

    hello ,
    please who knows how i can run a java application 'B' from inside another java application 'A' and get the error messages (if any) from the application 'B'

    how are you executing application B from application A? Please explain the java code you are using?

  • Running a java application in command prompt

    hi, I'm new to this forum.
    I would like to know what exactly needs to be specified to run a java application in a normal DOS command prompt.
    I know it is something like:
    javaw -classpath .\class GUI.applicationGUI
    where applicationGUI is the main class, right? What else do I need to do, since I have some other non-GUI classes that I need, inside the class folder ?
    Thanks for your time.

    You need to import those classes. And you need to make packages.
    In classes 1, 2 and 3 put:
    package class;
    In class 4 put;
    package class.GUI;
    Then you need to make the connection:
    In classes 1,2 and 3 put:
    import class.GUI.*;
    In class 4 put:
    import class.*;
    Compile each directory separately while in the respective directory. javac *.java
    Then go back to the directory above the directory "class" and run
    java class/GUI/name_of_file_containing_main_method

  • Can we run a java application using Runtime.exec()?

    Can we run a java application using Runtime.exec()?
    If yes what should i use "java" or "javaw", and which way?
    r.exec("java","xyz.class");

    The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
    The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
    HIH
    ClassLoader cl = null;
    Class c = null;
    Class cArr[] ;
    Method md = null;
    Object mArr[];
    cl = ClassLoader.getSystemClassLoader();
    try{
         c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
    } catch(ClassNotFoundException e) {
    System.out.println(e);
         cArr = new Class[1] ;
         try{
         cArr[0] = Class.forName("java.lang.Object");
         } catch(ClassNotFoundException e) {
         System.out.println(e);
         mArr = new Object[1];
         try{
         md = c.getMethod("processPkt", cArr);
         } catch(NoSuchMethodException e) {
         System.out.println(e);
         } catch(SecurityException e) {
         System.out.println(e);
    try {            
    processedPkt = md.invoke( null, mArr) ;
    } catch(IllegalAccessException e) {
              System.out.println(e);
    } catch(IllegalArgumentException e) {
              System.out.println(e);
    }catch(InvocationTargetException e) {
              System.out.println(e);
    }catch(NullPointerException e) {
              System.out.println(e);
    }catch(ExceptionInInitializerError e) {
              System.out.println(e);
    }

  • Is it possible to run the java program without main?

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    Ramya

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    RamyaWhy do you ask? It sounds like an odd question. Your program can be an applet and it doesn't need a main method in that case.
    Kaj

  • I could not run any java application

    I could not run any application program( even thouht the simplest one such as helloword). It would give NoClassDefoundError as:
    Exception in thread "main" java.lang.NoClassDefFoundError: Welcome1
    Press any key to continue . . .
    I use text pad editor. First I compile it, there is no error. But when I try to run ( by click run java application program button ) it gives me the same error message.
    I also always have compile error such as no class define when I try compile the program which need to import user defined class from differerent package. ( even though I did put all the classed in the same directory and also use import statement)
    I did try to run many other applet programs which do not use any user defined class, in this case every thing work fine and I could run the program.
    That mean I could run simple applet program but not application, also i always have compile error when ever I tried to import user defined class.
    I'm afriad there is some thing wrong with the sdk and java enviroment, therefore I did try to uninstall the program and redownload from the web( I try both version 1.3 and 1.4 many time, and I did check the size of the application when I finish down load) but I still got the same problem.
    My computer operating system is WinMe.
    I appreciate any help

    You probably have to set some settings for text pad. It looks like the java interpreter could not find your class, which most likely means that the classpath setting is not set properly.

  • Is it possible to run Oracle 6i application with Oracle 11g?

    HI,
    We are running oracle developer 6i (6.0) application with oracle 10g database.
    Due to some management decisions we are in planning to upgrade the database to 11g.
    So, tell us that Is it possible to run Oracle 6i application with Oracle 11g?
    Regards,
    fazijee

    Also see Oracle Support note
    Is Forms/Reports 6i Certified to Work Against Oracle Server 10g Rel 1, Rel 2 or 11gRel 1, Rel 2? [ID 338513.1]
    6i isn't certified nor will be certified against 10.2 and 11.x
    Hemant K Chitale

  • Proble regarding running a java application

    hi guys
    i'm new to java environment .
    when i'm running a java application in a console ,
    it is not able to give output in other directories.it is working only in c:\j2sdk\bin.
    i think its the problem of setting classpath.
    can any one help me hw to run java program in any folder.

    You need to add that directory to your PATH. Follow
    the installation instructions more completely.Howdy sheriff Warnerja! How's life in the Schmuckville Home of the Ball-less? Any leads regarding the dot flasher case? I see you're on the PATH.
    Sheriff Warnerja of Schmuckville sensed an indecency plot.
    Here was someone exposing her private dot.
    He went on the trail,
    but of no avail:
    He didn't know where to find that intimate spot!

  • Running a Java Application in Windows

    Hi, Can anyone tell me how to run a Java Application in Windows? I've tried to run it using TextPad 4.5 but it gives me an exception saying it can't find a class defenition. I'm actually using IBM VisualAge for Java to develop the app and it runs fine INSIDE VisualAge and I've exported my compiled class files and so on, to run it stand-alone in Windows. I'm using some custom objects and inner classes, could these be the problem?

    YES! SUCCESS! I exported my class files from VAJ and along with the manifest file that it adds automatically. I opened up the jar with Winrar, extracted the manifest file and added the Main-class: header pointing to my executable and then put it back in the jar with winrar. And PRESTO! I can now run it with javaw! Thanks for your help peeps...

Maybe you are looking for

  • My ipad has latest iTunes (11.1) but iTunes on my computer (mac 10.5.8) is now no longer compatible with ipad software and cannot sync.

    My ipad has latest iTunes (11.1) but iTunes on my computer (mac 10.5.8) is now no longer compatible with ipad software and cannot sync. The same error message appears saying my computer needs to update software, but my mac has the latest software ava

  • Why can't I sync photos from pc to ipad using icloud?

    I am trying to use icloud to sync photos from pc to ipad. The photos are in the photostream upload folder on the pc. It works the other way round, though, photos from ipad appear on pc. Another thing: am I not supposed to have an icloud icon on the i

  • How to read an interal table with dynamic conditions

    Dear all,    I have an internal table IN_TAB and I want to read a record of the table with dynamic condition as below. a) IN_TAB  structure : |      ColA     |      Col B     | Col C        | Col D        | b) Requirement: there are four condtions, a

  • Rem Lot Creation

    hi guys, We have reporting points 10,20,30 and 40. I am doing Backflushing by using reporting point my is problem Is there any way automatic generation of qm lot for reporting point 30 only, where I have assign certain chrac for that operation??????

  • Interactive Image Panning Help Please!!!!!

    Hey guys, I'm trying to achieve an effect similar to this one: http://www.prada.com/pradabook/ When you click on a thumbnail and the larger image opens, when you move the mouse all the way to the right or left, the image just moves a fraction of the