SHARE
TWEET

Untitled

a guest Mar 19th, 2013 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bash-4.2$ cat HelloCWorlds.java
  2. class HelloCWorlds{static{char[]a=HelloCWorlds.class.getName().toCharArray();int
  3. x=a.length,y=a[--x]%x;a[y]/=x/y;a[x]=a[y]--;System.out.print(a);}}
  4.  
  5. bash-4.2$ javac HelloCWorlds.java      
  6.  
  7. bash-4.2$ java -version    
  8. java version "1.7.0_09"
  9. OpenJDK Runtime Environment (IcedTea7 2.3.3) (build 7-6-i686)
  10. OpenJDK Server VM (build 23.2-b09, mixed mode)
  11.  
  12. bash-4.2$ java HelloCWorlds
  13. Error: Main method not found in class HelloCWorlds, please define the main method as:
  14.    public static void main(String[] args)
  15.  
  16. bash-4.2$ java HelloCWorlds 2>/dev/null
  17.  
  18. bash-4.2$ /usr/lib/java/jre/bin/java -version
  19. java version "1.6.0_26"
  20. Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
  21. Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
  22.  
  23. bash-4.2$ /usr/lib/java/jre/bin/java HelloCWorlds
  24. Hello World!Exception in thread "main" java.lang.NoSuchMethodError: main
  25.  
  26. bash-4.2$ /usr/lib/java/jre/bin/java HelloCWorlds 2>/dev/null
  27. Hello World!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top