Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Mobile Tools for Java (MTJ) » How to add a jar file to the Midlet in MTJ?
How to add a jar file to the Midlet in MTJ? [message #22335] Fri, 14 November 2008 13:39 Go to next message
Francisco is currently offline FranciscoFriend
Messages: 8
Registered: July 2009
Junior Member
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 17:03 Go to previous messageGo to next message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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 #22488 is a reply to message #22359] Fri, 14 November 2008 17:51 Go to previous messageGo to next message
Francisco is currently offline FranciscoFriend
Messages: 8
Registered: July 2009
Junior Member
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 #22531 is a reply to message #22488] Fri, 14 November 2008 19:11 Go to previous messageGo to next message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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 #22573 is a reply to message #22531] Fri, 14 November 2008 19:42 Go to previous messageGo to next message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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
Re: How to add a jar file to the Midlet in MTJ? [message #22617 is a reply to message #22573] Fri, 14 November 2008 20:41 Go to previous messageGo to next message
Francisco is currently offline FranciscoFriend
Messages: 8
Registered: July 2009
Junior Member
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 #22659 is a reply to message #22617] Sun, 16 November 2008 00:00 Go to previous message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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 17:03 Go to previous message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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 17:51 Go to previous message
Francisco is currently offline FranciscoFriend
Messages: 8
Registered: July 2009
Junior Member
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 19:11 Go to previous message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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 19:42 Go to previous message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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
Re: How to add a jar file to the Midlet in MTJ? [message #568010 is a reply to message #22573] Fri, 14 November 2008 20:41 Go to previous message
Francisco is currently offline FranciscoFriend
Messages: 8
Registered: July 2009
Junior Member
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 #568033 is a reply to message #22617] Sun, 16 November 2008 00:00 Go to previous message
Gustavo de Paula is currently offline Gustavo de PaulaFriend
Messages: 118
Registered: July 2009
Senior Member
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
Previous Topic:Help: WTK2.5.2 + MTJ 0.9 + Eclipse 3.4.1 + JRE6_10
Next Topic:Type java.lang.String Error preverifying class java.lang.String
Goto Forum:
  


Current Time: Sat Apr 20 15:27:03 GMT 2024

Powered by FUDForum. Page generated in 0.03598 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top