1 Reply Latest reply: May 12, 2010 2:28 AM by 843849 RSS

    CDC compiling problem

    843849
      I am compiling CDC source code (j2me_cdc_fp-1_0_2-src.zip) 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/PolicyFile.java:478: 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/ObjectStreamClass.java:245: 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
          Did you find a solution to this? I'm having a similar problem when attempting to use .class in a JavaME MIDlet.

          Thanks,

          Chris.


          code:

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


          error:

          C:/j2sdk1.4.2_09/bin/javac -source 1.4 -target 1.4 -O -bootclasspath "c:\Program Files\Siemens\SMTK\XT75\WTK\lib\classes.zip" -d tmpclasses `find com -name "*.java"`
          com/thorcom/protocol/AVLProtocol.java:120: 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