Posted By:
Nathan_Ciliberto
Posted On:
Wednesday, March 30, 2005 05:16 PM
From looking at the javadocs
http://java.sun.com/j2se/1.5.0/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)
it looks like the it is looking for the file "mailer_en_US.properties" from the classpath.
Try this:
1) create the file "Resource.java" with the following code:
import java.util.ResourceBundle;
public class Resource {
public static void main( String[] args )throws Exception{
ResourceBundle bundle = ResourceBundle.getBundle( "mailer" );
System.out.println( "bundle="+ bundle + "." );
}
}
2) Create the file "mailer_en_US.properties" and put it in the
same directory as "Resource.java"
3) compile the class:
javac -classpath . Resource.java
4) run it:
java -cp . Resource