Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Find Current Temp Directory 

                         

In this example we are find the current Temp directory.

We are using getProperty(String key) method to find the current temp directory. The getProperty(String key) is defined into System class. System class extends directly Object class. System class is defined final so any class never extends System class. System class allow us to get or set system information. In this example we are pasing "java.io.tmpdir" as key to get the current temp directory into getProperty() method.

The code of the program is given below:

public class TempDirExample 
{
    public static void main(String[] args)
    {
      
        System.out.println("OS current temporary directory is "
 
+ System.getProperty("java.io.tmpdir"));
    }
}

The output of the program is given below:

C:\convert\rajesh\completed>javac TempDirExample.java
C:\convert\rajesh\completed>java TempDirExample
OS current temporary directory is C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\

Download this example.

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
token string
Photoshop Abstracts An
KnowledgeTree
decimal to binary conv
Database MySQL Retriev
upload files using ser
store
cluster
dog tags
Eclipse 3.4 EJB
Photoshop Web Graphics
tomahawk menu
structs
mail merge in word
make runing programs
create table using jsp
java zip
java merging images
example of JFileChoos
Photoshop Animation Fa
square
iBatis packaged functi
interceptors hibernate
JMF
jsps in flex
validate javascript
EJB 2.0 tutorials
java voice chating
get file name
Servlet Container
text_io.file_type
Photoshop Abstracts Ra
code for simple calcul
write in a file valu
jsf datatable
struts hello
session bean and hiber
primitive data types u
java installtion
jsp forms getparameter
login=
Implementasi Stack wit
reading excel file usi
check a string for spa
develop graphs
Jintegra
JavaWorld article abou
java servlet
Struts Validator Frame
console program to wri
UI tag
how to parse
calculate mode in Java
asp tutorial
make runing java progr
program in java to dis
J2ME http
jspcode
storing text data to a
scheduler inmysql
Clustering and Load Ba
count the number of di
java date compare exam
JSTL: Property Access
text color
Java properties
calculate days between
Struts1.3 tutorials do
swing
TreeTable
connect to remote syst
examples for email val
how to use unique cons
Class Variables
Applet
B Tree
save
readinf file using thr
Database MySQL Using S
java string
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.