0

I apologize if the title is a little too vague. I just exported my JavaFX project to .exe through the e(fx)clipse plugin and Inno Setup method. The program runs fine on Eclipse, but after exporting, the GUI fails to show up.

My code is hosted at: https://bitbucket.org/Sunquyman/powerball-lottery-generator

Is there any way to troubleshoot this? It seems aggravating not at least know the issue why the GUI fails display. I know the program runs, I see running in Task Manager, but nothing shows up. If you can find my issue, I'd be grateful

Luiserebii
  • 55
  • 2
  • 11
  • Can you run it from the jar file that is generated? – James_D Jan 23 '16 at 20:01
  • i just downloaded your application and see some misuse when reaching resources like "winners.txt". This [link](http://stackoverflow.com/questions/20389255/reading-a-resource-file-from-within-jar) may help you. – guleryuz Jan 23 '16 at 22:08
  • This might be part of the issue, thanks for this. I realize I can't write to that file inside the .jar, either, so I guess I'll have to make a separate folder for that. My follow-up question for now is: how do I make the installation of the .exe place a folder alongside the .jar (if that makes sense), since it seems to package all the files inside. (I suppose it might have to do with the other folders created during the build process, I'll do some research, but any links regarding this would be great!) – Luiserebii Jan 24 '16 at 00:08
  • There's no way that I know of to do exactly that, but if your application needs to read and write to a file to persist some application data, you don't need it to be done "alongside the jar file". You can just define a specific location, say a particular folder in the user's home directory (`System.getProperty("user.home")`). When the application starts, see if the file exists and if not write some default data to it. Then just read/write to it in the usual way. – James_D Jan 24 '16 at 02:22
  • Interesting... I found a way to do it from: http://code.makery.ch/library/javafx-8-tutorial/part7/ Essentially, moving the folder to /build/dist after building the build.xml file, adding the folder to xml, and then running the build. I'm tempted to ask a sidequestion: in that tutorial, someone wrote out a filepath as "file:application/text.txt" Why does that work? Also, does testing the .jar usually help resolve .exe problems? I'll definitely do that next time, thanks for telling me to do that! – Luiserebii Jan 24 '16 at 03:41

0 Answers0