Orangevolt Native

Use this components to access windows stuff

Usage

If you use maven youre in luck. Just add the following two dependencies to your dependencies.

  <dependencies>
    ...
    <dependency>
      <groupId>net.sf.ovanttasks.ov-native</groupId>
      <artifactId>ov-native-java</artifactId>
      <version>1.5-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>net.sf.ovanttasks.ov-native</groupId>
      <artifactId>ov-native-win32</artifactId>
      <version>1.5-SNAPSHOT</version>
      <type>dll</type>
    </dependency>
    ...
  </dependencies>

To use and distribute the dll in your jar, please add the following line to your pom.xml.

  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy</id>
            <phase>compile</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>net.sf.ovanttasks.ov-native</groupId>
                  <artifactId>ov-native-win32</artifactId>
                  <version>1.5-SNAPSHOT</version>
                  <type>dll</type>
                  <overWrite>true</overWrite>
                  <outputDirectory>/target/classes/</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
  </build>

If you use any other build system, include the jar and dll into your project.

Component Overview

  • LnkFile: This componenet creates a shortcut (javadoc). an Example can be found here code.java.
    LnkFile encapsulates the binary Windows Shortcut files (file suffix is .lnk). Shortcut files are used to create Desktop shortcuts, Internet Explorer Favorites, SendTo menu entries, Program menu entries and many more. The binary Windows Shortcut files implemented in this class are much more flexible than the text based Windows Shortcut files supported by apidocs/net/sf/ovanttasks/ovnative/win32/LnkFile/LnkFile.html

References

  • MINGW
  • Cygwin
  • JNI SUN
  • JNI BOOK
  • URL File Guide