JDK-4361044 : Resource Bundle from jar not found if jar exists in path which has symbol !
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-08-09
  • Updated: 2013-01-02
  • Resolved: 2005-08-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 betaFixed
Related Reports
Duplicate :  
Relates :  
Description
Name: skT45625			Date: 08/09/2000


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

  Program text:

package com.test;
import java.util.*;

public class BundleTest {
   public static void main (String args[]) {
      try {
           ResourceBundle resource = ResourceBundle.getBundle
( "bundle",Locale.getDefault());
           if (resource !=null) {
              System.out.println("Bundle found.");
           }
        } catch (MissingResourceException mre) {
            System.err.println("bundle.properties " + " resource not found");
            mre.printStackTrace();
        
        }

   }
}


1. write program to get ResourceBundle ( I put it in com.test package)
2. compile it
2. put it all in jar (jar cfvm tst.jar manifest.mf com bundle.properties)
*.properties files,   manifest.mf with indicating Main-Class
manifest.mf source:
   Manifest-Version: 1.0
   Main-Class: com.test.BundleTest

3. and run it with java -jar com.test.BundleTest
if jar is in e.g. E:\test bundle found succesfully.
if jar is in e.g  E:\!test bundle is not found.
and says that

bundle resource not found
java.util.MissingResourceException: Can't find bundle for base name bundle,
locale us_us
        at java.util.ResourceBundle.throwMissingResourceException(Unknown Source
)
        at java.util.ResourceBundle.getBundleImpl(Unknown Source)
        at java.util.ResourceBundle.getBundle(Unknown Source)
        at com.test.BundleTest.main(BundleTest.java:7)
(Review ID: 108166) 
======================================================================

Comments
EVALUATION Will fix for mustang
09-08-2005

WORK AROUND Name: skT45625 Date: 08/09/2000 do not place your jar files in directories which absolute path contains '!' symbols ======================================================================
11-06-2004