Board index » jbuilder » Copying non .class files to the classes directory

Copying non .class files to the classes directory


2003-11-27 11:39:32 PM
jbuilder22
I have three files under the src directory, which I want
to be copied to corresponding spot in the classes directory
during a rebuild operation. This is so that they can be
accessed using Class.getResource. Currently the copy seems
to happen with my .gif files, but not with these other files. Is there
any way to convince JBuilder 9 to do this?
Possibly related: I notice that the .gif files
are in the project under the corresponding package,
whereas these other files do not appear in under
the project. Thus I added them, as files, using the
Add Files/Packages/Classes... menu item.
Possibly making this more difficult, there two of
the files have no suffix; the other is a .h file.
Cheers,
Theodore Norvell
(theo at engr dot mun dot ca)
 
 

Re:Copying non .class files to the classes directory

For a file which has an extension, you just need to tell the
compiler to treat it like the other resource files (such as
the standard ones like gif, jpg, properties, and so on).
Right click on the file in the Project Pane and select
Properties | Build | Resources. Mark the extension as
"Copy".
If the file extension is not registered so that it does not
appear on the Resource property page, you can associate a
file extension with one already known to JBuilder using
Tools | IDE Options | File Types (or write an OpenTool to
add support for that file type).
For a file with no extension, there is no way to configure
for that. I suppose you would have to either use an ANT
script or write an OpenTool.
"Theodore Norvell" < XXXX@XXXXX.COM >wrote in
message news:3fc61ab1$ XXXX@XXXXX.COM ...
I have three files under the src directory, which I want
to be copied to corresponding spot in the classes directory
during a rebuild operation. This is so that they can be
accessed using Class.getResource. Currently the copy seems
to happen with my .gif files, but not with these other
files. Is there
any way to convince JBuilder 9 to do this?
Possibly related: I notice that the .gif files
are in the project under the corresponding package,
whereas these other files do not appear in under
the project. Thus I added them, as files, using the
Add Files/Packages/Classes... menu item.
Possibly making this more difficult, there two of
the files have no suffix; the other is a .h file.
Cheers,
Theodore Norvell
(theo at engr dot mun dot ca)
 

Re:Copying non .class files to the classes directory

Bill Joy wrote:
Quote
For a file which has an extension, you just need to tell the
compiler to treat it like the other resource files (such as
the standard ones like gif, jpg, properties, and so on).
Right click on the file in the Project Pane and select
Properties | Build | Resources. Mark the extension as
"Copy".
Hi. Thanks for your help. Under the Build tab of the
Project Properties Dialog, there is no Resources sub-tab.
All I see is Java, General, Ant, and Menu Items. This
is JBuider 9 Personal that I'm using. Am I missing something?
Quote
If the file extension is not registered so that it does not
appear on the Resource property page, you can associate a
file extension with one already known to JBuilder using
Tools | IDE Options | File Types (or write an OpenTool to
add support for that file type).
Thanks. Although what I have are best described as text
files, I claimed that they are gif files. This seemed
to encourage jbuilder to copy them from src/ to classes/ .
If I could find that Resources tab, I wouldn't have to lie
so much to JBuilder.
Cheers,
Theo.
 

{smallsort}

Re:Copying non .class files to the classes directory

The Resource property page is not available in JB 9 Personal
(nor JBuilder X Foundation).
"Theodore Norvell" < XXXX@XXXXX.COM >wrote in
message news: XXXX@XXXXX.COM ...
Bill Joy wrote:
Quote
For a file which has an extension, you just need to tell
the
compiler to treat it like the other resource files (such
as
the standard ones like gif, jpg, properties, and so on).
Right click on the file in the Project Pane and select
Properties | Build | Resources. Mark the extension as
"Copy".
Hi. Thanks for your help. Under the Build tab of the
Project Properties Dialog, there is no Resources sub-tab.
All I see is Java, General, Ant, and Menu Items. This
is JBuider 9 Personal that I'm using. Am I missing
something?
Quote
If the file extension is not registered so that it does
not
appear on the Resource property page, you can associate a
file extension with one already known to JBuilder using
Tools | IDE Options | File Types (or write an OpenTool to
add support for that file type).
Thanks. Although what I have are best described as text
files, I claimed that they are gif files. This seemed
to encourage jbuilder to copy them from src/ to classes/ .
If I could find that Resources tab, I wouldn't have to lie
so much to JBuilder.
Cheers,
Theo.
 

Re:Copying non .class files to the classes directory

Bill Joy wrote:
Quote
The Resource property page is not available in JB 9 Personal
(nor JBuilder X Foundation).

So... this tells me what he can't do...
Is all the Ant stuff accessible in JBX Foundation? If so, then he could
set up an Ant task to run during his build to perform this copying?
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html