Messages of subject
Is It possible to run PJA without setting properties ??? |
Jenda
Member since : Sep 29, 2004
Messages : 2
|
Sep 29, 2004 at 2:55 PM
Hi all,
I really hope that You are able to help me.
I am programming an application, which is something like image gallery.
So I need handle with images. But because the application is to be run
on an server with very restrictive security policy, I am not allowed to
set properties like "awt.toolkit", "com.eteks.awt.PJAToolkit".
So the application still requires libawt...
My question : Is it possible to use the PJA classes without setting these
properties????
Thanks in advance
Jenda
|
Manu
Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
|
Sep 30, 2004 at 1:13 AM
You may run PJA without setting System properties if you use directly PJA classes like PJAImage (a subclass of java.awt.Image), PJAGraphics (a subclass of java.awt.Graphics) and PJAGraphicsManager (a class that looks like java.awt.Toolkit but that is able to run with a restrictive security policy).
For more information, please read the FAQ "What methods can be called in a servlet with no problem of Toolkit access for end users ?" provided in the index.html file of PJA download, and read these two subjects :
http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=90 http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=134 --- Manu (moderator/modérateur)
|
Jenda
Member since : Sep 29, 2004
Messages : 2
|
Sep 30, 2004 at 8:45 PM
Uff I really become quite disheart of success. Now tho output of Tomcat on the server is following .
-------------------
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.java2d)
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
java.security.AccessController.checkPermission(AccessController.java:401)
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1491)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:271)
java.lang.ClassLoader.loadClass(ClassLoader.java:235)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1255)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Resample.doGet(Resample.java:67)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
------------------------------- So I do not know what else. Manu do you have any idea please ??
Jenda
|