本文整理汇总了Java中sun.rmi.rmic.BatchEnvironment类的典型用法代码示例。如果您正苦于以下问题:Java BatchEnvironment类的具体用法?Java BatchEnvironment怎么用?Java BatchEnvironment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BatchEnvironment类属于sun.rmi.rmic包,在下文中一共展示了BatchEnvironment类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import sun.rmi.rmic.BatchEnvironment; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
String sysPath = "/home/~user/jdk/jre/lib/rt.jar";
String extDir = "";
String clPath = "/home/~user/user.jar" + File.pathSeparator +
"/home/~user/user2.jar" + File.pathSeparator +
"/home/~user/user3.jar";
String cpStr = BatchEnvironment.createClassPath(clPath, sysPath, extDir).toString();
String[] paths = cpStr.split(File.pathSeparator);
if (paths.length != 4) {
throw new Exception("ClassPath length is not correct: the expected length is 4 and the actual length is " + paths.length);
}
}
示例2: exerciseClassDefinition
import sun.rmi.rmic.BatchEnvironment; //导入依赖的package包/类
/**
* Failure is seen when getClassDefinition causes class read
*/
void exerciseClassDefinition() throws Exception {
BatchEnvironment env = new BatchEnvironment(System.out,
BatchEnvironment.createClassPath(testClassPath, null, null),
null);
try {
ClassDeclaration decl = env.getClassDeclaration(
Identifier.lookup(testClassName));
decl.getClassDefinition(env);
} finally {
env.flushErrors();
env.shutdown();
}
}
示例3: main
import sun.rmi.rmic.BatchEnvironment; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
String sysPath = SRC_PATH + "/jdk/jre/lib/rt.jar";
String clPath = SRC_PATH + "/user.jar" + File.pathSeparator +
SRC_PATH + "/user2.jar" + File.pathSeparator +
SRC_PATH + "/user3.jar";
String cpStr = BatchEnvironment.createClassPath(clPath, sysPath).toString();
String[] paths = cpStr.split(File.pathSeparator);
if (paths.length != 4) {
throw new Exception("ClassPath length is not correct: the expected length is 4 and the actual length is " + paths.length);
}
}
示例4: exerciseClassDefinition
import sun.rmi.rmic.BatchEnvironment; //导入依赖的package包/类
/**
* Failure is seen when getClassDefinition causes class read
*/
void exerciseClassDefinition() throws Exception {
BatchEnvironment env = new BatchEnvironment(System.out,
BatchEnvironment.createClassPath(testClassPath, null),
null);
try {
ClassDeclaration decl = env.getClassDeclaration(
Identifier.lookup(testClassName));
decl.getClassDefinition(env);
} finally {
env.flushErrors();
env.shutdown();
}
}