This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 225937 - Incorrect classpath for obfuscator in J2ME project
Summary: Incorrect classpath for obfuscator in J2ME project
Status: NEW
Alias: None
Product: javame
Classification: Unclassified
Component: Build System (show other bugs)
Version: 7.2.1
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-09 15:28 UTC by rjksmith
Modified: 2013-04-09 11:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rjksmith 2013-02-09 15:28:03 UTC
My J2ME NB project has ProGuard obfuscation enabled for its release build. In the generated build-impl.xml, the obfuscator class path includes the extra.classpath, which I believe is a list of project libraries /excluded/ from the current build configuration.

        <nb-obfuscate srcjar="${obfuscator.srcjar}" destjar="${obfuscator.destjar}" obfuscatorclasspath="${obfuscator.classpath}" classpath="${platform.bootclasspath}:${extra.classpath}" obfuscationLevel="${obfuscation.level}" extraScript="${obfuscation.custom}"/>

I believe this is incorrect and extra.classpath should be omitted from this line.

I have been integrating Hammock (mock objects for J2ME) to my project, and found my build failed because Proguard cannot parse the HammockMaker jar file.

Reading library jar [.../hammock-2.1.0/dist/hammock_midp20_cldc11-2.1.0.jar]
Error: Can't read [proguard.ClassPathEntry@4c7e9bed] (Can't process class [com/hammingweight/hammockmaker/AMethodWrapper.class] 
(Unsupported version number [51.0] for class format))
Reading library jar [.../hammock-2.1.0/hammockmaker/dist/hammockmaker-2.1.0.jar]
.../nbproject/build-impl.xml:397: Obfuscation failed with error code 1.
BUILD FAILED (total time: 3 seconds)

I suspect this is because it's a Java 1.5 code, and there are known incompatibility issues between J1.4+ and earlier versions. However, the build error is spurious as HammockMaker is a build tool only, and not included in the deployed code, i.e. it is a project library, but not included in this build configuration.

I've manually edited my build-impl.xml as a workaround, but thought I should report the issue to you. I hope this is helpful. Please let me know if you need further details.
Comment 1 David Strupl 2013-04-09 11:22:42 UTC
Assigning to the new owner of javame modules.