Jim Frank

Greenhorn
+ Follow
since Mar 13, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jim Frank

Can someone recommend a book on learning the fine details of the JVM?
17 years ago
Your right, this is about security. I have a password that is in a String. The String is created with new, so it is an object. The String is global, so it is on the heap. Once the class the String is in goes out of scope, the String is eligible for gc. I was wondering if the password text would be erased in memory when it is gc.

My questions are:
Using the Sun 5.0 JVM, will this String be erased when it is gc, like with the generation and compacting algorithms which I believe are default gc for that JVM?

How often will the gc run? The class I have the password doesnt last long, so I believe this is sent to the youth generation gc.
17 years ago
Once a String is garbage collected, is the String itself, like "Hello" or whatever erased from memory. Can you do a read of the computer memory and still find the string, like "Hello"
17 years ago
So the literal String in the first example will be garbage collected, unlike a literal?
17 years ago
Is this:
String literal = "";

String getString(){
return (new)String("Bob");
}

literal = getString();

The same as this:
String literal=(new)String("Bob");
17 years ago
Two questions on JOptionPane:

1/Can the layout be changed? Any objects added to it are automatically stacked on top of each other. I would like to add two checkboxes next to each other.

2/Textfields are automatically sized. Can the size of Textfields be changed. The size on the screen.

Thanks
18 years ago
I have to get rid of a password in memory after decrypted and used. The password is encypt and decrypt with JCE. I was thinking such:

StringBuffer x = Pass.decrypt();

//use it

for(d=0; d<x.length();d++)
x.setCharAt(d,'X');

x=null;

I guess I have to do the same thing to the decrypted password in the decrypt() method.

Any thoughts?
18 years ago
Thanks. I can replace the block, but the Unicode character comes out as a block too. I converted to a byte array and the value is 10, but it still comes out as a block in the String. Is this a problem with 1.2, 1.3?
I use \n and other unicode values to replace what is in there.
18 years ago
I am getting a String from a TextArea. Ascii 10 and 9 convert to blocks
[]. I want to convert these blocks to the unicode linefeed and tab, put cannot. How would I replace these blocks with the proper unicode characters. I am using 1.3, and cannot change. Thanks
18 years ago
How do I force a child panel back to the foreground. It is a child of a parent JFrame. A modal is called for an user action, and since the Parent is used as a parameter, the parent is called to the foreground. I want the child to remain in the foreground.
18 years ago
I am working on an application which allows the user to save a log entry. The users want to cut and paste from MS Word into a JTextField. The problem is is when this is saved, to a String, blocks and weirds characters are saved too, which I think are the tab and other special characters from Word that are not converting right. How can I strip out these characters? I think it is mostly the enter and tab characters that are causing the problems.
18 years ago
Is it possible to find out the RAM addresses and actually control how much and where a program is loaded into memory? I don't mean controlling the Java class loader, but the actual physical addresses of memory. Is it possible to load all the byte code into memory at once, and control where it goes?
19 years ago
What is the purpose of intergrating Apache and Tomcat. Isnt Tomcat a standalone server? I realize it is a servlet container, but it still is a server.
19 years ago
Ohio.
Yea, that is a good point.

What got me is I went to an interview and the guy asked me if I had experience in SQL language. That takes about five minutes to learn!
[ June 16, 2004: Message edited by: Jim Frank ]
19 years ago