この回答によると、Java 7 には Windows メタデータを操作するネイティブ機能がありますが、Java 6 にはありません。
Java Native Access (JNA) を使用してネイティブ DLL を呼び出すことができると書かれています。つまり、 dsofile.dllを使用してメタデータを操作できるはずです。JNA を使用して msvcrt.dll から「puts」関数にアクセスする例( dsofile.dllに固有の例は見つかりませんでした):
インターフェース
package CInterface;
import com.sun.jna.Library;
public interface CInterface extends Library
{
public int puts(String str);
}
サンプルクラス
// JNA Demo. Scriptol.com
package CInterface;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Platform;
public class hello
{
public static void main(String[] args)
{
String mytext = "Hello World!";
if (args.length != 1)
{
System.err.println("You can enter your own text between quotes...");
System.err.println("Syntax: java -jar /jna/dist/demo.jar \"myowntext\"");
}
else
mytext = args[0];
// Library is c for unix and msvcrt for windows
String libName = "c";
if (System.getProperty("os.name").contains("Windows"))
{
libName = "msvcrt";
}
// Loading dynamically the library
CInterface demo = (CInterface) Native.loadLibrary(libName, CInterface.class);
demo.puts(mytext);
}
}