Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Works on 1.3.x but not 1.2.2.

Status
Not open for further replies.

jamescpp

IS-IT--Management
Aug 29, 2001
70
0
0
US
I'm reading an exported Windows 2000 registry file using the following:
Reader r = new InputStreamReader(new FileInputStream(c:\\ImageBuild.txt"), "UTF16");
BufferedReader br = new BufferedReader(r);
etc, etc.

The Stacktrace gives a NullPointerException in the main thread, but not much other than that.

Unfortunately I need this to work on Java 1.2.x and apparently it doesn't like the Reader line. Can anyone tell me how to do this with Java 1.2? Is that possible?

I guess my other option is using JNI, but I have no clue about that yet. Not sure what it would take to simply read this one key in the registry.

Help is appreciated! Thanks.
James
 
Hi James,

I generally use the following configuration:

BufferedReader br = new BufferedReader(new FileReader("c:\\ImageBuild.txt"));

This worked when I was using 1.2, and still works for me.

regards,
scrat
 
The problem is that the file is an exported Windows 2000 registry file and is encoded. I can't look at it as just plain text.

James
 
Anyone else have any ideas on why this doesn't work on 1.2.2??

Thanks,
James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top