How to add a jar file to the Midlet in MTJ? [message #22335] |
Fri, 14 November 2008 08:39  |
Eclipse User |
|
|
|
Hello,
I am using MTJ and WTK 2.5.2. I have problems adding a jar file to my
midlet suite. I add the jar file to the res folder and I add it to the
build path. However, when I run the midlet it throws a
NoClassDefFoundError.
I have tried also exporting the jar file in the Build Path by checking the
jar file in the order and export option. But then, Eclipse shows errors on
my jar file and in the Problems window I get the following message:
Error preverifying class net.jxta.impl.endpoint.tcp.TcpConnection
jxta-cldc.jar FirstJXTAMidlet/res
Do you know how can I solve this problem?
Thanks in advance,
Fran
|
|
|
Re: How to add a jar file to the Midlet in MTJ? [message #22359 is a reply to message #22335] |
Fri, 14 November 2008 12:03   |
Eclipse User |
|
|
|
hi fran,
the jar file doesn't need to be in the res folder, but you need to add it
to the project build path (Project properties->java build path->Libraries)
after that, you have to mark the jar as exported (Project
properties->java build path->Order and Export).
when you do that, MTJ build will automatically preverify the classes
inside the jar file and include them in the final midlet suite jar.
we are working to make this more "user friendly" :)
if you have issues, please let us know
:)
gep
Francisco wrote:
> Hello,
> I am using MTJ and WTK 2.5.2. I have problems adding a jar file to my
> midlet suite. I add the jar file to the res folder and I add it to the
> build path. However, when I run the midlet it throws a
> NoClassDefFoundError.
> I have tried also exporting the jar file in the Build Path by checking the
> jar file in the order and export option. But then, Eclipse shows errors on
> my jar file and in the Problems window I get the following message:
> Error preverifying class net.jxta.impl.endpoint.tcp.TcpConnection
> jxta-cldc.jar FirstJXTAMidlet/res
> Do you know how can I solve this problem?
> Thanks in advance,
> Fran
|
|
|
|
|
|
|
Re: How to add a jar file to the Midlet in MTJ? [message #22659 is a reply to message #22617] |
Sat, 15 November 2008 19:00  |
Eclipse User |
|
|
|
just did it. hope it works. and if it still doesn't work, please let me
know
:)
gustavo
Francisco wrote:
> Hello Gustavo,
> Can you send me an email to my gmail account and I will send you the jar
> file?
> franmlsr at ...
> Regards,
> Fran
|
|
|
Re: How to add a jar file to the Midlet in MTJ? [message #567874 is a reply to message #22335] |
Fri, 14 November 2008 12:03  |
Eclipse User |
|
|
|
hi fran,
the jar file doesn't need to be in the res folder, but you need to add it
to the project build path (Project properties->java build path->Libraries)
after that, you have to mark the jar as exported (Project
properties->java build path->Order and Export).
when you do that, MTJ build will automatically preverify the classes
inside the jar file and include them in the final midlet suite jar.
we are working to make this more "user friendly" :)
if you have issues, please let us know
:)
gep
Francisco wrote:
> Hello,
> I am using MTJ and WTK 2.5.2. I have problems adding a jar file to my
> midlet suite. I add the jar file to the res folder and I add it to the
> build path. However, when I run the midlet it throws a
> NoClassDefFoundError.
> I have tried also exporting the jar file in the Build Path by checking the
> jar file in the order and export option. But then, Eclipse shows errors on
> my jar file and in the Problems window I get the following message:
> Error preverifying class net.jxta.impl.endpoint.tcp.TcpConnection
> jxta-cldc.jar FirstJXTAMidlet/res
> Do you know how can I solve this problem?
> Thanks in advance,
> Fran
|
|
|
Re: How to add a jar file to the Midlet in MTJ? [message #567926 is a reply to message #22359] |
Fri, 14 November 2008 12:51  |
Eclipse User |
|
|
|
Thanks Gustavo,
But that is what I have tried, but when eclipse preverifies the jar file,
it shows errors on it and the following problem:
Error preverifying class net.jxta.impl.endpoint.tcp.TcpConnection
jxta-cldc.jar
If I don't export it, the error disappear. I have tested the same midlet
using netbeans and importing the jar file and everything works.
I am using the lastest nightly builds, don't know if the problem could be
that...
Do you have any solution?
Regards,
Fran
|
|
|
Re: How to add a jar file to the Midlet in MTJ? [message #567957 is a reply to message #22488] |
Fri, 14 November 2008 14:11  |
Eclipse User |
|
|
|
i'm going to try it here to see if i find any issue with mtj. based on the
error, i assume you are trying the jxta-cldc.jar.
:)
gustavo
Francisco wrote:
> Thanks Gustavo,
> But that is what I have tried, but when eclipse preverifies the jar file,
> it shows errors on it and the following problem:
> Error preverifying class net.jxta.impl.endpoint.tcp.TcpConnection
> jxta-cldc.jar
> If I don't export it, the error disappear. I have tested the same midlet
> using netbeans and importing the jar file and everything works.
> I am using the lastest nightly builds, don't know if the problem could be
> that...
> Do you have any solution?
> Regards,
> Fran
|
|
|
Re: How to add a jar file to the Midlet in MTJ? [message #567982 is a reply to message #22531] |
Fri, 14 November 2008 14:42  |
Eclipse User |
|
|
|
hi,
i just did the test here on the official 0.9 and also on the nightly build
and both of them worked ok.
i downloaded version 2.1.3 (jxme-2.1.3-bin.zip) and used the jxta-cldc.jar
file that is on the dist folder.
i strange aspect was that the file that you mentioned that caused the
error (net.jxta.impl.endpoint.tcp.TcpConnection) is not on the
jxta-cldc.jar that i downloaded. can you tell me which jxta version are
you using and where you downloaded it? i want to try the same version
thanks
gustavo
Gustavo de Paula wrote:
> i'm going to try it here to see if i find any issue with mtj. based on the
> error, i assume you are trying the jxta-cldc.jar.
> :)
> gustavo
> Francisco wrote:
>> Thanks Gustavo,
>> But that is what I have tried, but when eclipse preverifies the jar file,
>> it shows errors on it and the following problem:
>> Error preverifying class net.jxta.impl.endpoint.tcp.TcpConnection
>> jxta-cldc.jar
>> If I don't export it, the error disappear. I have tested the same midlet
>> using netbeans and importing the jar file and everything works.
>> I am using the lastest nightly builds, don't know if the problem could be
>> that...
>> Do you have any solution?
>> Regards,
>> Fran
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04576 seconds