By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,032 Members | 825 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,032 IT Pros & Developers. It's quick & easy.

overridde system function

P: n/a
nos
Just curious about how I would specify
the location of a system file like this one

public static String getenv(String name) {}

if I wanted to override it in my file
C:\eclipse\workspace\newdraw\MyClass.java

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If you are referring to changing the computer's environment variable (like
PATH), you *might* be able to do this with System.setProperty(). Its a
*might* because it depends on what security permissions your code has.
To read about setting security permissions check the Java SDK documentation
on the Policy File Creation and Management Tool.

FYI: System.getEnv is deprecated. Use System.getProperty().

"nos" <no*@nospam.com> wrote in message
news:Qe9Hb.471700$Dw6.1385622@attbi_s02...
Just curious about how I would specify
the location of a system file like this one

public static String getenv(String name) {}

if I wanted to override it in my file
C:\eclipse\workspace\newdraw\MyClass.java


Jul 17 '05 #2

P: n/a
nos

"E.Otter" <no******@given.com> wrote in message
news:j1**************@newsread1.news.atl.earthlink .net...
If you are referring to changing the computer's environment variable (like
PATH), you *might* be able to do this with System.setProperty(). Its a
*might* because it depends on what security permissions your code has.
To read about setting security permissions check the Java SDK documentation on the Policy File Creation and Management Tool.

FYI: System.getEnv is deprecated. Use System.getProperty().

"nos" <no*@nospam.com> wrote in message
news:Qe9Hb.471700$Dw6.1385622@attbi_s02...
Just curious about how I would specify
the location of a system file like this one

public static String getenv(String name) {}

if I wanted to override it in my file
C:\eclipse\workspace\newdraw\MyClass.java

Sorry, that's not it. I was not clear. What I was
thinking of is how to override a method that is
in the SDK. The part I don't understand is that
the SDK method would be in a different directory.
I think for "Applet" I would just do
public class myClass extends Applet() {}
since there is only one "Applet" there is no problem,
but what about "Date" since there are two (maybe more)
"Date"s
java.util.Date and java.sql.Date
Jul 17 '05 #3

P: n/a
nos

"nos" <no*@nospam.com> wrote in message
news:UZFIb.706384$Tr4.1783077@attbi_s03...

"E.Otter" <no******@given.com> wrote in message
news:j1**************@newsread1.news.atl.earthlink .net...
If you are referring to changing the computer's environment variable (like PATH), you *might* be able to do this with System.setProperty(). Its a
*might* because it depends on what security permissions your code has.
To read about setting security permissions check the Java SDK

documentation
on the Policy File Creation and Management Tool.

FYI: System.getEnv is deprecated. Use System.getProperty().

"nos" <no*@nospam.com> wrote in message
news:Qe9Hb.471700$Dw6.1385622@attbi_s02...
Just curious about how I would specify
the location of a system file like this one

public static String getenv(String name) {}

if I wanted to override it in my file
C:\eclipse\workspace\newdraw\MyClass.java

Sorry, that's not it. I was not clear. What I was
thinking of is how to override a method that is
in the SDK. The part I don't understand is that
the SDK method would be in a different directory.
I think for "Applet" I would just do
public class myClass extends Applet() {}
since there is only one "Applet" there is no problem,
but what about "Date" since there are two (maybe more)
"Date"s
java.util.Date and java.sql.Date

Would it be
public class myClass extends java.util.Date {}
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.