This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/14164] New: [Win32] gcj fails to load resource bundle based on classloader


import java.net.URL;
import java.net.URLClassLoader;
import java.util.Locale;
import java.util.ResourceBundle;

public class CL {

  public static void main(String[] a) {
    String name = "test";
    String dir = "c:\\test\\";
    ResourceBundle bundle;

    try {
      Locale l = new Locale("de", "DE");
      URL[] urlArray = new URL[]{new URL("file:///" + dir)};
      URLClassLoader urlClassLoader = new URLClassLoader(urlArray);
      bundle = ResourceBundle.getBundle(name, l, urlClassLoader);
      System.out.println(bundle.getString("one"));
    } catch (Exception e) {
      e.printStackTrace();
    }

  }
}

// c:\test\test_de_DE.properties:
// one=works


Works with java/win32, java/linux, and gcj/linux.

Fails on gcj win32:
java.util.MissingResourceException: Bundle test not found

gcc version 3.4.0 20040130 (prerelease)

-- 
           Summary: [Win32]  gcj fails to load resource bundle based on
                    classloader
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ovidr at users dot sourceforge dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14164


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]