Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to change the folder structure when exporting.
How to change the folder structure when exporting. [message #461091] Thu, 04 January 2007 20:30 Go to next message
Eclipse UserFriend
Originally posted by: filot97.nate.com

When I export my rcp application, I see the following folder structure.

\myRCP\
\feature\
\plugin\
\myplugin.jar
...

Above is not the same as my development folder.
I create a foo folder. Next, when I export, it is packaged in myplugin.jar. If I write the code that reference a specific resource in the foo folder, it will throw run time exception.

How can I solve this problem?
Re: How to change the folder structure when exporting. [message #461093 is a reply to message #461091] Thu, 04 January 2007 20:32 Go to previous messageGo to next message
Eclipse UserFriend
If you load the resource with class.getResourceAsStream("foo/file.txt") then it should work, regardless of whether it's packaged up as a Jar or not.

Alex.
Re: How to change the folder structure when exporting. [message #461099 is a reply to message #461093] Thu, 04 January 2007 22:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Alex Blewitt wrote:
> If you load the resource with class.getResourceAsStream("foo/file.txt") then it should work, regardless of whether it's packaged up as a Jar or not.
>
> Alex.
If foo is at the root of the plugin folder, you need to include a '/' as
in "/foo/file.txt". Otherwise foo is added at the end of the package of
the Class used to call the getResourceAsStream method. If called from
com.somepackage.AClass, the class loader will look for the file
"com/somepackage/foo/file.txt".
Re: How to change the folder structure when exporting. [message #461120 is a reply to message #461099] Fri, 05 January 2007 04:23 Go to previous message
Eclipse UserFriend
D'oh! Of course. Goes to show what happens when you write responses that late at night :-)

Alex.
Previous Topic:Events propagation
Next Topic:TableViewer display problem in Master/Detail block
Goto Forum:
  


Current Time: Thu Mar 27 02:52:55 EDT 2025

Powered by FUDForum. Page generated in 0.26788 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top