SWT Win32 Extension

Source: Internet
Author: User

SWT Win32 extension is a Native WIN32 extension of the eclipse class library SWT.

 

This project provides a software development tool library that allows you to use Java to develop Native Windows applications without writing additional JNI code.

With SWT Win32 extension, you do not need to create a native dynamic link library to call the system API or method of the dynamic link library of the operating system.

You only need to write Java code, and SWT Win32 extension is responsible for the rest.

SWT Win32 extension provides a series of functions that make your application look like a Win32 local program.

  1. Window decoration function: Provides window top, transparency, flashing, and other functions.
  2. Custom window: Create an irregular window.
  3. Access the Windows registry.
  4. System Folder: Get the path and icon of the system special file.
  5. System shortcut: Management System shortcut.
  6. System Information: collect information about the CPU, memory, and environment variables of the system.
  7. System session: provides functions such as shutdown, sleep, restart, and logout.
  8. System Io and network functions: provides disk and network information.
  9. Active Desktop: Manage Windows Active Desktop.
  10. System HOOK: registers and unmounts system hooks to intercept and process system events.
  11. Window System Menu: Manage Window menu.
  12. You can customize system menus and process menu events.
  13. OLE Control: Provides encapsulation of some common controls, such as flash.

It is worth mentioning that you can access all the functions provided by SWT, because SWT Win32 extension is derived from SWT.

 

 

Example code:

Java code
  1. Import org. SF. Feeling. SWT. win32.internal. extension. extension;
  2. Public class systeminfo {
  3. /**
  4. * @ Param ARGs
  5. */
  6. Public static void main (string [] ARGs ){
  7. Extension extension = new extension ();
  8. System. Out. println ("computer name:" + extension. getcomputername ());
  9. System. Out. println ("system Logon account:" + extension. GetUserName ());
  10. System. Out. println ("system CPU No.:" + extension. getcpuid ());
  11. System. Out. println ("system Mac No.:" + extension. getmacid ());
  12. }
  13. }

 

 

Note that to make the program run smoothly, java_home/bin must be imported to the swt-extension-win32.dll file, since the file is downloaded there are three DLL files, there are two swt-gdip-win32.dll and swt-win32.dll, if you import all of them into the results, this exception will be thrown.
Exception in thread "Main" Java. Lang. unsatisfiedlinkerror: org. Eclipse. SWT. Internal. C. ptr_sizeof () I
At org. Eclipse. SWT. Internal. C. ptr_sizeof (native method)
At org. Eclipse. SWT. Internal. C. <clinit> (C. Java: 24)
At com. hengte. example. systeminfo. Main (systeminfo. Java: 10)

This exception occurs because the DLL file cannot be found or multiple DLL file conflicts, remove other DLL files as long as the import swt-extension-win32.dll, run, this is the result of the console printing:
Name: XP-200901051818
System Logon account: Administrator
System CPU No.: BFEBFBFF00010676-0000000000000000
System Mac No.: [I @ 3 ecfff

 

 

Project address:Http://feeling.sourceforge.net /? Language = ZH-CN

Eclipse plug-in Update site URL: http://feeling.sourceforge.net/update

Download
SWT Win32 extension (build v2008.12.04)

Download
SWT Win32 extension example plug-in (eclipse 3.2 or later)

Download
SWT Win32 extension local sample program (exe program, no need to install JRE)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.