Skip to main content

SVGImage problem with NetBeans 5.5

9 replies [Last post]
bagrehc
Offline
Joined: 2005-09-12

Hi all, I'm trying to create a sample of app using the a SVGSplashScreen component, but when I put a SVGImage resource to my project, NetBeans says that the package "javax.microedition.m2g" doesn't exist.
Ok, but if it is on the netbeans palette why doesn't exist? and if I have to include some library, which one?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
breh
Offline
Joined: 2003-07-18

Can you describe in more details how did you "add the jsr226.jar from WTK and used the library in project properties". To me it looks like you added the actual jar as a library, which is being added to the resulting application (and thus being preverified) - this cannot work, the acutal platform you are using must support 226 apis.

bagrehc
Offline
Joined: 2005-09-12

hi breh, if you added WTK 2.5.1 as "aastha" mentioned before in this thread, you just have to go to the properties of your project and click on the "Platform" category and then select your WTK 2.5.1 (to me it appears "Sun Java(TM) Wireless Toolkit 2.5.1") on the "Emulator Platform" combo box and click "OK".

After that you don't need add any library to your project.

Message was edited by: bagrehc

dapyx
Offline
Joined: 2007-05-19

Hi,

I have this problem too. Installed the Mobility Packs and WTK 2.5.1. Still, have no SVG API in Netbeans 5.5. I created a new library and added the jsr226.jar from WTK and used the library in project properties. Still, same error, as you can see below (I included all the build log):

--- cut here ---
pre-init:
pre-load-properties:
exists.config.active:
exists.netbeans.user:
exists.user.properties.file:
load-properties:
exists.platform.active:
exists.platform.configuration:
exists.platform.profile:
init:
post-init:
conditional-clean:
clean:
pre-clean:
do-clean:
Deleting directory C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\preprocessed
Deleting directory C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
Deleting: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\before-obfuscation.jar
Deleting: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\obfuscated.jar
Deleting directory C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\obfuscated
Deleting directory C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\preverified
Deleting: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\.timestamp
post-clean:
pre-preprocess:
deps-jar:
preprocess:
Created dir: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\preprocessed
Pre-processing 1 file(s) into C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\preprocessed directory.
Copying 3 files to C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\preprocessed
post-preprocess:
extract-libs:
Created dir: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
Expanding: C:\Program Files\WTK2.5.1EA\lib\jsr226.jar into C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
Expanding: C:\Program Files\netbeans-5.5\mobility7.3\modules\ext\nb_svg_midp_components.jar into C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
Expanding: C:\Program Files\netbeans-5.5\mobility7.3\modules\ext\j2meunit-1.1.1.jar into C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
Expanding: C:\Program Files\netbeans-5.5\mobility7.3\modules\ext\jmunit4cldc11-1.0.1.jar into C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
pre-compile:
compile:
Compiling 1 source file to C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
Copying 3 files to C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\compiled
post-compile:
obfuscate-check:
pre-obfuscate:
obfuscate:
Building jar: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\before-obfuscation.jar
Copying jar file (C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\before-obfuscation.jar) to C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\obfuscated.jar.
Created dir: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\obfuscated
Expanding: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\obfuscated.jar into C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\obfuscated
post-obfuscate:
pre-preverify:
preverify:
Created dir: C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\preverified
Preverifying 97 file(s) into C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\build\preverified directory.
Error preverifying class javax.microedition.m2g.ScalableGraphics
VERIFIER ERROR javax/microedition/m2g/ScalableGraphics.render(IILjavax/microedition/m2g/ScalableImage;)V:
Cannot find class com/sun/perseus/model/Viewport
C:\Documents and Settings\dapyx\My Documents\NetBeansProjects\ScoNet\nbproject\build-impl.xml:269: Preverification failed with error code 1.
BUILD FAILED (total time: 5 seconds)
--- and here ---

Any idea what I did wrong?

Thanks,
Iulian

aastha
Offline
Joined: 2004-04-19

Hi Lulian,

Wireless Toolkit 2.5 supports JSR 226, so that should be all you need. Please double-check that your NetBeans project is using Wireless Toolkit 2.5 as the emulator platform, and not the default Wireless Toolkit 2.2 that comes with the Mobility Pack. To check this, in NetBeans right click on your project, select "Properties", select "Platform", and make sure to select the "Sun Java(TM) Wireless Toolkit 2.5 for CLDC as the "Emulator Platform" instead of "J2ME Wireless Toolkit 2.2".

This assumes that NetBeans already knows about Wireless Toolkit 2.5. If it does not, you will need to click on the "Manage Emulators" button in the same screen, and then select "Add Platform", then "Java Micro Edition Platform Emulator" and then hitting next, NetBeans will find any new Wireless Toolkit versions you have installed on your system.

Once WTK 2.5 is selected, you will not need to create a separate library containing jsr226.jar.

We hope to have this resolved in a near future version of NetBeans Mobility Pack which should have the default Wireless Toolkit version as 2.5.

Aastha

dapyx
Offline
Joined: 2007-05-19

Hi aastha,

Sorry for the late reply - no internet acces on holiday. Thank you for the hint - everything is fine now. Tried this way before, but WTK 2.5 was installed in "C:\Program Files" so there were problems with auto detection and paths.

Iulian

jbodnar
Offline
Joined: 2007-04-20

I use WTK 2.5 which comes with jsr226.jar.

bagrehc
Offline
Joined: 2005-09-12

Thanx again, now it works.

jbodnar
Offline
Joined: 2007-04-20

Hi,
I think this is the SVG API 1.0 ( jsr226.jar in the WTK lib directory )

bagrehc
Offline
Joined: 2005-09-12

Thanks jbodnar, but do you know what WTK version has this .jar?
Because I'm using WTK 2.2 for linux and I didn't find any jsr226.jar.