java adding files to jar-archiv, path

java adding files to jar-archiv, path

Post by Klaus.Kloo » Sat, 26 Jun 2004 22:22:59


Hello

Ive found a solution to add a file (property, image, ..) directly to the
jar-archiv (CW8.3, OSX10.3).
The remaining problem is that I cant specify the path, where this file
will be added.
If the file is located in the folder of the output jar-archiv or in its
subfolders) the location is taken from its path.

When I take a file which is not located in the folder of the output-jar
(or in its subfolders) the file is imported into the jar-archiv with its
full path which does not make sense to me (even when a warning is
generated by the compiler).

How can I get around this?
At the moment I have to keep copies of the file (aliasses do not work,
the resolved file is places with its full path in the jar) which is a
real bad solution.

Yes I know CW8.3 and OSX10.3 do not work together nicely (debugging..),
but what to do ?
Will there be a java-version available in the future releases of CW?

Greetings Klaus
 
 
 

java adding files to jar-archiv, path

Post by MW Ro » Sun, 27 Jun 2004 01:16:45

In article <1gfxzau.ptghzk19hkv38N% XXXX@XXXXX.COM >,



If you merge into the output it really shouldn't matter where this is
located.



I've not heard of any particular problems debugging with CW 8.3 on OS X
10.3 for C or Java... maybe this is just my ignorance.

There are no current plans for Java plugins for CodeWarrior Development
Studio for Mac OS v9

Ron

--
Metrowerks, one of the world top 100 companies and influencers
in the software development industry. - SD Times May 2004
http://www.yqcomputer.com/

Metrowerks, maker of CodeWarrior
Ron Liechty - XXXX@XXXXX.COM - http://www.yqcomputer.com/

 
 
 

java adding files to jar-archiv, path

Post by Klaus.Kloo » Sun, 27 Jun 2004 05:11:42

Hello Ron

Thanks for your answer.
No, the path is important to me. I try to explain.
I have a class xyz located in the folder com/klkl
This class has some language property files xyz.properties,
xyz_en_US.properties.... also located in com/klkl

When I want to access the property-file using
ResourceBundle messages = ResourceBundle.getBundle("com.klkl.xyz");
the files have to be at the right position com/klkl in the jar-archive.

But CW puts the file in the jar at the location
/Users/kl/Documents/project/com/klkl.
This does not work.

Sorry, if i have used the wrong words, Im not native english speeking
and some things may sound a little bit stupid...

Debugging a jnilib using CW8.3 I found very unstable.
I havnt found a way to start the jniLib directly from the project using
java as a host application.
Starting the java side and connect the de *** to the running jnilib
using the windows 'Symbolics Window' and 'Processes'
does only work if the java-prg is started from the finder. It does
reproducable crash when the java side was started from CW.

If the java-prg is quit before the de *** is disconnected ( by closing
the debug window and pressing 'resume') CW crashes.

If I work on this small path between the crashes Im able to debug but
some crashes remain (ca 2 per hour :-)

No good news. CW is still my favorite IDE/C++ Compiler.

Greetings Klaus
 
 
 

java adding files to jar-archiv, path

Post by MW Ro » Wed, 30 Jun 2004 00:17:56

In article <1gfygaw.1p3b0eo1f3kkcgN% XXXX@XXXXX.COM >,



In the target's Target Settings you have a box where you can specify
the output directory by defualt it is your project, although I think
recalled a problem where it was in the data file or something.

Another problem is that the current working directory on OS X is not
always the projects directory this was especially true when debugging on
OS X. Using an absolute address is highly recommended for any files
that you need to load at runtime.


I think this is the work around.


I'm not surprised by this. I don't really have any solution.

Sorry I was just not much help on this.

Ron

--
Metrowerks, one of the world top 100 companies and influencers
in the software development industry. - SD Times May 2004
http://www.yqcomputer.com/

Metrowerks, maker of CodeWarrior
Ron Liechty - XXXX@XXXXX.COM - http://www.yqcomputer.com/