1

We use JWrapper for deployment of some of our desktop apps. I must say I am quite impressed with JWrapper, the ease of use and the features it provides.

We develop mostly in Linux environments but our clients use mostly Windows. We use JavaFX for our desktop apps with Java 8. We use Java 8 because of the fact that it plays nicely with JavaFX and things like the Date chooser are only available since Java 8.

After making sample apps to test the features of JWrapper, with the JRE-1.7 bundle, everything worked like a charm: icons on Linux, Windows and Mac.

For our demo apps I had to bundle Java 8 for JWrapper, everything worked fine, the apps installed everywhere and launched after install, but on Linux (Ubuntu) no icons appeared in the Dash. I searched in the ~./local folder for the .desktop files and only found the sample apps' .desktop files there.

I scoured the JWrapper forums for similar issues and found one referring to a similar problem, but the question did not get any attention and JWrapper retired their forum a day or two ago in favour of using stackoverflow. Here is the question in the forum: http://www.jwrapper.com/old-forum.html#nabble-td209

This leads me to the conclusion that there is a incompatibility with JWrapper and Java 8 on Linux. I understand Java 8 is still new, and is yet to be bundled and tested by the good people of JWrapper. (I would offer my help with this if you guys are interested)

I can go and write the creation of icons (.desktop files) for Linux systems in a JWrapperPostInstallApp but that would only be a workaround. Am I missing something? Does anyone have an already working workaround?

Gerald Schneider
  • 17,416
  • 9
  • 60
  • 78
Phaestion
  • 63
  • 8
  • The jwrapper tag does not yet exist, and I do not have the reputation to create a tag. hmmm – Phaestion Oct 24 '14 at 09:26
  • I created the tag for you. Your question is awful broad though, stackoverflow is intended for specific programming questions. – Gerald Schneider Oct 24 '14 at 09:37
  • This works OK for me with the sample app on Ubuntu 12.04 and 13 using java 8. Launches and sets up OK including the shortcuts. Are you specifying a bundle logo? Also does the sample app work OK for you or also produce this error? – AntonyM Oct 24 '14 at 14:32
  • Do you have a .icns file under your app-complete folder after its been installed? (http://www.jwrapper.com/guide-where-your-app-is-installed-and-logs.html) – AntonyM Oct 24 '14 at 14:34
  • Thanks Gerald. AnthonyM, I'm on a 14.04 system. I do get all the correct icons when using the bundled JRE 1.7 from the JWrapper site. I have bundled the sample app with the Java 8 and it does produce icons now, which is strange - I will investigate further. I have .ico and .png files under the installation folder, but my app's .png is empty where the sample app's png is actually contains an image. My next attempts will be to swap out my app's image with the sample app's image. Maybe there are some restraints I am not aware of. – Phaestion Oct 24 '14 at 15:26
  • Hi Gerald swapping the images sounds like a good idea to test, you could also check your JW compilation output to see if it complains about the image? It should accept PNGs OK but maybe its picking up the wrong file or maybe there is some weirdness to the file somehow? – AntonyM Oct 24 '14 at 16:14
  • So I have found out by experimentation that the bundle icon must be 245x256 pixels, otherwise it does not create an icon in the Ubuntu dash, and no .desktop file in the ~/.local/share/applications/ directory. I have tried 245x245, 256x256, smaller and bigger. I have a workaround at least, though it is obscure. 245x256 it is then. :) – Phaestion Oct 24 '14 at 16:15
  • Looks like we had a race condition there :P Seeing as I have found a solution, although it is a workaround, I'll write an answer for my question. Thanks for the ideas and input. – Phaestion Oct 24 '14 at 17:24
  • Great that you have a solution but very odd! Is it the PNG that you reference in the JW XML that has to be 245x256 or are you experimenting with different PNG sizes in a .desktop file? If its the former could you email a good/bad PNG into JW and we'll try to figure out why its failing? – AntonyM Oct 25 '14 at 00:17
  • AnthonyM when the app is installed the /home/USER/.JWrapper/APPNAME/JWApps folder contains an icon, which I can clearly see should be the bundle icon, is that is empty and is reported to have a size of 0 bytes. If I may speculate I'd say: JWrapper build process attempts to resize the provided bundle icon to 245x256 but on a Linux build this somehow fails and an empty image is shipped with the bundle. Thus by making the icon 245x256 the resizing operation is skipped and voila, the image is included as is. Sure I can email it to you. What address should I use? – Phaestion Oct 28 '14 at 06:12

0 Answers0