当前位置: 代码迷 >> J2EE >> 编译openJDK出错,求大神指导!
  详细解决方案

编译openJDK出错,求大神指导!

热度:85   发布时间:2016-04-17 23:05:26.0
编译openJDK报错,求大神指导!!!
最近想学习下《深入理解Java虚拟机 JVM高级特性与最佳实践》  看看jdk源码和JVM,但是在ubuntu系统编译openJDK报错,不知道哪位大神遇到过,或者有解决办法。报错如下,感觉就是第一句error: warnings found and -Werror specified 引起,但是不知道在哪里改这个配置

...................(省略前部分)
error: warnings found and -Werror specified
../../../../src/share/classes/java/rmi/MarshalledObject.java:159: warning: [unchecked] unchecked cast
        T obj = (T) in.readObject();
                                 ^
  required: T
  found:    Object
  where T is a type-variable:
    T extends Object declared in class MarshalledObject
../../../../src/share/classes/java/rmi/MarshalledObject.java:193: warning: [rawtypes] found raw type: MarshalledObject
            MarshalledObject other = (MarshalledObject) obj;
            ^
  missing type arguments for generic class MarshalledObject<T>
  where T is a type-variable:
    T extends Object declared in class MarshalledObject
../../../../src/share/classes/java/rmi/server/RemoteObject.java:439: warning: [rawtypes] found raw type: Class
            Class refClass = Class.forName(internalRefClassName);
 
............
(中间省略若干行类似代码)
 .............
  missing type arguments for generic class Class<T>
  where T is a type-variable:
    T extends Object declared in class Class
../../../../src/share/classes/java/util/logging/LogManager.java:1322: warning: [rawtypes] found raw type: Class
                Class clz = ClassLoader.getSystemClassLoader().loadClass(val);
                ^
  missing type arguments for generic class Class<T>
  where T is a type-variable:
    T extends Object declared in class Class
../../../../src/share/classes/java/beans/PropertyChangeSupport.java:463: warning: [unchecked] unchecked cast
        Hashtable<String, PropertyChangeSupport> children = (Hashtable<String, PropertyChangeSupport>) fields.get("children", null);
                                                                                                                 ^
  required: Hashtable<String,PropertyChangeSupport>
  found:    Object
../../../../src/share/classes/sun/rmi/server/ActivatableRef.java:333: warning: [deprecation] done(RemoteCall) in RemoteRef has been deprecated
    public void done(RemoteCall call) throws RemoteException {
                ^
../../../../src/share/classes/sun/rmi/server/ActivatableRef.java:324: warning: [deprecation] invoke(RemoteCall) in RemoteRef has been deprecated
    public void invoke(RemoteCall call) throws Exception
                ^
Note: Some input files additionally use or override a deprecated API.
1 error
100 warnings
make[6]: *** [.compile.classlist] Error 1
make[6]: Leaving directory `/opt/openjdk/jdk/make/sun/rmi/rmi'
make[5]: *** [all] Error 1
make[5]: Leaving directory `/opt/openjdk/jdk/make/sun/rmi'
make[4]: *** [all] Error 1
make[4]: Leaving directory `/opt/openjdk/jdk/make/sun'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/opt/openjdk/jdk/make'
make[2]: *** [jdk-build] Error 2
make[2]: Leaving directory `/opt/openjdk'
make[1]: *** [generic_debug_build] Error 2
make[1]: Leaving directory `/opt/openjdk'
make: *** [build_debug_image] Error 2

------解决思路----------------------
没得大神,只有我这个菜鸟