下载打开的jdk java文件时javac出现问题

时间:2014-07-01 09:39:35

标签: java javac

我已经下载了OPEN JDK源代码版本(https://jdk7.java.net/source.html)以重建标准doclet。我尝试编译标准doclet(com.sun.toool.doclets.standard.Standard.java),但javac工具以26个错误和8个警告结束。

Javac工具的使用格式为: javac com / sun / tools / doclets / standard / Standard.java 从包含com目录的文件夹(某些/ openjdk / langtools / src / share / classes)。

请你告诉我,我做错了什么?

编辑:这是一个包含完整错误列表的文件:

C:\Users\myself\Desktop\openjdk\langtools\src\share\classes>javac com/sun/tools/doclets/standard/S
tandard.java
.\com\sun\tools\javac\code\Type.java:68: error: Type is not abstract and does not override abstract
method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
public class Type implements PrimitiveType {
       ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:433: error: WildcardType is not abstract and does not override
abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class WildcardType extends Type
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:533: error: ClassType is not abstract and does not override abs
tract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class ClassType extends Type implements DeclaredType {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:747: error: UnionClassType is not abstract and does not overrid
e abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class UnionClassType extends ClassType implements UnionType {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:778: error: ArrayType is not abstract and does not override abs
tract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class ArrayType extends Type
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:862: error: MethodType is not abstract and does not override ab
stract method getReceiverType() in ExecutableType
    public static class MethodType extends Type implements ExecutableType {
                  ^
.\com\sun\tools\javac\code\Type.java:971: error: PackageType is not abstract and does not override a
bstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class PackageType extends Type implements NoType {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:995: error: TypeVar is not abstract and does not override abstr
act method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class TypeVar extends Type implements TypeVariable {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:1111: error: ForAll is not abstract and does not override abstr
act method getReceiverType() in ExecutableType
    public static class ForAll extends DelegatedType implements ExecutableType {
                  ^
.\com\sun\tools\javac\code\Type.java:1247: error: JCNoType is not abstract and does not override abs
tract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    static class JCNoType extends Type implements NoType {
           ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:1268: error: BottomType is not abstract and does not override a
bstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    static class BottomType extends Type implements NullType {
           ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Type.java:1294: error: ErrorType is not abstract and does not override ab
stract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class ErrorType extends ClassType
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Symbol.java:472: error: DelegatedSymbol is not abstract and does not over
ride abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class DelegatedSymbol extends Symbol {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Symbol.java:512: error: TypeSymbol is not abstract and does not override
abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class TypeSymbol
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Symbol.java:625: error: PackageSymbol is not abstract and does not overri
de abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class PackageSymbol extends TypeSymbol
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Symbol.java:702: error: ClassSymbol is not abstract and does not override
 abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class ClassSymbol extends TypeSymbol implements TypeElement {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Symbol.java:903: error: VarSymbol is not abstract and does not override a
bstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class VarSymbol extends Symbol implements VariableElement {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\code\Symbol.java:1029: error: MethodSymbol is not abstract and does not overri
de abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    public static class MethodSymbol extends Symbol implements ExecutableElement {
                  ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\comp\Resolve.java:1622: error: <anonymous com.sun.tools.javac.comp.Resolve$2>
is not abstract and does not override abstract method <A>getAnnotationsByType(Class<A>) in Annotated
Construct
            Symbol errSym = new ResolveError(WRONG_MTH, "diamond error") {
                                                                         ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\comp\Resolve.java:1952: error: Resolve.SymbolNotFoundError is not abstract and
 does not override abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    class SymbolNotFoundError extends ResolveError {
    ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\comp\Resolve.java:2043: error: Resolve.InapplicableSymbolError is not abstract
 and does not override abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    class InapplicableSymbolError extends InvalidSymbolError {
    ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\comp\Resolve.java:2123: error: Resolve.InapplicableSymbolsError is not abstrac
t and does not override abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    class InapplicableSymbolsError extends ResolveError {
    ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\comp\Resolve.java:2227: error: Resolve.AccessError is not abstract and does no
t override abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    class AccessError extends InvalidSymbolError {
    ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\comp\Resolve.java:2288: error: Resolve.StaticError is not abstract and does no
t override abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    class StaticError extends InvalidSymbolError {
    ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\comp\Resolve.java:2315: error: Resolve.AmbiguityError is not abstract and does
 not override abstract method <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
    class AmbiguityError extends InvalidSymbolError {
    ^
  where A is a type-variable:
    A extends Annotation declared in method <A>getAnnotationsByType(Class<A>)
.\com\sun\tools\javac\model\JavacElements.java:61: error: JavacElements is not abstract and does not
 override abstract method isFunctionalInterface(TypeElement) in Elements
public class JavacElements implements Elements {
       ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:86: warning: AnnotationParser is internal prop
rietary API and may be removed in a future release
        return AnnotationParser.annotationForMap(annoType,
               ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:166: warning: ExceptionProxy is internal propr
ietary API and may be removed in a future release
            if (!(value instanceof ExceptionProxy) &&
                                   ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:167: warning: AnnotationType is internal propr
ietary API and may be removed in a future release
                !AnnotationType.invocationHandlerReturnType(returnClass)
                 ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:203: warning: ExceptionProxy is internal propr
ietary API and may be removed in a future release
                        if (value == null || value instanceof ExceptionProxy) {
                                                              ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:227: warning: EnumConstantNotPresentExceptionP
roxy is internal proprietary API and may be removed in a future release
                    value = new EnumConstantNotPresentExceptionProxy(
                                ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:254: warning: ExceptionProxy is internal propr
ietary API and may be removed in a future release
            class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
                                                               ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:278: warning: ExceptionProxy is internal propr
ietary API and may be removed in a future release
    private static final class MirroredTypeExceptionProxy extends ExceptionProxy {
                                                                  ^
.\com\sun\tools\javac\model\AnnotationProxyMaker.java:321: warning: ExceptionProxy is internal propr
ietary API and may be removed in a future release
    private static final class MirroredTypesExceptionProxy extends ExceptionProxy {
                                                                   ^
26 errors
8 warnings

EDIT2:是否有可能将源文件作为项目加载到Netbeans中,以便我可以尝试调试它?

0 个答案:

没有答案