/[classpath]/classpath/java/lang/System.java
ViewVC logotype

Diff of /classpath/java/lang/System.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.38 by mark, Fri Jul 23 11:40:05 2004 UTC revision 1.39 by mark, Sat Aug 28 19:37:39 2004 UTC
# Line 584  public final class System Line 584  public final class System
584    }    }
585    
586    /**    /**
587     * This used to get an environment variable, but following Sun's lead,     * Gets the value of an environment variable.
    * it now throws an Error. Use <code>getProperty</code> instead.  
588     *     *
589     * @param name the name of the environment variable     * @param name the name of the environment variable
590     * @return this does not return     * @return the string value of the variable or null when the
591     * @throws Error this is not supported     *         environment variable is not defined.
592     * @deprecated use {@link #getProperty(String)}; getenv is not supported     * @throws NullPointerException
593       * @throws SecurityException if permission is denied
594       * @since 1.5
595     */     */
596    public static String getenv(String name)    public static String getenv(String name)
597    {    {
598      throw new Error("getenv no longer supported, use properties instead: "      if (name == null)
599                      + name);        throw new NullPointerException();
600        SecurityManager sm = Runtime.securityManager; // Be thread-safe.
601        if (sm != null)
602          sm.checkPermission(new RuntimePermission("getenv." + name));
603        return VMSystem.getenv(name);
604    }    }
605    
606    /**    /**

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26