pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Issues with Jar deployment
Date Thu, 27 May 2010 17:23:23 GMT
If the value of the src attribute begins with a slash, it is interpreted as an absolute path
relative to the classpath. Otherwise, it is interpreted as relative to the including file.

What does the directory structure in your JAR look like? Based on your example, I would expect
something like this:

/com/foo
  Main.class
  main.wtkx

/com/foo/foldername
  file.wtkx

Is that correct?


On May 27, 2010, at 12:53 PM, David McNelis wrote:

> The wtkx files are included in the exported jar file.
>  
> I think that part of the root problem might have to do with my includes.  In my main
wtkx file I am using the following include… <wtkx:include src="foldername/file.wtkx"></wtkx:include>
>  
>  
> So its getting the main class’s wtkx file at this point, but when it goes to pull in
the next component, which exists in the jar file…  should I be referring to the include
as:
> <wtkx:include src=”org/me/package/whatever/file.wtkx”?  Or is there something
similar to Class#getResource() that can be added in to help it find the correct file?
>  
> If I have the jarfile and the ‘foldername/wtkx’ residing in the same folder, all
works well.  But I don’t want to have to make second copies of all the wtkx files since
they are already in te jar file.
>  
>  
> From: Greg Brown [mailto:gkbrown@mac.com] 
> Sent: Thursday, May 27, 2010 10:34 AM
> To: user@pivot.apache.org
> Subject: Re: Issues with Jar deployment
>  
> I haven't used the "export" feature in Eclipse. What does it actually produce? Does it
build a JAR? Maybe you need to tell Eclipse to include *.wtkx files in the resulting JAR?
>  
>  
> On May 27, 2010, at 11:16 AM, David McNelis wrote:
> 
> 
> Morning,
>  
> I have a moderately complex Pivot based app that for the time being is running as a standalone
desktop application.  When I run from within eclipse, everything works just fine.
>  
> However, when I try to export my project I consistently get a null resource saying that
it can’t located the wtkx files.
>  
> I’ve tried changing the file locations to a static full path, i.e. C:/project/filename.wtkx
and placed the files in that path, but it still claims to not be able to find the resources.

>  
> Has anyone else had difficulties building out an application like this?  Are certain
things I need to be doing in my directory structure to make sure that everything  works correctly?
>  
> Currently I have wtkx files living in the same folders as the classes that reference
them directly, i.e.
> Org.me.project.pkg.class.MyClass has both the java and wtkx file in org/me/project/class/
 That seemed, at least at the time, to be the simplest organizational pattern..but I guess
it is flawed?
>  
> Thanks for any thoughts.
>  
> David
>  


Mime
View raw message