This discussion is archived
1 Reply Latest reply: May 12, 2010 2:28 AM by 843849 RSS

CDC compiling problem

843849 Newbie
Currently Being Moderated
I am compiling CDC source code ( downloaded from sun java website in Ubuntu Linux. But now I have problem to pass it.

I have jdk1.6.0_03 installed in my Ubuntu. When I start to compile this package, I got 24 errors like this

+../../src/share/classes/sun/security/provider/ as of release 5, 'enum' is a keyword, and may not be used as an identifier+
+(use -source 1.4 or lower to use 'enum' as an identifier)+
+ (PolicyParser.PermissionEntry) enum.nextElement();+

I changed javac command option to add -source 1.4. Unfortunately I got new error like this

+../../src/share/classes/java/io/ cannot find symbol+
symbol  : method initCause(java.lang.ClassNotFoundException)
location: class java.lang.NoClassDefFoundError
+     if (!(all || Serializable.class.isAssignableFrom(cl))) {+
+     ^+
Fatal Error: Unable to find method initCause

Do I need to rewind to jdk1.4? Please show me way on this. Thanks in advance!
  • 1. Re: CDC compiling problem
    843849 Newbie
    Currently Being Moderated
    Did you find a solution to this? I'm having a similar problem when attempting to use .class in a JavaME MIDlet.




    metaManager.getBusManager().subscribe(this, ShutdownMessage.class);


    C:/j2sdk1.4.2_09/bin/javac -source 1.4 -target 1.4 -O -bootclasspath "c:\Program Files\Siemens\SMTK\XT75\WTK\lib\" -d tmpclasses `find com -name "*.java"`
    com/thorcom/protocol/ cannot resolve symbol
    symbol : method initCause (java.lang.ClassNotFoundException)
    location: class java.lang.NoClassDefFoundError
    metaManager.getBusManager().subscribe(this, ShutdownMessage.class);
    Fatal Error: Unable to locate method initCause
    make: *** [tmpclasses] Error 3