Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ann: Java SE 6 for PPC and Intel and SWT Compatibilty Libraries now available!



Not very exciting, but Java apps can finally query disk size and free space:

import java.io.*;

public final class Test
{
    
    public static void main(final String[] args)
    {
        final File dir = new File(args.length < 1 ? "." : args[0]);
        System.out.format("Directory: %s%n"
            + "  Total Space  : %,16d%n"
            + "  Free Space   : %,16d%n"
            + "  Usable Space : %,16d%n",
            dir, dir.getTotalSpace(), dir.getFreeSpace(),
            dir.getUsableSpace());
    }

}

glamdring ~/tmp % java -cp . Test
Directory: .
  Total Space  :   99,686,268,928
  Free Space   :    6,838,730,752
  Usable Space :    6,576,586,752
glamdring ~/tmp % java -cp . Test /Volumes/Secure
Directory: /Volumes/Secure
  Total Space  :    2,147,442,688
  Free Space   :      451,067,904
  Usable Space :      451,067,904


-- 
Lachlan O'Dea
CA
Senior Software Engineer
tel: +61 3 8416 5627
fax: +61 3 8416 5810
mobile: +61 412 390 650
email@hidden

Relax and enjoy your shoes!



> From: Henry Story <email@hidden>
> Date: Thu, 18 May 2006 14:06:01 +0200
> To: Alan Samuel <email@hidden>
> Cc: Java-Dev <email@hidden>
> Subject: Re: Ann: Java SE 6 for PPC and Intel and SWT Compatibilty Libraries
> now available!
> 
> Anyone played with this yet? How does it work? Are there some apps
> that show off specific cool features of this new Java release I could
> try on my Power Book 1.33Ghz?
> 
> Henry
> 
> On 18 May 2006, at 03:55, Alan Samuel wrote:
> 
>> All,
>> 
>> We have just posted Java SE 6 for PPC and Intel and SWT
>> Compatibilty Libraries to http://connect.apple.com
>> 
>> alan
>> 
>> Java SE 6.0 Release 1 Developer Preview 2
>> Java SE 6 Release 1 is based on JDK 1.6.0_b82 and brings enhanced
>> functionality to the Java SE platform on Mac OS X v10.4 Tiger. This
>> preview includes a universal installer which supports both Intel-
>> based and PowerPC-based Macintosh computers and is not removable.
>> Please see the release notes for more information. This is
>> Developer Preview 2 of Java SE 6.0 Release 1 for Mac OS X Tiger
>> 
>> 
>> SWT Compatibility Libraries for J2SE 5.0 Release 4
>> The SWT Compatibility Libraries address compatibility issues
>> between J2SE 5.0 Release 4 and the SWT_AWT bridge in Eclipse 3.2RC3
>> and later on Mac OS X Tiger. See the Eclipse Javadoc for details on
>> how to use this library in your SWT application. The SWT
>> Compatibility Libraries do not replace any existing Java
>> installations and are not compatible with Java releases prior to
>> J2SE 5.0 Release 4 for Tiger.
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Java-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/java-dev/email@hidden
> 
> This email sent to email@hidden
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Ann: Java SE 6 for PPC and Intel and SWT Compatibilty Libraries now available! (From: Henry Story <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.