Skip to main content



      Home
Home » Archived » DSDP - Mobile Tools for Java (MTJ) » Problem during packaging: empty jar in \.mtj.tmp\emulation
Problem during packaging: empty jar in \.mtj.tmp\emulation [message #485552] Sun, 13 September 2009 07:19 Go to next message
Eclipse UserFriend
Hi

After 4 years successfully using EclipseME, today I upgraded to MTJ. I
have encountered a problem generating packaged builds, both obfuscated and
non-obfuscated.

For some reason, the packaging process creates a fresh file in
\.mtj.tmp\emulation\ABC.jar that contains only the mainfest, ie all
classes and resources are missing. Perhaps the PackageBuilderVisitor class
isnt operating correctly?

Another thing: the error is detected late and indirectly by MTJ. The
actual error in the logs is "failed to inflate jar file", and it occurs
much later in the build process. Before that, Proguard had failed, and yet
MTJ just shows a popup and continues on heedless. I had to download and
read the MTJ source code to trace the cause back to the empty jar in the
emulation folder. Fail fast!

In PackageBuilder.updatePackage(), why not validate that the created Jar
has >= 1 classfile, before continuing to the next step, so as to detect
error states closer to where they happen?
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #503598 is a reply to message #485552] Mon, 14 December 2009 16:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi there,

this thread is a few months old, but I ran into the same problem today, and since roughly 800 people also looked at it, it seems still relevant.

For me, one of the two things fixed the problem (maybe a combination of the two):

close and re-open the project,
set another device configuration

after doing that my jar file contained classes and resources again. Hope that helps.

[Updated on: Mon, 14 December 2009 16:24] by Moderator

Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #503602 is a reply to message #503598] Mon, 14 December 2009 16:36 Go to previous messageGo to next message
Eclipse UserFriend
I should mention, that I had an existing MIDP Project in my workspace, and updated Eclipse / MTJ then. That was when trouble started.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #505063 is a reply to message #485552] Fri, 25 December 2009 23:36 Go to previous messageGo to next message
Eclipse UserFriend
I had the same problem and searched the web to no avail but after much struggle I found the solution.

Go to the build tab in the Application Descriptor and make sure the directory with your source files(default is src) is ticked.

HtH.


Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #578610 is a reply to message #485552] Mon, 14 December 2009 16:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi there,

this thread is a few months old, but I ran into the same problem today, and since roughly 800 people also looked at it, it seems still relevant.

For me, one of the two things fixed the proble (maybe a combination of the two):

close and re-open the project,
set another device configuration

after doing that my jar file contained classes and resources again. Hope that helps.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #578630 is a reply to message #578610] Mon, 14 December 2009 16:36 Go to previous messageGo to next message
Eclipse UserFriend
I should mention, that I had an existing MIDP Project in my workspace, and updated Eclipse / MTJ then. That was when trouble started.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #578712 is a reply to message #485552] Fri, 25 December 2009 23:37 Go to previous messageGo to next message
Eclipse UserFriend
I had the same problem and searched the web to no avail but after much struggle I found the solution.

Go to the build tab in the Application Descriptor and make sure the directory with your source files(default is src) is ticked.

HtH.
Re: Problem during packaging: empty jar in \.mtj.tmp\emulation [message #671976 is a reply to message #578712] Thu, 19 May 2011 09:46 Go to previous message
Eclipse UserFriend
I ve got the same problem with packaging after I converted my netbeans mobility project to eclipse pulsar.

In my case the reason of "empty" jar was a missing "build.properties" file in the root of the eclipse project. Looks like MTJ does not bother to notify a user about missing configuration file and does not recreate it.




Previous Topic:Corrupt JAR, error while reading: midlet/MIDlet.class
Next Topic:Install MTJ for Indigo
Goto Forum:
  


Current Time: Sat Mar 22 09:15:03 EDT 2025

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

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

Back to the top