diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index 35518fc..94b9e38 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -1,11 +1,14 @@ -

JACOB 1.15 M1

+

JACOB 1.15 M2

What's New

Tracked Changes

@@ -13,6 +16,14 @@ Bugs + + 2721937 + System.getProperties call caused security exception in applet. + com.jacob.includeAllClassesInROT now acts as master switch for class/ROT control. + This change also has the side benefit that the PutInROT property is not + checked on every object creation for users who run in the standard + all classes in ROT mode. (M2) +     diff --git a/docs/UsingJacob.html b/docs/UsingJacob.html index 8dd3491..616091f 100644 --- a/docs/UsingJacob.html +++ b/docs/UsingJacob.html @@ -71,14 +71,21 @@ should be fixed in some future release, fix method and time not yet determined.


Microsoft Visual C++ library dependencies.

+

+ Jacob 1.15 is build with VC++ 2005 staticly linked into the DLL. This + removes the need for a separate msvcr80.dll installation. +

+

Jacob 1.13 is built with VC++ 2005 that creates a dependency on msvcr80.dll. Windows XP and later seem to already include the necessary components. NT/2000 and Server/2003 require that you download the Visual C 2005 redistributable package, vcredist_x86.exe from the microsoft web site. Microsoft has a download available that supplies the necessary components. It is distributed as a redistributable package. +

If you see the following message then you probably don't have the right C++ libraries. +

 Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\apps\...\jacob.dll: This application has fa 
 iled to start because the application configuration is incorrect. Reinstalling the application may fix this pr 
@@ -162,6 +169,20 @@ This library supports several different command line options:
 	
 	
 	
+   
+	

com.jacob.includeAllClassesInROT

+ + Acts as master switch for and <class_name>.PutInROT. + This property determines if the (experimental) PutInROT property is even + checked. It was added in version 1.15 because the property check in + PutInROT brok applets because they are not allowed to check system properties + at run time. com.jacob.includeAllClassesInROT is checked at class initialization + which is allowed. +

The default value of this flag is true which matches all behvior + prior to 1.13 and the default behvior for 1.13 on

+

Setting this flag to false causes Jacob to check the and <class_name>.PutInROT + property for every Jacob object that is created.

+    

<class_name>.PutInROT

diff --git a/src/com/jacob/com/ROT.java b/src/com/jacob/com/ROT.java index 9d81580..7b50fd3 100644 --- a/src/com/jacob/com/ROT.java +++ b/src/com/jacob/com/ROT.java @@ -49,6 +49,20 @@ public abstract class ROT { protected static final boolean USE_AUTOMATIC_GARBAGE_COLLECTION = "true" .equalsIgnoreCase(System.getProperty("com.jacob.autogc")); + /** + * If the code is ran from an applet that is called from javascript the Java + * Plugin does not give full permissions to the code and thus System + * properties cannot be accessed. They can be accessed at class + * initialization time. + * + * The default behavior is to include all classes in the ROT, setting a + * boolean here to indicate this prevents a call to System.getProperty as + * part of the general call flow. + */ + protected static final Boolean INCLUDE_ALL_CLASSES_IN_ROT = Boolean + .valueOf(System.getProperty("com.jacob.includeAllClassesInROT", + "true")); + /** * Suffix added to class name to make up property name that determines if * this object should be stored in the ROT. This 1.13 "feature" makes it @@ -217,11 +231,15 @@ public abstract class ROT { * @param o */ protected static void addObject(JacobObject o) { - // check the system property to see if this class is put in the ROT - // the default value is "true" which simulates the old behavior - String shouldIncludeClassInROT = System.getProperty(o.getClass() - .getName() - + PUT_IN_ROT_SUFFIX, "true"); + String shouldIncludeClassInROT = "true"; + // only call System.getProperty if we are not including all classes in + // the ROT. This lets us run with standard Jacob behavior in Applets + // without the security exception raised by System.getProperty in the + // flow + if (!ROT.INCLUDE_ALL_CLASSES_IN_ROT) { + shouldIncludeClassInROT = System.getProperty(o.getClass().getName() + + PUT_IN_ROT_SUFFIX, "true"); + } if (shouldIncludeClassInROT.equalsIgnoreCase("false")) { if (JacobObject.isDebugEnabled()) { JacobObject.debug("JacobObject: New instance of "