Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Resources not being picked from folder in build.properties
Resources not being picked from folder in build.properties [message #319502] Thu, 23 August 2007 03:57 Go to next message
Eclipse UserFriend
Hi,

I've my DTDs located in my source under "src/dtds". My source folder for
Java files is "src/java". Both these are mentioned in my plugin's
build.properties with "/," at the end, as expected.

However, the files under "src/dtds" are not being picked up (returns null)
if I use "getClass().getResourceAsStream()". However, if I place the same
files in "src/java", these are picked correctly by the above code.

I suspect for some reason the "src/dtds" is not being used in the runtime
workbench's classpath. Any clues of why this is happening?

Thanks,
- Nitin
Re: Resources not being picked from folder in build.properties [message #319504 is a reply to message #319502] Thu, 23 August 2007 07:59 Go to previous message
Eclipse UserFriend
Unless you make src/dtds a source folder, it won't be on the classpath.

build.properties is used to package a plugin, but plugins expect to use
Activator.getDefault().getBundle().getEnry("dtds/whatever.dtd ") to gain
access to files contributed through the build.properties.

Normal java resources (in directories with your .java files or in other
"marked" source or class folder) are accessible the standard way,
getClass().getResourceAsStream(*)

Later,
PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
Previous Topic:How to transfer the files????????
Next Topic:Writing JUnit tests to test the outcome of a UIJob
Goto Forum:
  


Current Time: Fri Nov 07 20:36:46 EST 2025

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

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

Back to the top