Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Fri, 05 January 2007 01: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] Fri, 05 January 2007 01:32 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
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] Fri, 05 January 2007 03: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 09:23 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
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 Apr 25 07:16:30 GMT 2024

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

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

Back to the top