Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2008

    Unhappy Cannot open SVG-File

    Hello everyone,

    I have a strange problem when trying to open svg image
        private SVGImage img;
        private SVGAnimator animator;
        private InputStream inputLogo=null;
        private Canvas animatorCanvas;
        public SplashScreen() {
                try {
                    inputLogo = this.getClass().getResourceAsStream("/splashscreen_customizable.svg");
                } catch (Exception ex) {
                try {
                img = (SVGImage) SVGImage.createImage(inputLogo, null);
                        } catch (IOException ex) {
    When I try to run this in the S40 3rd Edition Emulator I get an Exveption:
    Using Maximum simulated domain
    at javax.microedition.m2g.SVGImage.createImage(+95)

    When I look at the "Details" in the Emulator it says NullPointerException, however.

    What could be the problem?

    The SVGImage is located in the root of my jar

    When I debug this on Sony-Ericsson:
    My InputStream has an attribute called "handle" which is set to 0.
    On S40 3rd Edition FP 1 i the same attribute has the value of "null".
    In both cases the attribute size is read correctly.
    Last edited by tbender; 2008-02-05 at 10:30.

  2. #2
    Registered User
    Join Date
    Feb 2008

    Unhappy Re: Cannot open SVG-File

    I "love" replying to myself.

    What is the minimum SDK-Version to support JSR-226?
    As mentioned I am on S40 3rd Edition FP 1
    I thought, I read that this was the minimum requirement.
    But when I do:

    So it seems to me, that I need a different SDK version. But which one?

  3. #3
    Super Contributor
    Join Date
    Apr 2003
    USA, CA

    Re: Cannot open SVG-File

    SVG is supported on Series 40 devices starting from 3rd Edition FP1 (well, 6280 has is too...)

    Are you saying that those system properties return null?
    I am not 100% sure, but I think these properties were defined to be mandatory only in MSA (JSR-248) so you cannot rely on them.


  4. #4
    Registered User
    Join Date
    Mar 2004

    Re: Cannot open SVG-File

    This is an old thread, but here's my two cents:

    I had a similar problem (svgImage cannot be null -exception). The culprit was in the SVG-file. It had the animation transforms in a <defs>-segment. After I relocated the transforms inside my <path>-elements' group definition it started to work.

    So... Remember to check your SVGs.

Similar Threads

  1. Trusted Application
    By damien_a in forum Mobile Java General
    Replies: 11
    Last Post: 2012-02-17, 20:49
  2. S60 theme questions
    By Nokian_Spb in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2006-08-17, 06:11
  3. Replies: 3
    Last Post: 2005-10-12, 05:26
  4. TinyLine SVG Minute Toolkit: Optimizing SVG for J2ME
    By girow in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-05-05, 18:44
  5. TinyLine SVG Minute Toolkit for J2ME: version 1.4 released
    By girow in forum Mobile Java General
    Replies: 0
    Last Post: 2003-05-05, 16:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts