Accessing platform-specific information hasn't always been easy. While you could certainly create processes with Runtime.exec(), dealing with differences across platforms to build parameter sets often led to headaches. In addition, the getenv() method of
Tutorial Details:
Getting environment variables
While I personally don't want to go back to the original event model for working with AWT components, one nice feature of the early access version of the Java platform (also known as the alpha releases) was the ability to access environment variables. This approach went against the "Write Once, Run Anywhere" mantra of the time, and the getenv() method of System was deprecated with the 1.0 release of the Java platform. Why something came out deprecated in a 1.0 release always confused me, but seeing the method there always seemed to spark interest in using it with new developers. Fast forward to 2004 and now you finally can. As Listing 1 shows, usage of the method is easy:
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: When tears bring you back your beloved method...
View Tutorial: When tears bring you back your beloved method...
Related
Tutorials:
Reloading Applets
Reloading Applets |
Focus on Swing -
JavaWorld - July
1998
Focus on Swing -
JavaWorld - July
1998 |
Opening up new
ports to Java
with javax.comm
- JavaWorld -
September 1998
Opening up new
ports to Java
with javax.comm
- JavaWorld -
September 1998 |
Build your own
caching mechanisms with volatile
collections - JavaWorld June 1999
Build your own
caching mechanisms with volatile
collections - JavaWorld June 1999 |
Create a custom Java 1.2-style ClassLoader - JavaWorld March 2000
Create a custom Java 1.2-style ClassLoader - JavaWorld March 2000 |
Using XML and JSP together - JavaWorld March 2000
Using XML and JSP together - JavaWorld March 2000 |
Make room for JavaSpaces, Part 5 - JavaWorld June 2000
Make room for JavaSpaces, Part 5 - JavaWorld June 2000 |
An open alternative to JSP - The faults of JSP So what's wrong with JSP?
How the template-based, open source API FreeMarker trumps JSP |
Embed Java code into your
native apps -
JavaWorld May 2001
Embed Java code into your
native apps -
JavaWorld May 2001 |
Explore the
Dynamic Proxy API
Explore the
Dynamic Proxy API |
Study guide Achieve strong performance with threads
Part 1
Study guide Achieve strong performance with threads
Part 1 |
Jtrix: Web
services beyond SOAP
Jtrix: Web
services beyond SOAP |
Is WSDL the
indispensable API?
Is WSDL the
indispensable API? |
confusing
title
confusing
title |
End-to-end internationalization of Web applications
End-to-end internationalization of Web applications
Going beyond the JDK
A typical Web application workflow involves a user loading one of your Webpages into her browser, filling out HTML form parameters, and submitting data back to the server. The ser |
Java 2D imaging for the Standard Widget Toolkit
Java 2D imaging for the Standard Widget Toolkit
Bring the power of 2D imaging to your Eclipse plug-ins
In this article, however, you'll learn how to have the best of both worlds. I'll demonstrate a simple technique that will allow you to paint Java |
Groovy, Java\'s New Scripting Language
Groovy, Java\'s New Scripting Language
When some Java developers hear about Groovy, their first reaction often is, as mine was, "Oh, no, not another scripting language for Java." We already have, after all, JavaScript and Rhino, Jython, Jelly, BeanShell, |
When tears bring you back your beloved method...
Accessing platform-specific information hasn't always been easy. While you could certainly create processes with Runtime.exec(), dealing with differences across platforms to build parameter sets often led to headaches. In addition, the getenv() method of |
Integrating Struts, Tiles, and JavaServer Faces
Integrating Struts, Tiles, and JavaServer Faces. Bring the power, flexibility, and manageability of the three technologies together. |
Submit project to get developed
Submit project to get developed
T his page contains answers to common questions handled by our support staff, along with some tips and tricks that we have found useful and presented here as questions.
How do I Submit my Project ?
Who can submit a |
|
|
|