I am developing a java application using SWT on mac.The application shows SWT as its title and i wanted to change it.I saw this SWT on OS X: change application name question and wanted to use Display.setAppName()  but it should be used before i initialize any display as per the answer.Unfortunately i have declared my Display variable as static which will be initialized at the start of the app.How and where should i put this code so that it will be executed first before static variables are initialized.
            Asked
            
        
        
            Active
            
        
            Viewed 86 times
        
    3
            
            
         
    
    
        Community
        
- 1
- 1
 
    
    
        user3437315
        
- 270
- 4
- 13
1 Answers
2
            You can put them in the static blocks which get executed first .
static{
Display.setAppName()
}
See In what order do static blocks and initialization blocks execute when using inheritance? to learn more
- 
                    Worked!! Thanks.Will accept the answer in 11 minutes! – user3437315 Oct 30 '14 at 05:44
