GithubHelp home page GithubHelp logo

warriordog / jwmi Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 2.0 54 KB

Java bindings for the Windows Management Interface

License: MIT License

Batchfile 2.28% C++ 15.46% C 0.26% Java 82.00%
hacktoberfest

jwmi's Introduction

jWMI - java bindings for the Windows Management Interface

Introduction

jWMI is a library that provides Java bindings for the Windows Management Interface (WMI). It allows access to WMI objects without the need to write any native code.

jWMI is made of two parts:

  1. A small C++ DLL that handles COM communications and wraps the C++ COM methods in C-compatible functions.
  2. Java bindings that use Java Native Access to dynamically load the native library and create Java objects that map to native WMI objects.

Currently jWMI implements only a small subset of the WMI library, and many method arguments are hard-coded (to simplify usage on the java side). Over time the library will be expanded to cover all WMI functions and possibly expose flag arguments to allow fine-grained control.

Compiling

For now jWMI must be built on windows due to most cross-compilers not supporting WMI.

Prerequisites:
  • JDK 8 or newer. OpenJDK is untested but should work.
  • Microsoft Visual Studio OR Microsoft Visual C++ Build Tools 2015 or newer. Older versions may work but are untested.
  • Maven 3
Steps:
  1. Clone or download the repository to an accessible place
  2. Navigate to the repository root (in File Explorer or CMD)
  3. Run make.bat
  4. jWMI JAR will be created in .\target\jwmi-X.X.X.jar and installed into local maven repository.
Building on other platforms:

Currently, the native component of jWMI must be built on Windows due to a lack of WMI support in all tested cross-compilers. But the Java components can be built on any platform as long as libwmi.dll is built on Windows and placed into the correct location.

Platform Location
x86 <root>\res\win32-x86\libwmi.dll
x86_64 <root>\res\win32-x86-64\libwmi.dll

Once the DLL is placed in the correct location, jWMI can be built on any platform using maven as follows:

# To build and install into local repository
mvn clean install

# To build and create a JAR
mvn clean package

# To build, create a JAR, and install into local repository
mvn clean package install

jwmi's People

Contributors

warriordog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

root0109 gogi9583

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.