Ajuda

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import java.io.*;

public class ConnectionImage extends MIDlet implements CommandListener
{
    Display tela;
    Form imageForm;
    
    ImageItem foto;
    

    Command buscarCommand, sairCommand;
    
    String url = "http://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Firefox_LiNsta.png/50px-Firefox_LiNsta.png";
    
    public ConnectionImage()
    {
        
        this.imageForm = new Form("");
        
        this.foto = new ImageItem("foto",null,0,"");
        
        this.sairCommand = new Command("Sair", Command.EXIT, 0);
        this.buscarCommand = new Command("Buscar", Command.SCREEN, 1);
            
        this.imageForm.addCommand(this.sairCommand);
        this.imageForm.addCommand(this.buscarCommand);
        
        this.imageForm.setCommandListener(this);
    }
    
    public void startApp() 
    {
        this.tela = Display.getDisplay(this);
        this.tela.setCurrent(this.imageForm);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean bool) {
    }

    public void commandAction(Command c, Displayable d) {
        if (c == this.sairCommand)
        {
            this.destroyApp(true);
            this.notifyDestroyed();
        }
        else if (c == this.buscarCommand)
        {
            if (imageForm.size() > 0){
                
                for(int i=0; i < imageForm.size();i ++)
                    imageForm.delete(i);
            }
            try
            {
                Image im;
                //chama o método que busca a imagem
                im = getImage(this.url);
                this.foto.setImage(im);
                imageForm.append(this.foto);
                //Display the form with the image
                this.tela.setCurrent(this.imageForm);
            }
            catch (Exception e)
            {
                
            }
        }
    }
    
    private Image getImage(String url) throws IOException       
    {
        ContentConnection connection = (ContentConnection) Connector.open(url);
        DataInputStream iStrm = connection.openDataInputStream();
        
        Image im = null;
        
        try
        {
            byte imageData[];
            int length = (int) connection.getLength();
            if(length != -1)
            {
                imageData = new byte[length];
                
                iStrm.readFully(imageData);
            }
            else
            {
                ByteArrayOutputStream bStrm = new ByteArrayOutputStream();
                
                int ch;
                while ((ch = iStrm.read()) != -1)
                    bStrm.write(ch);
               
                imageData = bStrm.toByteArray();
                bStrm.close();
            }
            
            im = Image.createImage(imageData, 0, imageData.length);
        }
        finally
        {
            if (iStrm != null)
                iStrm.close();
            if (connection != null)
                connection.close();
        }
        return (im == null ? null : im);
    }
}

O que estou fazendo de errado?

Running in the identified_third_party security domain
Warning: To avoid potential deadlock, operations that may block, such as 
 networking, should be performed in a different thread than the 
 commandAction() handler.

Em Java ME pra fazer uma conexao é preciso estar em uma thread diferente da principal.

É simples: faca sua classe implementar Runnable, aí coloca a parte de conecao dentro do run

[code]public void run() {

    //Código que faz a conexao...
    ContentConnection connection = (ContentConnection) Connector.open(url);  
    DataInputStream iStrm = connection.openDataInputStream();  
      
    Image im = null;
    .
    .
    .
    
}[/code]

Nao testei, mas já tive o mesmo problema e consegui resolver desta maneira.

Falouu