Results 1 to 2 of 2

Thread: operating system java program

  1. #1
    Williamsjones is offline Senior Member
    Join Date
    Dec 2009
    Posts
    352
    Rep Power
    3

    Default operating system java program

    I am doing on live project using programming language JAVA. In one of my page I have to show OS temporary directory using. I tried different ways but not able to write right program. Can anybody help me how to get OS temporary directory using java program? Thanks in advanced.

  2. #2
    Brownchris is offline Senior Member
    Join Date
    Dec 2009
    Posts
    331
    Rep Power
    3

    Default

    It is very simple to get OS temporary directory in java. You have to just use java.io.tmpdir property and save this property name into any string variable and then pass this variable to another string variable for retrieval.

    package sample.code.java.lang;
    public class TempDirEg
    {
    public static void main(String[] args)
    {
    String properties = "java.io.tmpdir";
    String tempDirt = System.getProperty(properties);
    System.out.println("Windows xp current temporary directory is " + tempDirt);
    }
    }

Similar Threads

  1. Operating systems or Operating System
    By Hirena Raynald in forum Operating System
    Replies: 0
    Last Post: 10-20-2010, 02:21 PM
  2. How to initiate Internet program with Java
    By WilsonMartin in forum Programming
    Replies: 0
    Last Post: 05-06-2010, 03:47 PM
  3. Java program
    By MoralesWard in forum Programming
    Replies: 1
    Last Post: 02-02-2010, 05:16 PM
  4. statement in java program
    By PetersonClark in forum Programming
    Replies: 1
    Last Post: 01-27-2010, 02:50 PM
  5. modern month name using java program
    By RodríguezBrown in forum Programming
    Replies: 1
    Last Post: 01-22-2010, 06:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48