File: java1.java

package info (click to toggle)
dmtcp 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,496 kB
  • sloc: cpp: 33,592; ansic: 28,099; sh: 6,735; makefile: 1,950; perl: 1,690; python: 1,241; asm: 138; java: 13
file content (23 lines) | stat: -rw-r--r-- 869 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Usage:  javac HelloWorldApp.java;
//         export CLASSPATH=<THIS_DIR>; java HelloWorldApp
// Note:  Sun/Oracle Java claims a huge amount of virtual memory
//   (mostly zero-mapped) for its object heap if not told otherwise.
// For DMTCP 1.2.3, call while setting maximum memory:
//   java -Xmx512M HelloWorldApp
// In the future, we will extend DMTCP to recognize zero-mapped memory
//   and to efficiently save and restore the zero-mapped pages,
//   using such techniques as /proc/*/smap and /proc/*/pagemap.

class java1 {
    public static void main(String argv[]){
        int iter = 0;
        System.out.println("Hello World!"); //Display the string.
	while (true) {
          iter++;
	  try{
	    Thread.currentThread().sleep(250);
	  } catch(InterruptedException ie) {}
          System.out.println("Hello World (continuing: " + iter + ").");
	}
    }
}