By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

Java security Exception

P: n/a
Hi, I'm writing a program for PPC and I use IBM's Websphere Device
Developper PPRO1.0 java VM. This vm is much smaller and simple than standard
vm as it has to run on small devices as handhelds. And lot of java standard
base classes are not present. I needed package java.nio.* to run stax (a xml
utility) so I copied-pasted from rt.jar the package java.nio.* and imported
it in the classpath of my project. But when I ran my class I got this error:

Exception in thread "main" java.lang.SecurityException:
java.nio.charset.Charset - protected system package 'java.nio.charset'
at java.lang.ClassLoader.checkClassName(ClassLoader.j ava:167)
at java.lang.ClassLoader.defineClass(ClassLoader.java :208)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:109)
at java.net.URLClassLoader.findClassImpl(URLClassLoad er.java:1026)
at java.net.URLClassLoader$4.run(URLClassLoader.java: 557)
at java.security.AccessController.doPrivileged(Access Controller.java:167)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:555)
at
com.ibm.oti.vm.URLSystemClassLoader.findClass(URLS ystemClassLoader.java:32)
at java.lang.ClassLoader.loadClass(ClassLoader.java:6 02)
at
com.ibm.oti.vm.URLSystemClassLoader.loadClass(URLS ystemClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:5 61)
at com.bea.xml.stream.XMLWriterBase.setWriter(XMLWrit erBase.java:54)
at com.bea.xml.stream.XMLWriterBase.<init>(XMLWriterB ase.java:46)
at
com.bea.xml.stream.XMLOutputFactoryBase.createXMLS treamWriter(XMLOutputFactoryBase.java:28)
at
com.bea.xml.stream.XMLOutputFactoryBase.createXMLS treamWriter(XMLOutputFactoryBase.java:37)
at unused.LoadXML.main(LoadXML.java:40)

How can I solve it? Is it concerned with java.policy and java.security
files?
Thanks
Faabio
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.