So i created a javafx project, it has 3 packages, application, controller, and an images package that holds all the images im using. The program runs fine if i just compile and run, no errors. However, when i create a jar from it, by selecting the build.fxbuild, everything goes smoothly and it tells me it is successful but when i try to double click the jar file nothing opens but java starts running in the background until i force close it. Im running OSX yosemite, and im on java 1.8 if that helps at all. I've tried making the jar through the export option but it doesnt run either and just says that it cant open the file. The weird thing is i made another javafx project just to see if it would work, same settings but just something simple, a window that pops up and says a line, then exported to a jar by clicking build.fxbuild and when i double click the jar it made it works perfectly.
I'm at a loss for what is preventing my other javafx project from working as a jar file and the other similar posts ive found on here haven't solved it either. Any ideas?
Related
I am working on Netbeans apache 11.1. I developed so many desktop programs using java and could run them almost on any computer. But when I moved to JavaFX technology with maven I wanted to redevelop almost the same desktop apps using JavaFX, and everything worked fine into Netbeans 11.1. The problem is when I want to jar my apps and distribute them outside of Netbeans they actually do not work.
I tried everything I did in the past (which worked just fine) for instance: adding Class-Path and setting Main-Class to manifest but still does not work. I searched through a lot of forums and sites but still cannot run my app outside of Netbeans.
My code is as any code combination of JavaFX, Maven, CSS, and FXML. Everything works just fine into Netbeans. The problem is outside of it.
Although I've added openjfx-12.0.2_windows-x64_bin-sdk to windows environment path, when I attempted to run jar that's been generated by Netbeans using cmd I just get this ERROR: javafx runtime components are missing, and are required to run this application. ANY HELP PLEASE?
I don't know if I'm understanding your problem right (if not I'm sorry).
Runnable JAR JavaFX
What once helped me, was create a new run configuration (in intellij) with the main class and the JRE. After that I created a Run Maven Goal with the command line
assembly:single
It's really getting annoying and tiresome when I'm working really hard on something I need to complete and then I need to make a few changes to the GUI so I open Scene Builder and it doesn't open up.
I've tried
- Closing Eclipse and opening it.
- Killing the scene builder process and opening it.
What works
- Logging off and logging on and then opening eclipse & the scene builder.
This is starting to make me lose taste in JavaFX. Though I have to use this over Swing.
Also, when I open Scene Builder (from my desktop) it opens up just fine, though when I navigate to my Main.FXML (inside my project). Scene Builder can't be opened. It just does nothing when I open it, and it minimizes.
Even though this question has been asked some time ago, I want to contribute my solution to this problem because it differs from the other solutions and in addition is very simple.
This particular problem happened to me just a few mins ago and all I took to solve was maximizing the actual Scenebuilder window!
Open the Windows Taskmanager
Switch to the applications tab
Right click the SceneBuilder (named: yourFileName.fxml)
Select 'Maximize'
Description above works for Windows OS, on other OS the corresponding application managing program should do the same.
That worked for me just perfect. No copying and/or overwriting needed.
Its not the perfect answer but it works well. Try doing the following
1.Open scene builder directly from your local drive.
2.Click on File-> Open Recent -> Clear Menu
Then try to open up your fxml.
Works fine for me.
I am having the same problem. It appears that either SceneBuilder or IntelliJ IDEA put my FXML file in a state that Scenebuilder can't parse.
You may find it helpful to edit the logging.properties file and reopen the bad FXML file. On windows it's %ProgramFiles(x86)%\Oracle\JavaFX Scene Builder 2.0\app\logging.properties. You can set
.level = ALL
Then examine the file %TEMP%\scenebuilder-2.0.log for clues.
Valid java.util.Logging levels in descending order are:
OFF
SEVERE
WARNING
INFO
CONFIG
FINE
FINER
FINEST
ALL
Also, copy the FXML file to a temp dir. Try to open it there. I did that and it appears to have fixed the problem.
For me, copying the code from the .fxml file that didnt work with scenebuilder to a new (!) .fxml file on lets just say the desktop and then opening that one worked. After I opened the new file I saved and overwrote it back to where it was in my source folder, and it worked just fine from there on.
Open scene builder directly from your local drive.
Click on File-> Open Recent -> Clear Menu
this also works for me, try this
I use time machine and drop box to synchronize stuffs.
Recently I found that some files are gone.
However, the project compiles just fine as if the file is there. My friend cannot compile though.
This is very frustating. I got to find the missing files and then restore it from time machine and then readd that to xcode. I don't even know what files are missing.
I used dropbox and time machine. Looks like file disappear, the file names becomes "red" in xcode for a while and then poof it's gone. Xcode automatically remove the files from the project. The project still compiles fine which is frustating. If the project doesn't compile, I will know ah this file is missing.
Looks like somehow xcode still have the file but doesn't show it. Files is not on finder either.
What could possibly be the explanation and how to fix that.
I have clean projects to make sure that my computer do not use cached files.
It still compile fines in my computer
The file is still missing in project navigator
My friends' computer that uses the EXACT same files (connected to drop box) cannot compile
For example, xcdatamodeld files are crucial. In my computer it still run fine without that file even though that file is obviously needed. Xcode behaves as if the file is there all along.
My friends' try to compile the project and crash.
Also there is a PNG file. In my computer it runs fine with the icons showing up. In my friends computer the icons doesn't show up at all.
For anyone who still have the problem, in my case Xcode6. It turns out somehow the "Show only files with source control status" and "Show recent file button" is enable. It located in the bottom of left sidebar.
This somehow happen after I update os to Yosemite.
Cheers
Go to the project navigator (top left folder symbol). Files that are not found by XCode are displayed in red. But since your project compiles fine, there should not be any that are required. Now click one of the "missing" files to activate it. Open the utility area on the right side, and show file inspector. Under "location" you find the full path of this file. Probably, your XCode project uses just references to these "missing" files that are stored somewhere else, and not in your project folder.
I had the same problem ..then I added the files explicitly into our project…which resulted into Duplicate Symbols error …we solved that by following….
In Your Project go to targets-
At the bottom Bar of your Targets there are three options..
1.Add Target
2. Validate Settings
3. Build RUle..
Click on validate Settings….it will ask for you to remove the Duplicated files from the project do it…ur project would run fine
I'm having problems with deploying an application on Windows that displays an animated gif. For this purpose I use a QMovie and it works fine if I launch it from QtCreator. I gathered the files that are needed to run the application, and I can launch it just fine, but the gif won't show up.
I read this page and came to the conclusion that I need to add the qgif4.dll plugin which is located in qt/bin/plugins/imageformats. I tried copying it into a plugins folder next to the application, also plugins/imageformats, but it still doesn't work. I also tried to
QApplication::addLibraryPath(QDir::currentPath());
and copy the qgif4.dll file next to my executable - without any success. How do I fix this?
Put it in ./imageformats, relative to the executable.
I have a Flex project and am using a trial version of Adobe Flex Builder 3 to build it.
I do the following:
1. Change an mxml file in the project (for simplicity, assume I changed the text in a label).
2. Right click on the project, Export, Release Build
3. Right click on the main mxml file, Run As -> Flex Application
A browser window opens, everything runs fine, but I cannot see the change I made in step 1.
I thought the browser (tried with IE, Chrome) might be caching stuff, so I tried after deleting all temporary internet files, but I see the same behavior.
Am I being dumb and missing something or is there something going on here?
Check the timestamp on your .swf in your release folder. You might be running from a different folder.
Check the URL of the flex app in your browser to see if its running the debug version or the release version.
file:///C:/ASWorkspace/FlexTest/bin-debug/FlexTest.html
When you run a flex app, flex builder normally runs the debug version. Exporting the release build is done when the project is completed - release build won't have any debug information in it and hence will be compact. If you have selected Build Automatically in the Project menu, the debug version will be recompiled automatically when you save a file. You can just hit F11 to run it.