Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java Plug-In and Permissions



David Stoleson <email@hidden> wrote:

>We have a signed applet that uploads files from both Windows and
>Macintosh. On the Macintosh we MacBinary the files by using Greg
>Guerin's MacBinaryToolkit. This worked fine on Mac OS 9. But it does
>not work when using 10.2 and the Java Plugin, we have permission/access
>problems when executing the following code:
>
> FileForker.SetFactory("glguerin.io.imp.mac.ten.TenForker");
>
>It throws the following exception:
>
>java.lang.ExceptionInInitializerError:
>java.lang.IllegalArgumentException: access denied
>(java.lang.RuntimePermission
>accessClassInPackage.com.apple.mrj.macos.frameworks)glguerin.io.imp.mac.
>ten.TenForker
>
>Is there a way to get around this without having to edit he
>java.security file to allow access to the package com.apple.mrj.macos.*.

I think it's got a problem allowing the TenForker implementation access to
the Carbon framework class. This appears to be a "sub-optimal design
decision" (i.e. blunder) on my part. I chose to refer to the
Apple-supplied JDirect "library" class, rather than define my own. As
Napoleon once said about invading Russia, "It didn't seem like a such bad
idea at the time."

The only other thing I can think of is that the available permissions are
forbidding access for some other JDirect class that should actually be
accessible, and that's choking the TenForker imp, which uses JDirect.

A possible work-around is to try the JNI prerelease imp. That's going to
be much more difficult though, since it's a real feat to get an applet
(signed or not) to install a JNI lib-file and then link to it "on the fly".
That's just one of the things I'm going to miss about JDirect in 1.4.1.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.