Revision 38094 branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/Launcher.java
Launcher.java | ||
---|---|---|
66 | 66 |
import java.net.MalformedURLException; |
67 | 67 |
import java.net.PasswordAuthentication; |
68 | 68 |
import java.net.URL; |
69 |
import java.net.URLClassLoader; |
|
69 | 70 |
import java.nio.channels.FileChannel; |
70 | 71 |
import java.security.AllPermission; |
71 | 72 |
import java.security.CodeSource; |
... | ... | |
107 | 108 |
import org.apache.log4j.spi.LoggingEvent; |
108 | 109 |
import org.exolab.castor.xml.MarshalException; |
109 | 110 |
import org.exolab.castor.xml.ValidationException; |
111 |
import org.slf4j.Logger; |
|
112 |
import org.slf4j.LoggerFactory; |
|
113 |
|
|
110 | 114 |
import org.gvsig.andami.authentication.IAuthentication; |
111 | 115 |
import org.gvsig.andami.authentication.LoginUI; |
112 | 116 |
import org.gvsig.andami.config.generate.Andami; |
... | ... | |
162 | 166 |
import org.gvsig.utils.XMLEntity; |
163 | 167 |
import org.gvsig.utils.xml.XMLEncodingUtils; |
164 | 168 |
import org.gvsig.utils.xmlEntity.generate.XmlTag; |
165 |
import org.slf4j.Logger; |
|
166 |
import org.slf4j.LoggerFactory; |
|
167 | 169 |
|
168 | 170 |
/** |
169 | 171 |
* <p> |
... | ... | |
2508 | 2510 |
org.gvsig.i18n.Messages.addLocale(new Locale("en")); |
2509 | 2511 |
org.gvsig.i18n.Messages.addLocale(new Locale("es")); |
2510 | 2512 |
} |
2511 |
org.gvsig.i18n.Messages.addResourceFamily("org.gvsig.andami.text", |
|
2512 |
"org.gvsig.andami.text"); |
|
2513 | 2513 |
|
2514 |
// Create classloader for the i18n resources in the |
|
2515 |
// andami and user i18n folder. Those values will have |
|
2516 |
// precedence over any other values added afterwards |
|
2517 |
File andamiI18nFolder = |
|
2518 |
new File(System.getProperty("user.dir"), "i18n"); |
|
2519 |
File userI18nFolder = new File(getAppHomeDir(), "i18n"); |
|
2520 |
|
|
2521 |
logger.info("Loading i18n resources from the application and user " |
|
2522 |
+ "folders: {}, {}", andamiI18nFolder, userI18nFolder); |
|
2523 |
|
|
2524 |
URL[] i18nURLs; |
|
2525 |
try { |
|
2526 |
i18nURLs = |
|
2527 |
new URL[] { userI18nFolder.toURI().toURL(), |
|
2528 |
andamiI18nFolder.toURI().toURL() }; |
|
2529 |
ClassLoader i18nClassLoader = new URLClassLoader(i18nURLs); |
|
2530 |
org.gvsig.i18n.Messages.addResourceFamily("text", i18nClassLoader, |
|
2531 |
"Andami Launcher"); |
|
2532 |
} catch (MalformedURLException e) { |
|
2533 |
logger.error("Error loading i18n resources from the application " |
|
2534 |
+ "and user folders: " + andamiI18nFolder + ", " |
|
2535 |
+ userI18nFolder, e); |
|
2536 |
} |
|
2537 |
|
|
2538 |
// Finally load the andami own i18n resources |
|
2539 |
org.gvsig.i18n.Messages.addResourceFamily("org.gvsig.andami.text", |
|
2540 |
"Andami Launcher"); |
|
2514 | 2541 |
} |
2515 | 2542 |
|
2516 | 2543 |
/** |
Also available in: Unified diff