HI!

What is that 'rsrc: in your URL (in the exception)?

I generate jar files from eclipse normally.


Cheers,
Luiz Gustavo


2011/1/12 Bill van Melle <[email protected]>

> This seems like it must be a pretty elementary question, but what do I need
> to do to make a runnable jar file out of my app?  I'm using Eclipse, where
> my app runs fine.  I tried doing Export | Runnable JAR file, but when I run
> it, it dies while parsing the top-level bxml file, where it fails to find a
> file that's included from it.  Here's what Java reports:
>
> An error occurred at line number 21 in file
> com/fxpal/myunity/DashboardWindow.bxml:
> java.net.MalformedURLException: Could not open InputStream for URL
> 'rsrc:Dashboard.bxml'
>  at
> org.eclipse.jdt.internal.jarinjarloader.RsrcURLConnection.getInputStream(RsrcURLConnection.java:46)
> at java.net.URL.openStream(Unknown Source)
>  at
> org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:881)
> at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:435)
>  at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:614)
> at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:568)
>  at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:534)
> at com.fxpal.myunity.DashboardWindow.create(DashboardWindow.java:28)
>  at com.fxpal.myunity.Program.startup(Program.java:27)
> at
> org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:594)
>  at
> org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1474)
>         ...
>
> The file it's parsing at the time looks like
>
> <my:DashboardWindow
>     xmlns:bxml="http://pivot.apache.org/bxml";
>     xmlns:my="com.fxpal.myunity"
>     xmlns="org.apache.pivot.wtk">
>
>  ... some containers inside other containers ...
>
>        <bxml:include bxml:id="dashboard" src="Dashboard.bxml" />
>
>  ... etc ...
>
> You've said that include directives with non-absolute paths are interpreted
> relative to the file being parsed.  Dashboard.bxml is indeed in the jar file
> and in the same directory as DashboardWindow.bxml.  The
> method DashboardWindow.create looks like this:
>
>     public static Window create() throws IOException,
> SerializationException { BXMLSerializer bxmlSerializer = new
> BXMLSerializer(); return
> (DashboardWindow)bxmlSerializer.readObject(DashboardWindow.class,
> "DashboardWindow.bxml"); }
>
> What am I missing?
>
>

Reply via email to