giovedì 1 marzo 2012

Leggere file in progetti JAVA

HelpDialog.class.getResourceAsStream("/directory/nomefile")

Retrieving Resources from JAR files

// Get current classloader
   ClassLoader cl = this.getClass().getClassLoader();
   // Create icons
   Icon saveIcon  = new ImageIcon(cl.getResource("images/save.gif"));

Nessun commento:

Posta un commento