Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > modifying java....
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 764 of 803
Post > Topic >>

modifying java.lang.String.java

by "danwichs@[EMAIL PROTECTED] " <danwichs@[EMAIL PROTECTED] > Mar 25, 2007 at 03:00 PM

Hi,
 I'm trying to modify java.lang.String.java and add the modified
String.class to
rt.jar [THIS IS FOR MYSELF ONLY AND WILL NOT BE DEPLOYED].
I cannot add "private final boolean tainted[] = new
boolean[5];" to String.java. If I do, it still compiles and I can add
it to rt.jar and compile a test program against it. However, the JVM
crashes with a strange message:

 java.lang.IllegalArgumentException: name can't be empty
       at java.security.BasicPermission.init(Unknown Source)
       at java.security.BasicPermission.<init>(Unknown Source)
       at java.lang.RuntimePermission.<init>(Unknown Source)
       at java.lang.Thread.<clinit>(Unknown Source)

I tried various ways of rewriting the above such as adding "private
final boolean tainted[];" and initializing it in each constructor.
Nothing works.


I can add methods to String.java and even the member variable "private
boolean isTainted;" and it works just fine. Do you have any ideas for
why adding a boolean array does not work (or better yet how to get
around this issue)?


Thank you,

Daniel




 9 Posts in Topic:
modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 15:00:27 
Re: modifying java.lang.String.java
"Ralf Ullrich"   2007-03-25 23:06:17 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 17:58:40 
Re: modifying java.lang.String.java
"Ralf Ullrich"   2007-03-26 01:21:15 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 18:34:14 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-25 19:10:28 
Re: modifying java.lang.String.java
Tom Hawtin <usenet@[EM  2007-03-26 09:30:37 
Re: modifying java.lang.String.java
Moritz Hammer <newsgro  2007-03-26 11:43:56 
Re: modifying java.lang.String.java
"danwichs@[EMAIL PRO  2007-03-26 06:49:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 5:59:17 CDT 2008.