473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

overridde system function

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
3 2564
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jay Allard | last post by:
Hello I posted this in the vb.net group on the 2/25/2004, but didn't get any response. Here's attempt 2. Does anyone know of a more appropriate place to post this? One new piece of...
2
by: Tony Liu | last post by:
Hi, I want to get the name of the calling function of an executing function, I use the StackTrace class to do this and it seems working. However, does anyone think that there any side effect...
3
by: David N | last post by:
Hi All, I just wonder if in C#, I can develop a user defined control that can call its parent function which is not yet developed. For example, how do I make my user control call a...
4
by: Adriano Coser | last post by:
I'm getting the following error: error C3767: PictureSource - candidate function(s) not accessible when accessing a public member function of a managed class, either from managed or unmanaged...
4
by: Matt | last post by:
I'm trying to write a shared function that will convert all my phone numbers from format 1234567890 to (123) 456-7890. Here is my function that I wrote: Public Shared Function...
1
by: murphy | last post by:
Hi, I've been seeing two symptoms with my asp.net site that have started recently after a long period of smooth running. As others on our team make changes to referenced dll's I find that I get...
56
by: Luke Matuszewski | last post by:
I am designing the library, which will hidden all its functions within singleton object ... So for clients they will use it like . eg. system.getElementWithId('ruler'); At library side, i...
1
by: Noah Roberts | last post by:
Trying to use boost::function in a C++/CLI program. Here is code: pragma once #include <boost/function.hpp> #include <boost/shared_ptr.hpp> #include <vector> using namespace System;
10
by: banleong | last post by:
To all gurus, I am currently converting some of C++ codes to VB.net The C++ Codes is as follows : ================= C++ CODE ================== typedef struct _tagBBCameraParameter {...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.