aspose file tools*
The moose likes Applets and the fly likes System.getProperty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "System.getProperty" Watch "System.getProperty" New topic
Author

System.getProperty

Matt Dearden
Greenhorn

Joined: May 12, 2005
Posts: 6
Can someone tell me why this returns null under IE?

LibDir = System.getProperty("java.library.path");

It works for Firefox and Netscape
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
I just tried it in win xp with j2se 1.5 and it returned the path environment variable.
Matt Dearden
Greenhorn

Joined: May 12, 2005
Posts: 6
Interesting. Doesn't work with IE6 under Windows 2000 SP4. Anyone know why?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

You are probably using the Sun Java VM in Firefox and Netscape and the Microsoft Java VM in IE.


[How To Ask Questions On JavaRanch]
Matt Dearden
Greenhorn

Joined: May 12, 2005
Posts: 6
Originally posted by Joe Ess:
You are probably using the Sun Java VM in Firefox and Netscape and the Microsoft Java VM in IE.

I am indeed. However, I'm writing an applet that needs to store a dll in the libraries directory and hence needs to work with MJVM. Does it use a different call to get this information?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

The MS Java VM is problematic. It's frozen at the JDK 1.1.4 level so it does not have Swing, Collections, New IO and many other features. There are numerous incompatibilities with newer API's. The security model changed a great deal between Java 1.1 and Java 1.2. Have you checked the Java console? I'll bet you are getting a security exception.
 
 
subject: System.getProperty