Guest User

Untitled

a guest
May 25th, 2011
202
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Main2 {
  2.  
  3. /**
  4. * @param args the command line arguments
  5. */
  6. public static void main(String[] args) {
  7. try {
  8. Worm worm = new Worm("game.puppygames");
  9.  
  10. Properties properties = new Properties();
  11. for (int i = 0; i < args.length; i++) {
  12. ImprovedStringTokenizer st = new ImprovedStringTokenizer(args[i]);
  13. while (st.hasMoreTokens()) {
  14. String arg = st.nextToken();
  15. int idx = arg.indexOf('=');
  16. if (idx != -1) {
  17. properties.put(arg.substring(0, idx), arg.substring(idx + 1));
  18. }
  19. }
  20. }
  21.  
  22. worm.init(properties, new FileInputStream("y:\\resources.dat"));
  23. } catch (Exception ex) {
  24. Logger.getLogger(Main2.class.getName()).log(Level.SEVERE, null, ex);
  25. }
  26. }
  27. }
RAW Paste Data