Applets and Resource Bundles
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jennya_Dobreva
Posted On:   Tuesday, May 7, 2002 10:19 AM

Hello, I have a problem with localization. The row m_bundle = ResourceBundle.getBundle("trunkieren.trunkieren", Locale.GERMAN); cause the exception : java.io.FileNotFoundException: http://localhost:8080/demos/trunkieren/trunkieren.class at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:679) at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:317) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1106) at sun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(HttpURLConnection.java:295) at sun.plugin.net.protocol.htt   More>>

Hello,

I have a problem with localization. The row
m_bundle = ResourceBundle.getBundle("trunkieren.trunkieren", Locale.GERMAN);


cause the exception :



java.io.FileNotFoundException: http://localhost:8080/demos/trunkieren/trunkieren.class

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:679)

at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:317)

at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1106)

at sun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(HttpURLConnection.java:295)

at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:315)

at sun.plugin.net.protocol.http.HttpUtils.followRedirects(HttpUtils.java:39)

at sun.plugin.cache.CachedFileLoader.download(CachedFileLoader.java:225)

at sun.plugin.cache.CachedFileLoader.load(CachedFileLoader.java:89)

at sun.plugin.cache.FileCache.get(FileCache.java:141)

at sun.plugin.net.protocol.http.HttpURLConnection.connectWithCache(HttpURLConnection.java:203)

at sun.plugin.net.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:139)

at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:309)

at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1134)

at sun.net.www.protocol.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1148)

at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:222)

at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:40)

at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:141)

at java.security.AccessController.doPrivileged(Native Method)

at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:138)

at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:189)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:112)

at java.lang.ClassLoader.loadClass(ClassLoader.java:262)

at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1009)

at java.util.ResourceBundle.findBundle(ResourceBundle.java:884)

at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:711)

at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)

at trunkieren.TrunkationApplet.initAppletComponents(TrunkationApplet.java:82)


The same is java.io.FileNotFoundException: http://localhost:8080/demos/trunkieren/trunkieren_de.class.


It works but I wouldn't like to see this stackTrace. It is strange why it looks for class file not for "properties" file.
And something else that makes it only when I try to load the applet through request to the server. When I load it
as a local file it works properly.


I decided to put the whole applet class package into a jar file, but than I've met another problem.
The browser reads only the first package and it doesn't finds the classes of the second package.
I hope that the Netscape for Solaris supports more than one package.


Maybe I am wrong with something but what I know is archives to the applet are specified as
archieve="applet.jar, ../common/regexpr.jar", for example.


All proposals are welcome. Thanks in advance!


/ Jennya Dobreva

   <<Less
About | Sitemap | Contact