您的位置:首页 > 其它

IKVM.NET_第七篇_用户指南_工具ikvmstub.exe

2010-07-04 15:59 323 查看
ikvmstub.exe工具是从.NET装配(DLL)生成Java存根(stub),本文主要内容如下:
1) 用法
2) 备注
3) 例子
+++ 用法
ikvmstub assemblyNameOrPath
assemblyNameOrPath是一个装配的名字。可以规定装配的路径。
+++ 备注
ikvmstub应用程序读取你规定的装配文件,并产生一个包含Java接口和存根(stub)的Java jar文件。这个工具使用下面方法来搜索装配文件:
首先,ikvmstub从它默认的装载环境加载装配文件。通常它会搜索全局装配缓冲区(GAC)。如果没有在默认环境找到,并且规定了路径,ikvmstub将搜索指定的路径或当前目录。
+++ 例子
ikvmstub mscorlib.dll
这个命令将生成mscorlib.jar文件,该文件包含mscorlib.dll中定义的类和接口等的存根(stub)。
ikvmstub c:/lib/mylib.dll
而这个命令将生成mylib.jar 文件,该文件包含c:/lib/mylib.dll 中定义的类和接口等的存根(stub)。

IKVM.NET Stub Generator (ikvmstub.exe)
The ikvmstub tool generates Java stubs from .NET assemblies.
1) Usage
2) Notes
3) Examples
+++ Usage
ikvmstub assemblyNameOrPath
assemblyNameOrPath
Name of an assembly. May be a fully-qualified path.
+++ Notes
++ ikvmstub reads the specified assembly and generates a Java jar file containing Java interfaces and stub classes. For more information about the generated stubs, see the Developer's Guide.
The tool uses the following algorithm to locate the assembly:
+ First it attempts to load the assembly from the default load context of ikvmstub.exe. For practical purposes, this usually means it searches the Global Assembly Cache.
+ If not found in the default load context, ikvmstub looks for the assembly at the indicated path (or the current directory, if no path is supplied).
+++ Examples
ikvmstub mscorlib.dll
+ Generates mscorlib.jar, containing stubs for classes, interfaces, etc., defined in mscorlib.dll.
ikvmstub c:/lib/mylib.dll
+ Generates mylib.jar, containing stubs for classes, interfaces, etc., defined in c:/lib/mylib.dll.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: