2010-10-05 4 views

Répondre

6

Cela devrait faire l'affaire pour vous:

URL url = new URL(Platform.getInstallLocation().getURL()+Platform.getProduct().getName()+".ini"); 

Ensuite, il suffit d'utiliser l'URL pour accéder au contenu du fichier.

+0

Sauf si vous êtes sur Mac. Sur Mac, le fichier ini se trouve à l'intérieur de youappname.app. \t 'Chaîne spec = Platform.getInstallLocation(). GetURL() \t \t \t \t \t + Platform.getProduct(). GetName() +" .ini "; \t \t \t \t si (Util.isMac()) { \t \t \t spec = Platform.getInstallLocation(). GetURL() \t \t \t \t \t + Platform.getProduct(). GetName() + » .app/Sommaire/MacOS/" \t \t \t \t \t + Platform.getProduct(). GetName() +" .ini "; \t \t} \t \t URL url = nouvelle URL (spec); ' – Alex