Skip to main content

GCI classes are not available + demos don't work

10 replies [Last post]
egoelema
Offline
Joined: 2006-11-16
Points: 0

Hi,

I've been trying to build (latest) PhoneME Advanced, Personal Profile with MIDP and Jump implementation for arm-linux target. Building is succesful, but following build warning makes me think that something's wrong:

==== start building jump impl's
[echo] WARNING: GCI classes are not available, windowing module will not work!

BUILD SUCCESSFUL
Total time: 13 seconds
==== done building jump implementation

I used AWT_IMPLEMENTATION=peers_based and AWT_PEERSET=qt. Any idea what the consequence of this warning is and how this can be resolved? Using the build parameter USE_GCI=true results in:

../share/defs_gci.mk:65: src/phoneme/gci/build/share/defs.mk: No such file or directory

Running the tests on the target machine result in "*CONGRATULATIONS: test Test completed with 411 tests passed and 0 failures". So far so good, but apart from the above warning, I'm unable to run any of the demos. For instances following command on the target machine:

cvm -cp ./democlasses.jar cdc.HelloWorld

results in:

java.lang.ClassNotFoundException: cdc.HelloWorld
at sun.misc.Launcher$4.run(Unknown Source)
at java.security.AccessController.doPriviliged(Unknown Source)
at java.security.AccessController.doPriviliged(Unknown Source)
at sun.misc.Launcher$AppClassLoader.doClassFind(Unknown Source)
at sun.misc.Launcher$AppClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.mischLauncher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)
Caused by: java.io.IOException: invalid header field
at java.util.jar.Attributes.read(unknown Source)
at java.util.jar.Manifest.read(Unknown Source)
at java.util.jar.Manifest.(Unknown Source)
at java.util.jar.JarFile.getManifest(Unknown Source)
at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Unknown Source)
at sun.misc.Launcher$AppClassLoader.access$500(Unknown Source)
... 9 more

Any ideas?

Thanks in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cjplummer
Offline
Joined: 2006-10-16
Points: 0

>
> cvm -cp ./democlasses.jar cdc.HelloWorld
>
> results in:
>
> java.lang.ClassNotFoundException: cdc.HelloWorld
> at sun.misc.Launcher$4.run(Unknown Source)

From the above command I'm assuming the current directory is the cdc bin directory, in which case you should be using ../democlasses.jar, not ./democlasses.jar.

Chris

egoelema
Offline
Joined: 2006-11-16
Points: 0

Chris,

I've installed PhoneME in /usr/java and the exact command executed was:

bin/cvm -cp ./democlasses.jar cdc.HelloWorld

I've tried building with JAVAC_OPTIONS="-source 1.4 -target 1.4" because of the "java.io.IOException: Invalid header field" error, unfortunately with the same result.

I may be wrong, but could this relate to some invalid attribute in the manifest header of the JAR file somehow?

Any ideas left?

Thanks in advance

cjplummer
Offline
Joined: 2006-10-16
Points: 0

Can you email me your democlasses.jar?

Chris

egoelema
Offline
Joined: 2006-11-16
Points: 0

I've just emailed you the democlasses.jar

cjplummer
Offline
Joined: 2006-10-16
Points: 0

Looks like Copyright section of the Manifest is broken. This happened in revision 2956. Until it is fixed, you can just manually edit the MANIFEST.MF files and remove everything but the last two lines:

cdc/src/share/basis/demo/META-INF/MANIFEST.MF
cdc/src/share/personal/demo/META-INF/MANIFEST.MF

Chris

egoelema
Offline
Joined: 2006-11-16
Points: 0

Chris, works like a charm.
Thanks a lot!!

alexey_semenyuk
Offline
Joined: 2006-10-20
Points: 0

Hi egoelema,

The "WARNING: GCI classes are not available, windowing module will not work!" warning indicates that jump windowing module will be compiled but will not work as expected.

This should not affect Personal Profile build.

Unfortunately you can't use USE_GCI=true option to enable GCI classes as they reside in commercial repository only. More over they are not targeted to be used with Personal Profile build. So USE_GCI=true option is absolutely useless in you case.

The error you get running "cvm -cp ./democlasses.jar cdc.HelloWorld" command is very likely to be affected by some other reason.

Thanks,
Alexey

egoelema
Offline
Joined: 2006-11-16
Points: 0

alexey,

The GCI warning still confuses me. Although I build with USE_GCI=false, it still warns me about the non-working windowing module. Somehow this gives me the idea that GCI sources are required anyway. Looking at some of the MIDP code GCI has everything to do with drawing on the screen surface. Will this still work as expected?

Another question then, does directfb-code also reside in the commercial repository, since building with USE_DIRECTFB=true also ends up with lots of "No such file or directory" messages.

Thanks!

PS: I'm a little surprised that there still is a commercial repository. I thought this was a 100% open source project ;-)

alexey_semenyuk
Offline
Joined: 2006-10-20
Points: 0

> The GCI warning still confuses me. Although I build with USE_GCI=false, it still warns me about the non-working windowing module. Somehow this gives me the idea that GCI sources are required anyway. Looking at some of the MIDP code GCI has everything to do with drawing on the screen surface. Will this still work as expected?
Don't wary about the warning. You are building personal profile, right? So this warning doesn't affect this configuration.

Frankly to say I'm not sure if somebody ever tried to build such a configuration (MIDP+Personal profile), so I'm not sure it will work out of the box.

> Another question then, does directfb-code also reside in the commercial repository
GCI classes define the porting layer for java.awt.* classes of the Personal Basis Profile. There are several implementations of the GCI interface on different platforms. One of such implementations is based on DirectFB library. As GCI itself lives in commercial repository all its implementations also live in commercial repository. So you are right, directfb-code resides in the commercial repo.

> PS: I'm a little surprised that there still is a commercial repository.
That is right. We have some functional blocks in commercial repo. But they all have corresponding alternatives in public repo. Instead of GCI-based graphics one can use Qt-based graphics block.

So set USE_GCI=false, USE_DIRECTFB=false and don't wary about the warning you observed.

Thanks,
Alexey

egoelema
Offline
Joined: 2006-11-16
Points: 0

Alexey,

I wasn't aware that MIDP+Personal Profile is such a strange configuration. The idea behind it was for me to have a JVM that is as complete as possibly can be. The target device (a Sharp Zaurus) should be able to cope with MIDP as well as PP, so why not.

After applying the MANIFEST patch (thanks Chris), all demos seems to work fine so far. Maybe it's a good idea to add another supported platform to the Wiki (Sharp Zaurus running pdaXrom) and include full build instructions for CDC+MIDP+Personal Profile.

Thanks for your explanation of the GCI and directfb parameters.