wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes jre path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jre path" Watch "jre path" New topic
Author

jre path

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
When I try to run a java program from my dos prompt, I'm getting an error because the System.getProperty("java.ext.dirs") method returns a path that I don't expect (I use this path to look up a txt file). Where is it picking this file path information up from?
Thanks.
Paul
Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
Here is the error I'm getting
Error: could not open `C:\Program Files\Java\j2re1.4.0_01\lib\i386\jvm.cfg'
I have no idea why the java execution is looking in this path.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
From what context are you getting this error? Is it part of an applet? What is the exact code example that causes the error? Does this example not work for you?
[ September 19, 2002: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
I have a System.out in my code. If I run it from JCreator (my usual IDE), getProperty("java.ext.dirs") gives me C:\Java\jdk1.3.1_04\jre\lib\ext. When I run the same class in the same directory from the dos prompt, this property returns C:\Program Files\Java\j2re1.4.0_01\lib.
It looks like I must have installed something once that decided this was my jre but how can I change it? I want the dos version to look at C:\Java\jdk1.3.1_04\jre\lib\ext too.
Thanks.
Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
Found the problem. I had a java.exe file sitting in my C:\winnt\system32 directory which must have had this jre information built in. I don't know how it got there???
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Bill Gates put it there.
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Seems Bill Gates busy dong lot of nuisance in Windows. Good Dirk
Arun
 
Consider Paul's rocket mass heater.
 
subject: jre path
 
Similar Threads
How to load the resources outside WEB-INF?
Jar File Not Accepting my Classpath As specified in the manifest.mf
storing file path in weblogic 8.1
Setting up logging
problem in compiling servlet