My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 76: Cannot open jad from dynamic url
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by jdd...@gmail.com, Oct 25, 2010
What steps will reproduce the problem?
1. Click File->Open MIDlet URL
2. Enter http://mini.opera.com/download-5/opera-mini-latest-advanced-en-us.jad?no_redir&ismobile=false

What is the expected output? What do you see instead?
Expected the jad to be opened.
Get "Empty jar http://mini.opera.com/download-5/opera-mini-latest-advanced-en-us.jad?no_redir&ismobile=false" error dialog box with an OK button.

What version of the product are you using? On what operating system?
Any. Win7.


Oct 25, 2010
#1 jdd...@gmail.com
Here is some more information:

The reason is because in /trunk/microemulator/microemu-javase/src/main/java/org/microemu/app/Common.java

function: openMIDletUrl(String, MIDletClassLoader)
The following is tested:
 if (urlString.toLowerCase().endsWith(".jad")) {
                jad = loadJadProperties(urlString);
                loadJar(urlString, jad.getJarURL(), midletClassLoader);
            } else {
                jad.setCorrectedJarURL(urlString);
                loadJar(null, urlString, midletClassLoader);
            }

So we can see here that the jad is loaded as a jar.
But I think the Content-Type returned from the URL (perhaps with a http HEAD call if available) should be checked for the jad mimetype first ("text/vnd.sun.j2me.app-descriptor"), and then fall back to the jar loading if that fails.


Lastly, when this error does occur the status bar at the bottom stays on "Loading...", and opening another jad or jar from filesystem does nothing.

Powered by Google Project Hosting