| Reply | « Previous Thread | Next Thread » |
|
Hi at all,
Recently I did a porting of some libraries on JME platform. Then I wrote some MIDlets that use these libraries and I tried them with success on the smartphone emulator of J2ME Wireless Toolkit. Now I'd like trying my MIDlets on a Nokia smartphone like E61 with S60 3rd Edition platform. So I've used Carbide.J and Eclipse to rebuilding my projects. But I've found that ".class" literal causes the following error: Error preverifying class prova.ProvaMidlet VERIFIER ERROR prova/ProvaMidlet.startApp()V: Illegal type in constant pool I think this error is produced when I pass the value of .class literal as argument of a method. For example the snippet at the end of this email causes that error too. My question is: is that a bug of S60 Series SDK? Is there a way to avoid that error and building a jar of my midlet? Thanks in advance. Snippet: ---------------------------------------------------------------- package prova; import javax.microedition.midlet.*; public class ProvaMidlet extends MIDlet { public ProvaMidlet() { } protected void destroyApp( boolean p1 ) throws MIDletStateChangeException { } protected void startApp( ) throws MIDletStateChangeException { System.out.println("Class name " + getClassName(ProvaMidlet.class)); } protected void pauseApp( ) { } public String getClassName(Class aClass) { return aClass.getName(); } } --------------------------------------------------------------- |
| davidefais |
| View Public Profile |
| Find all posts by davidefais |
|
Join Date: Aug 2006
Posts: 486
Location: Rawalpindi, Pakistan
nicenouman
Offline
Regular Contributor
|
|
hi davidfias
preverifying error usually occurs when u r using floating values in your code and ur using cldc 1.0. since ur talking about S60 third edition phones they r i assume all of them have cldc 1.1 in them which supports floating point values. i would suggest check ur eclipse tool settings and see when ur tool preverifies ur class code is it doing it with cldc1.1 or cldc 1.0. the settings is usually in the tool. i havent used eclipse so dont know where it will be. Regards Nouman |
| nicenouman |
| View Public Profile |
| Find all posts by nicenouman |
|
I've checked: I'm using CLDC 1.1.
Thanks. |
| davidefais |
| View Public Profile |
| Find all posts by davidefais |
|
Does anyone have any other idea that can help me?
|
| davidefais |
| View Public Profile |
| Find all posts by davidefais |
|
Ignore it. When it works in Sun’s Wireless Toolkit, just run that JAR in the emulator directly or is there any reason to build a special version for Nokia? Even then there is no need to use the Nokia tools.
Not sure about that code, I guess you have a reason, however just for sure: this.getClass().getName()? |
|
I've tried to run midlet builded with Sun WTK on the smartphone Nokia E61 and I obtain an error like "Exception not catched", while midlet runs correctly on Sun WTK Emulator.
About the snippet in previous message, it's only a example that causes the same preverifying error. Actually I have a library for J2ME that uses many times literal ".class", for example to build a table of supported functions. If ".class" literal is not supported by nokia runtime, I have to change a lot of code. Traud, thanks of your attention. |
| davidefais |
| View Public Profile |
| Find all posts by davidefais |
|
Just out of curiosity as this is neither an answer nor a solution to your question: How do you create function-tables in CLDC? I failed so far.
|
|
Sorry, maybe I didn't make my explanation clear.
The library tries to implement xpath language. I have a class for each xpath function, and all classes implements a specific interface. All these classes are collected statically in arrays or vectors in order to create a sort of table. |
| davidefais |
| View Public Profile |
| Find all posts by davidefais |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Parsing file content | hendrawan.ashari | General Symbian C++ | 7 | 2007-03-09 11:41 |
| preverifying error | sachinwarang | Mobile Java General | 4 | 2006-04-19 10:10 |
| 新手求救!錯誤訊息! | wgarnett | Symbian | 2 | 2005-09-26 03:21 |
| Building | pacman2000z | Symbian Tools & SDKs | 0 | 2003-07-17 11:44 |
| error LNK2001: unresolved external symbol | tondevold | General Symbian C++ | 2 | 2003-02-26 01:25 |