service = 
{
  username:"srmd",
  password:"75ee1e68c8a9fa0ae79cdfd077f00059",
  url:"http://127.0.0.1:8080/glamservice"
};

general = 
{
    port:7777,
    timeout:30000,
    stakeholderTimeout:5

};

// Store out singleton for easier use
var System = java.lang.System;
var Thread = java.lang.Thread;
var Runnable = java.lang.Runnable;

function onInitialized()
{   
    // This works because of 'Liveconnect'
    System.out.println("Initialize...");
    
    var obj = { run: function() { System.out.println('Thread'); } };
    //obj.run();
    // Create a thread
    var r = new Runnable(obj);//{run:function(){out.println('running');}};
    var t = new Thread(r);
    t.start();
    Thread.currentThread().sleep(1000);
    System.out.println("Moving on...");
}

function onStarted()
{
    System.out.println("Application started...");
}

function onShutdown()
{
    System.out.println("Application shutdown...");
}