Jump to content
  • Advertisement
Sign in to follow this  
Toolmaker

[java] J2ME & Eclipse: External JAR not added to final package...

This topic is 4319 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently trying to work on a little J2ME application using the J2ME Polish Windowing Toolkit. I use the latest Eclipse version and the EclipseME 1.5.0 plugin. After I created a J2ME Suite and a little demo application it compiles perfectly(So, it can see J2ME-Polish packages), but after creating a JAR of the entire suite, the J2ME jars appear to be missing in the final product. After I then execute the app in the emulator, I obviously get a ClassNotFound exception. The J2ME Polish IS in the workspace under the project(Holding only 1 JAR, namely 'enough-j2mepolish-build.jar'), as a user library(With all the corresponding JARs in it), and after selecting Properties of the project -> build Path -> Export and Order, it IS ticked. What do I have to do to make this library end up in my final JAR? Because without it, I can't ship it or test it. Toolmaker

Share this post


Link to post
Share on other sites
Advertisement
Another option is to extract the class files from the jar (into a bin directory) and link to them as if they were a normal project.

shmoove

Share this post


Link to post
Share on other sites
I tried using Fat Jar, and it does work, however, it somehow mutilates the manifest file(s), and the j2me emulator refuses to run(I assume the phone doesnt' want the midlet either).

So, extracting the source isn't much of an idea, since I have to link to ALOT of different dependencies for it to work.

Next question: I managed to extract the class files(cake with WinRAR), how do I link against it the normal way? I'm not much of a Java programmer(Except when I have to :P), so be gentle with me :).

Toolmaker

Share this post


Link to post
Share on other sites
Create a new project in the workspace and put the class files in it's bin directory. Then in your original's project "Java Build Path" setting you go to the "Projects" tab and add the new J2ME Polish project. Then in the "Order and Export" tab make sure the new project is checked. That should do it (I think... my Eclipse-fu is not that strong).

shmoove

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!