Flex application packaged in AIR doesn't show it's window - apache-flex

I have a Flex application that builds and runs from Eclipse without any problems. I've created an Ant build based on the sample provided by Adobe and builds the application and packages it up into an AIR application. No errors occur during the build process and an AIR file is created.
The problem is that when I install the AIR application and run it, there is no UI at all. The process is running because I can see it in Task Manager but I can't see the app window. I've commented out all of my initial code so just the first window should appear but still nothing.
Is there anything that I might have missed in the build to cause this problem?
Thanks in advance
Andy

OK, found the problem. Turns out I was missing the following parameter in the Ant build script:
<arg value="-include-libraries=${libs}"/>

Related

How to run javafx with maven desktop application from a jar file outside Netbeans 11 on my laptop or another ones?

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

Compiled QT app from source, app doesn’t want to open, even from old commits that were working

I have this project hosted here:
https://github.com/thistleknot/DiffMatchPatch
I was VERY meticulous and verified each of my commit’s ran a successful compiled version.
However, now… no matter what commit I use, by copying to a new directory, or try to create a new blank project and import old header’s, forms, and cpp files in… I can not get the app to run. It builds, just never opens.
I even tried debugging my main function by inserting breakpoints and it just skips right by them.
Any ideas? This happened to me last night when someone was assisting me. The compiled app just exits from task manager with no errors or messages. It does ask if I want to run as admin however. But that’s it.
You're building on a platform that doesn't inform you of things that are wrong. Namely, there are two main symbols in the project. You can't have the test harness and the application under test in one project. Those need to be separate projects.
Simply remove diff_match_patch_test.[cpp|h] from the project and you'll be all set.

clean project in flash builder on debug launch

Using Flash builder 4 to build an AIR app.
I keep having my code changes not take effect when I launch the project with the debugger, probably happens about once an hour. So does anyone know how to have FlashBuilder clean the project automatically before each launch?
Thanks
I'm having a similar issue with a Flex application. If I make a change to an .as file the change is not taking effect. The component is being instantiated by a parent component in the application so the compiler should be catching any changes I made. In fact, I can put a syntax error in the file and it won't report a problem. I've uninstalled and reinstall Flash Builder 4. I have to do a clean every time. I tried the tip from rakslice's comment of compiling with mxmlc manually and it successfully compiled without any clues as to what the issue with incremental compiling in Flash Builder 4 is. I finally added "-incremental=false" to my project's additional compiler arguments. This takes longer to compile of course, but I find it easier than having to click Project --> Clean every time.
I find that as long as I don't change code and/or recompile while an active debug sessions is on-going; I have no issues with the application not picking up code changes between subsequent runs.
I'm finding that I have a very similar problem. Everytime I launch my Flex app in a browser I have to perform a Clean just to get it to run.
I have noticed that I get a JavaScript error saying 'swfobject' is undefined odd error to be getting.
Not sure if that helps?

Flex, Ant and TeamCity

Is anyone using TeamCity for building their Flex apps? We're using .Net for our main site code and backend flex data calls and we use flex for our application. I have a working Ant build script, but I can't get it to run with the TeamCity Ant Runner. I'm curious if anyone has gotten this working and if they have, could I potentitially see a sample of your build script?
For some reason the build script won't pick up the FLEX_HOME environment variables for the Flex Ant Tasks.
I cannot see why it shouldn´t work. Just declare FLEX_HOME in the top of your Ant script, and point to the sdk on the TeamCity machine, like:
<property name="FLEX_HOME" value="c:/adobe/flex/sdk/3.3"/>
On a previous project I worked on we had exactly the same situation as you and it can work. I can't remember doing anything special to get this going although we may have had to manually set some environment variables in the TeamCity config. Check out the TeamCity docs for how to set these and how to they are used
You might also try using the basic Command line runner to see if that works. When troubleshooting environment variable issues in TeamCity I have found it useful to have part of the build process run a DOS set command (env for Linux) and then look in the build logs to see what the actual environment is.

Running a JavaFX program within a web page, not launching a new window

I've seen lots of examples of JavaFX in my reading, but every JavaFX app I've seen need to be launched in a separate window. The apps don't run within a web page.
Can JavaFX applications be run within a web page, just like we would expect a Flash app (or, for that matter, an applet) to run? Is there a reason why people aren't letting JavaFX apps run within their web pages?
Is there a particular bit of HTML code that needs to be used to get a JavaFX app to run Flash/applet-style?
Yes, just build a demo JavaFX application in NetBeans. I'd be surprised if they didn't provide you with some type of 'Hello World' test app. Then take a look at the HTML page it creates.
If you run into problems getting your JavaFX app to run on a webpage, take a look at this question. The short story is that you can't just copy jar files and copy and paste the appropriate HTML into your webpage. You need to include the JNLP file NetBeans creates, and you have to edit some of the NetBeansy stuff in the JNLP file.
Yep, just use run application as Java Applet. NetBeans will deploy all FX stuff correctly for all platforms including Java Applet.
See....
http://www.javafx.com/samples/SimpleVideoPlayer/index.html
Yes you can do it.
Look for about JNLPAppletLauncher

Resources