本文整理汇总了Java中sun.tools.java.ClassPath类的典型用法代码示例。如果您正苦于以下问题:Java ClassPath类的具体用法?Java ClassPath怎么用?Java ClassPath使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClassPath类属于sun.tools.java包,在下文中一共展示了ClassPath类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEnv
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Get the correct type of BatchEnvironment
*/
public BatchEnvironment getEnv() {
ClassPath classPath =
BatchEnvironment.createClassPath(classPathString,
sysClassPathArg,
extDirsArg);
BatchEnvironment result = null;
try {
Class<?>[] ctorArgTypes = {OutputStream.class,ClassPath.class,Main.class};
Object[] ctorArgs = {out,classPath,this};
Constructor<? extends BatchEnvironment> constructor =
environmentClass.getConstructor(ctorArgTypes);
result = constructor.newInstance(ctorArgs);
result.reset();
}
catch (Exception e) {
error("rmic.cannot.instantiate",environmentClass.getName());
}
return result;
}
示例2: getEnv
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Get the correct type of BatchEnvironment
*/
public BatchEnvironment getEnv() {
ClassPath classPath =
BatchEnvironment.createClassPath(classPathString,
sysClassPathArg);
BatchEnvironment result = null;
try {
Class<?>[] ctorArgTypes = {OutputStream.class,ClassPath.class,Main.class};
Object[] ctorArgs = {out,classPath,this};
Constructor<? extends BatchEnvironment> constructor =
environmentClass.getConstructor(ctorArgTypes);
result = constructor.newInstance(ctorArgs);
result.reset();
}
catch (Exception e) {
error("rmic.cannot.instantiate",environmentClass.getName());
}
return result;
}
示例3: getEnv
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Get the correct type of BatchEnvironment
*/
public BatchEnvironment getEnv() {
ClassPath classPath =
BatchEnvironment.createClassPath(classPathString,
sysClassPathArg,
extDirsArg);
BatchEnvironment result = null;
try {
Class[] ctorArgTypes = {OutputStream.class,ClassPath.class,Main.class};
Object[] ctorArgs = {out,classPath,this};
Constructor constructor = environmentClass.getConstructor(ctorArgTypes);
result = (BatchEnvironment) constructor.newInstance(ctorArgs);
result.reset();
}
catch (Exception e) {
error("rmic.cannot.instantiate",environmentClass.getName());
}
return result;
}
示例4: getEnv
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Get the correct type of BatchEnvironment
*/
public BatchEnvironment getEnv() {
ClassPath classPath =
BatchEnvironment.createClassPath(classPathString,
sysClassPathArg,
extDirsArg);
BatchEnvironment result = null;
try {
Class[] ctorArgTypes = {OutputStream.class,ClassPath.class,Main.class};
Object[] ctorArgs = {out,classPath,this};
Constructor<? extends BatchEnvironment> constructor =
environmentClass.getConstructor(ctorArgTypes);
result = constructor.newInstance(ctorArgs);
result.reset();
}
catch (Exception e) {
error("rmic.cannot.instantiate",environmentClass.getName());
}
return result;
}
示例5: ClassPathLoader
import sun.tools.java.ClassPath; //导入依赖的package包/类
public ClassPathLoader(ClassPath classPath) {
this.classPath = classPath;
}
示例6: BatchEnvironment
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Create a BatchEnvironment for rmic with the given class path,
* stream for messages and Main.
*/
public BatchEnvironment(OutputStream out, ClassPath path, Main main) {
super(out,path,main);
// Make sure we have our definitions...
try {
defRemote =
getClassDeclaration(idRemote).getClassDefinition(this);
defError =
getClassDeclaration(idJavaLangError).getClassDefinition(this);
defException =
getClassDeclaration(idJavaLangException).getClassDefinition(this);
defRemoteException =
getClassDeclaration(idRemoteException).getClassDefinition(this);
defCorbaObject =
getClassDeclaration(idCorbaObject).getClassDefinition(this);
defSerializable =
getClassDeclaration(idJavaIoSerializable).getClassDefinition(this);
defRuntimeException =
getClassDeclaration(idJavaLangRuntimeException).getClassDefinition(this);
defExternalizable =
getClassDeclaration(idJavaIoExternalizable).getClassDefinition(this);
defThrowable=
getClassDeclaration(idJavaLangThrowable).getClassDefinition(this);
defIDLEntity=
getClassDeclaration(idIDLEntity).getClassDefinition(this);
defValueBase=
getClassDeclaration(idValueBase).getClassDefinition(this);
typeRemoteException = defRemoteException.getClassDeclaration().getType();
typeException = defException.getClassDeclaration().getType();
typeIOException = getClassDeclaration(idJavaIoIOException).getType();
typeThrowable = getClassDeclaration(idJavaLangThrowable).getType();
classPathLoader = new ClassPathLoader(path);
} catch (ClassNotFound e) {
error(0, "rmic.class.not.found", e.name);
throw new Error();
}
}
示例7: createClassPath
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Create a ClassPath object for rmic from a class path string.
*/
public static ClassPath createClassPath(String classPathString) {
ClassPath[] paths = classPaths(null, classPathString, null, null);
return paths[1];
}
示例8: BatchEnvironment
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Create a BatchEnvironment for rmic with the given class path,
* stream for messages and Main.
*/
public BatchEnvironment(OutputStream out, ClassPath path, Main main) {
super(out, new ClassPath(""), path);
// use empty "sourcePath" (see 4666958)
this.main = main;
}
示例9: getClassPath
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Get the ClassPath.
*/
public ClassPath getClassPath() {
return binaryPath;
}
示例10: createClassPath
import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
* Create a ClassPath object for rmic from a class path string.
*/
public static ClassPath createClassPath(String classPathString) {
ClassPath[] paths = classPaths(null, classPathString, null);
return paths[1];
}