tuxmartin

Zjisti jmeno JAR souboru - funguje!

Nov 6th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. package app;
  2.  
  3. public class HlavniOkno {
  4.  
  5.     public static void main(String[] args) {
  6.  
  7.         for (int i = 0; i < args.length; i++) {
  8.             System.out.println(i + ". " + args[i]);
  9.         }
  10.  
  11.         /**
  12.         * sun.java.command contains the main class and program arguments. Instead of the
  13.         * main class it may have "-jar jarname"
  14.         */
  15.         // http://java.dzone.com/articles/programmatically-restart-java
  16.         System.out.println(System.getProperty("sun.java.command"));
  17.  
  18.  
  19.  
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment