Hi i have a application ho needs to bee shipped out soon and i construckted a jar and in that jar there is a folder with my pictures that my application needs, here is the problem. my application is a trayapp that uses a native method to display the icon pic in the tray, that method needs the absolute path to a xx.ico file. How can i get that path ? is it possible or must i place my picture folder out side the jar in a nown place ? that is a solution i dont want ! please help thanks //Rikard
Joined: Jul 10, 2001
humm think i got it .. i create a tmp file out of the stored picture in jar and from that get the absolut path // Rikard
One answer that I can think of is to pass the location of the .ico file to your native method. If your native code can read .zip/.jar files, then you can include the .ico file in your .jar and tell your native code to look there. Otherwise, you will have to either a). package the .ico separately and include a .properties file to tell where the .ico is, or b). Package the .ico file in the .jar file. The first time you go to use the resource, use Java's jar API to extract it from the .jar file and place it in a tempory location on the hard drive (you could specify this using a .properties setting, if you wised....) Then pass the location of that file to your native code and it should be able to find it.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.