当前位置: 首页>>代码示例>>Java>>正文


Java ClassPath类代码示例

本文整理汇总了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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:Main.java

示例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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:Main.java

示例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;
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:23,代码来源:Main.java

示例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;
}
 
开发者ID:greghaskins,项目名称:openjdk-jdk7u-jdk,代码行数:24,代码来源:Main.java

示例5: ClassPathLoader

import sun.tools.java.ClassPath; //导入依赖的package包/类
public ClassPathLoader(ClassPath classPath) {
    this.classPath = classPath;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:ClassPathLoader.java

示例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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:46,代码来源:BatchEnvironment.java

示例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];
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:BatchEnvironment.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:BatchEnvironment.java

示例9: getClassPath

import sun.tools.java.ClassPath; //导入依赖的package包/类
/**
 * Get the ClassPath.
 */
public ClassPath getClassPath() {
    return binaryPath;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:BatchEnvironment.java

示例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];
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:BatchEnvironment.java


注:本文中的sun.tools.java.ClassPath类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。