UWin Java Library For Windows

(Download From Sourceforge)


The UWin library contains classes for carrying out common Microsoft Windows related functions which are not possible, or hard to do using pure Java classes. Currently we support Windows Registry operations, such as creating, reading, writing, or deleting registry keys and values, and information function that allow you to get various parameters relating to system memory (RAM) or disk drives. We aim to add further functionality as Windows specific features are requested.

There's no 100% Java here; by definition, this project covers areas that are Microsoft Windows specific, and not covered (either at all, or very well) by the Sun java classes, or other pure-Java libraries. Most classes in this library use JNI to call down to C code that uses the Windows API to do the actual work.

Accessing the Windows registry and getting information on a machine's installed RAM and disk drives are important operations which (since they are Microsoft specific) are not supported by either Sun or other Java libraries. By using this library, developers do give up some OS independence, but gain access to important features of the OS on which the majority of application software runs today.

Registry Functions:

The RegFolder class treats any key in the registry as a folder (or directory), and allows reading, writing, and enumeration of values, or nested keys (folders).Storage and retrieval of integers, Strings, and binary objects are supported.

Memory (RAM) Functions

To get information about installed RAM, free RAM, virtual memory and other parameters, use the org.uwin.sysinfo.SystemMemoryInfo class. Construct an instance of this class, then use the bean-style accessors, such as getTotalPhys() or getAvailPhys() to get the amount of installed and available physical memory.

Disk Functions

Unlike unix volumes, mounted on a single root, Windows drives are independently rooted. The number of drives can change as network drives are logged on etc. The DiskSpaceInfo class allows you to monitor available drives, and fetch parameters such as size, free space, and current user's quota, on each drive.