1 package org.enhydra.shark.util; 2 3 4 import java.util.*; 5 import org.enhydra.shark.api.RootError; 6 7 10 public class ResourceManager { 11 private static ResourceBundle resourceBundle; 12 13 static { 14 try { 15 17 resourceBundle = ResourceBundle. 18 getBundle("org.enhydra.shark.resources.SharkServer"); 19 20 } catch (MissingResourceException mre) { 22 System.err.println("ResourceManager -> org.enhydra.shark.resources.SharkServer.properties not found"); 23 throw new RootError("No property file!",mre); 24 } 25 } 26 27 37 public static String getLanguageDependentString (String nm) { 38 String str; 39 try { 40 str=resourceBundle.getString(nm); 41 } catch (MissingResourceException mre) { 42 str=""; 43 } 44 return str; 45 } 46 47 } 48 | Popular Tags |