Language selection menu is not displaying

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@9203 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2007-09-22 21:15:19 +00:00
committed by derek
parent 0ceb3e6e6e
commit a306213690

View File

@ -23,11 +23,13 @@ import javax.swing.JOptionPane;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.net.URL; import java.net.URL;
import java.net.URLDecoder;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Locale; import java.util.Locale;
import java.util.jar.JarEntry; import java.util.jar.JarEntry;
import java.util.jar.JarFile; import java.util.jar.JarFile;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
import java.io.File;
/** /**
* Allows for changing of default languages within Spark. * Allows for changing of default languages within Spark.
@ -49,9 +51,10 @@ public class LanguagePlugin implements Plugin {
// Load files // Load files
URL sparkJar = getClass().getClassLoader().getResource("spark.jar"); URL sparkJar = getClass().getClassLoader().getResource("spark.jar");
String url = URLDecoder.decode(sparkJar.getPath());
try { try {
ZipFile zipFile = new JarFile(URLFileSystem.url2File(sparkJar)); ZipFile zipFile = new JarFile(new File(url));
for (Enumeration e = zipFile.entries(); e.hasMoreElements();) { for (Enumeration e = zipFile.entries(); e.hasMoreElements();) {
JarEntry entry = (JarEntry)e.nextElement(); JarEntry entry = (JarEntry)e.nextElement();
String propertiesName = entry.getName(); String propertiesName = entry.getName();