# Access denied (java.lang.RuntimePermission getClassLoader)

**URL:** <https://www.ruby-forum.com/t/access-denied-java-lang-runtimepermission-getclassloader/167801>\
**Category:** JRuby\
**Created:** [May 12, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/access-denied-java-lang-runtimepermission-getclassloader/167801 "2009-05-12T19:00:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_Hantl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@Michal\_Hantl](https://www.ruby-forum.com/u/Michal_Hantl)\
**Post date:** [May 12, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/access-denied-java-lang-runtimepermission-getclassloader/167801/1 "2009-05-12T19:00:27Z")

</div>

Hi guys,  
i just started playing with JRuby a while ago and so far im loving  
it. I began experimenting with JRuby inside an applet and it worked  
right from the start and i was happily building.

heres the progress [http://stuff.hantl.cz/jrubyeditor/](http://stuff.hantl.cz/jrubyeditor/)

There is only one problem - some people get the following exception.  
It is mostly Opera users and i saw it once too on FF at school. Any  
idea whats the the problem? I’m not very Java experinced and googling  
didnt help much.

Any help appreciated.

access denied (java.lang.RuntimePermission getClassLoader)

trace:  
access denied (java.lang.RuntimePermission getClassLoader)  
java.security.AccessControlException: access denied  
(java.lang.RuntimePermission getClassLoader)  
at java.security.AccessControlContext.checkPermission(Unknown Source)  
at java.security.AccessController.checkPermission(Unknown Source)  
at java.lang.SecurityManager.checkPermission(Unknown Source)  
at java.lang.Thread.getContextClassLoader(Unknown Source)  
at org.jruby.RubyInstanceConfig.\<\>init\>(RubyInstanceConfig.java:135)  
at org.jruby.Ruby.newInstance(Ruby.java:160)  
at jrubyapplet.MyApplet.resetRuby(MyApplet.java:34)  
at jrubyapplet.MyApplet.instance(MyApplet.java:39)  
at jrubyapplet.MyApplet.evalRuby(MyApplet.java:20)  
at jrubyapplet.MyApplet.evalRubyToJson(MyApplet.java:26)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.lang.reflect.Method.invoke(Unknown Source)  
at com.opera.LCInvoke.invoke(LCInvoke.java:14)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.lang.reflect.Method.invoke(Unknown Source)  
at com.opera.PrivilegedInvoke.run(LiveConnectPrivilegedActions.java:219)  
at java.security.AccessController.doPrivileged(Native Method)  
at com.opera.PrivilegedThread.run(LiveConnectPrivilegedActions.java:290)  
at java.lang.Thread.run(Unknown Source)

HTML Code:  
…  
  
No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET

JAVA Code:  
package jrubyapplet;

import java.applet.Applet;  
import java.io.PrintWriter;  
import java.io.StringWriter;  
import java.io.Writer;  
import org.jruby.Ruby;  
import org.jruby.RubyObject;  
import org.json.simple.JSONObject;

/\*\*  
\*

- @author removed\_email\_address@domain.invalid  
\*/  
public class MyApplet extends Applet {

}

–  
S pozdravem, Regards  
Michal Hantl

gtalk/jabber: removed\_email\_address@domain.invalid  
icq: 241813215

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```

---

<div class="post-metadata">

**Author:** ![Michal\_Hantl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@Michal\_Hantl](https://www.ruby-forum.com/u/Michal_Hantl)\
**Post date:** [May 12, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/access-denied-java-lang-runtimepermission-getclassloader/167801/2 "2009-05-12T23:04:52Z")

</div>

I got the security error in the Java console but I also got the  
correct output in the lower pane (this is on FF on OSX). BTW, It  
looks really cool!

David K.

On May 12, 2009, at 9:59 AM, Michal Hantl wrote:

> didnt help much.
> 
> Any help appreciated.

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```

---

<div class="post-metadata">

**Author:** ![Michal\_Hantl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@Michal\_Hantl](https://www.ruby-forum.com/u/Michal_Hantl)\
**Post date:** [May 12, 2009, 11:08pm UTC](https://www.ruby-forum.com/t/access-denied-java-lang-runtimepermission-getclassloader/167801/3 "2009-05-12T23:08:59Z")

</div>

2009/5/12 David K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I got the security error in the Java console but I also got the correct  
> output in the lower pane (this is on FF on OSX). Â BTW, It looks really cool!
> 
> David K.

Thanks! Heres the new home for the project  
[http://rubygami.googlecode.com/svn/trunk/index.html](http://rubygami.googlecode.com/svn/trunk/index.html)  
([http://rubygami.googlecode.com/](http://rubygami.googlecode.com/))

I have plans on using github as a storage and for now it needs some  
work on the gighlighter:). Its a very fun project.

Btw. I chose google code over github this time because it can serve  
html files with the right header so i dont need to upload the files  
everytime i commit change.

> > There is only one problem - some people get the following exception.  
> > Â [http://xircles.codehaus.org/manage\_email](http://xircles.codehaus.org/manage_email)

–  
S pozdravem, Regards  
Michal Hantl

gtalk/jabber: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
icq: 241813215

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```
