Adding directory to .jar file automatically

Adding directory to .jar file automatically

Post by Richard Palai » Sun, 20 Jul 2003 12:15:17



Can someone tell me how I can get the Codewarrior IDE (8.3)
to add a directory automatically to the .jar file that
is output by the Java compiler. I know how to add the
directory using the Class Wrangler, but it gets removed
every time I recompile and it's a nuisance to have to
keep adding it back in over and over. Surely there
must be a setting in some preference panel that will
make it happen automatically.
 
 
 

Adding directory to .jar file automatically

Post by MW Ro » Sat, 26 Jul 2003 01:13:57




Quote:>Can someone tell me how I can get the Codewarrior IDE (8.3)
>to add a directory automatically to the .jar file that
>is output by the Java compiler. I know how to add the
>directory using the Class Wrangler, but it gets removed
>every time I recompile and it's a nuisance to have to
>keep adding it back in over and over. Surely there
>must be a setting in some preference panel that will
>make it happen automatically.

We think you need to add the files as resources (merged into output).

Be sure to set the resource path up so that the directory you want
created inside the jar file is immediately below the root of his
resource path (either by modifying the resource path setting, or by
moving the resource tree to be at the root of the default resource
directory).  

Ron

--
           Metrowerks has moved, our new address is now
                     7700 West Parmer Lane
                       Austin, TX 78729
        Sales and Support 512-996-5300   800-377-5416    


 
 
 

1. How do you insert a .jar file into a project's output .jar file?

Hi,

I'm trying to build a Web Application using CW6 on a Mac. This consists of
.html, .jsp, .gif, .jpeg, .xml and .jar files in the standard Web Application
Archive (.war) file.

.war files are actually just .jar files with a different file type, and with a
particular directory structure. I assumed that I could get CW6 to
automatically generate
the .war file from the various files and sources, and I have nearly succeeded...

The problem I am having is this: if you include a .jar file into a CW6
project, and
set its Merge Into Output property, the Java Linker merges the .jar file's
contents into the resulting output file rather than inserting the .jar file into
it with the appropriate directory structure. This is not what is required in a
.war file.

Is there any way to get CW6 to insert the .jar file instead?

I've tried a number of approaches including a) changing the .jar file mapping to
use the JAR Importer rather than the Java Linker b) changing the Mac file
type and
creator to be something other than ZIP /MWZP etc.

I assumed that I would be able to do this with Class Wrangler, but
curiously it too
seems to suffer the same problem - always merging the contents of the .jar
file rather
than inserting the entire .jar file itself.

--Nick

2. Mailbox limiting?

3. importing from a directory structure vs. .jar files

4. How to get hyperlink functionality into an MFC control?

5. adding non-java files to a jar

6. some great ideas for a maybe known problem?

7. adding directory indexes to plan9 file server

8. stepper motor drivers

9. Directory scan - ignoring files in the process of being ftp'd into directory?

10. C-Kermit server directory lists unreadable files as directories

11. Does sas can automatically find a directory?

12. Changing current directory automatically

13. Automatically registering an add-in (Excel)