I have a telecom desktop application(EMS) developed in java Swing. Its an old application developed and maintained in swing from last 10 years. Now we are planning to update GUI pages using javaFX technology for better and clean look & feel.
I had gone through various stack overflow discussion stating difference between javaFX and Swing. Please someone help me to understand the challenges in upgrading to javaFX GUI considering below constraints:-
-Application needs to be deployed in Unix, Solaris, HPUX, MAC and window 7/8 OS
-Some third party jars are also used along with JRE
-Current supported JRE is java 7
-There could be a plan to support android/apple/blackberry handheld devices
-We are not using Database for persistence but live data to display.
This answer is based on the detailed constraints of the question and is not a general comment on Swing to JavaFX ports. Parts of this answer will inevitably get outdated, perhaps fairly quickly.
Given your constraints, you can't upgrade your application to JavaFX.
Solaris and HPUX are not supported deployment platforms for JavaFX and that is unlikely to change.
The only way you could get JavaFX to work on Solaris or HPUX would be to use an unsupported configuration such as running a VirtualBox VM on Solaris or HPUX as the host OS, and in the VM run a supported OS, such as RedHat 6 or Oracle Linux 6, then running your JavaFX application within the supported OS - this may or may not work.
Also, I think it unlikely JavaFX would be ported to run on blackberries any time soon. There are ports of JavaFX to other mobile platforms, and they work for simple applications. I haven't tried them and think of JavaFX applications targeting such ports as a bit experimental at this stage. Such ports do not execute on an Oracle JVM and JRE, so if you use external libraries they have to be compatible with the port runtime (e.g. the Android Development Kit, RoboVM libs etc).
If you ported parts of your application to JavaFX, I would recommend running on a minimum of Java 8 rather than Java 7. Many bugs were fixed and many new features were implemented in JavaFX for Java 8. In particular for a Swing->JavaFX port, the integration capabilities of JavaFX and Swing were improved in Java 8 with SwingNode. To help ensure your target systems have the correct runtime installed you can package your application with an appropriate JRE as a self-contained application.
Of course, if you can relax your constraints a bit, there are many positive points for JavaFX.
Related
I recently learned about JavaFX not being included in Java 11, and have a question about how this will work.
Right now, I maintain an application that targets Java 8, uses mostly Swing but some JavaFX, and has a non-developer user base. Some of those users are on older operating systems, so I'd like to continue targeting Java 8.
However, Java 11 comes out next month, and I'm concerned that some of the users on newer operating systems will upgrade to Java 11, and the JavaFX components of the application will cease to work.
So what is the best path forward if you wish to continue targeting Java 8, but have JavaFX work for those who install JRE 11? I see several options, none of which are perfect:
Require installing JavaFX separately. If so, I'll need to know which edition - most likely the OS-specific SDK from https://gluonhq.com/products/javafx/? Not ideal since it's another install, but I already have instructions for installing Java for those who don't have it.
Bundle a JRE and JavaFX, and have startup scripts that force the use of that JRE. Not ideal because the download size would drastically increase, and it would require separate downloads per OS, but I've made distributions that bundle a JRE before.
Fall back on Swing instead of JavaFX if Java 11+ is detected. I could potentially do this, since my application started out as Swing and only a fraction has migrated, but it's also not attractive since the newer, JavaFX-specific functionality I've added would be lost.
Try including the JavaFX runtime as a .jar file and loading it on the classpath manually, perhaps only if Java 11+ is detected?
I'm curious what your thoughts are, and if there's a better option I've overlooked. I didn't anticipate JavaFX being removed from the JRE someday when I adopted it!
To my opinion the days where you asked your users to install Java on their client machines is over. The better solution is to create an operating system dependent installer which bundles everything with the application. I am also wondering if the size of such a bundle still really matters. A single video downloaded from YouTube is probably much bigger. Instead, by bundling you save yourself a lot of headaches.
Can we develop an application using JavaFX and run it on multiple platforms, including mobile(Android, iOS) and Desktop(Windows, Mac, Linux) as well?
Latest Oracle MAF (2.1.2) runs on both Android and iOS.
http://www.oracle.com/technetwork/developer-tools/maf/documentation/maf212certmatrix-2524539.html
Support for Windows phones it has been in talks for a while, it will won't be long until Oracle will make it available.
JavaFX is supported on Windows, Mac and Linux. It is not supported on iOS or Android although there are third party solutions provided by the community for that (RoboVM for iOS). This might be the reason you were unable to find instructions on how to set up Android Studio with JavaFX.
Generally JavaFX 8 is very reliable on all three platforms. Please note that JavaFX 1 is an entirely different thing than JavaFX 2 and 8. Not only does it rely on JavaFX Script instead of Java, it also focusses more on browsers and mobile devices.
I wonder if my standalone application that gui is being made using JavaFX 2.1 would run on a quite old computer with Windows XP, because this app is intended to work on that computer. I'm asking because I'm begginer to JavaFX and it seems like that technology has quite high requirments, last time I've got warning: "bad driver version detected, device disabled. Please update your driver to at least version 8.15.10.2302".
If your machine meets the minimum system hardware requirements and you have a recent graphics driver installed, then JavaFX 2.1 should work on your Windows XP machine.
Whether JavaFX will work on a machine depends on the hardware in the machine as well as the graphics driver installed.
Here are the JavaFX 2.1 system requirements.
The version string you reference would appear to be for an integrated Intel chipset graphics driver. You can download current versions of such drivers from Intel.
Update
If your system does not support hardware acceleration, then JavaFX
uses the Java2D software pipeline" - just to be sure, my program will
still work, but with poorer graphic, right?
At least in some cases with older drivers, it would seem that the app will work by falling back to a software pipeline. While this kind of fallback will work for a large percentage of older hardware and software combinations, I don't think it is fully tested given a wide variety of older hardware and driver combinations and I don't think there is a guarantee that the program will still run as expected.
The below outlines my experience with JavaFX 2.0 and 2.1.
If the graphics hardware is not listed in the JavaFX system requirements as being supported for hardware acceleration, then JavaFX will fall back to the software renderer and the app will work (albeit with potentially reduced performance and lack of access to some conditional features such as (perhaps) effects or 3D rendering). This scenario should be pretty uncommon as JavaFX supports a wide variety of hardware acceleration hardware.
If the graphics hardware is listed in the JavaFX system requirements as being supported for hardware acceleration and the drivers are up to date, then JavaFX will use the hardware renderer and your app will work. This is by far the most common scenario - any desktop purchased in the last few years should meet the minimum JavaFX hardware acceleration specifications and driver requirements.
If the graphics hardware is listed in the JavaFX system requirements as being supported for hardware acceleration and the drivers are not at a level required for JavaFX to function correctly, then the app may not work (the app may fallback to the software pipeline and continue running or you may get a message stating that the drivers need updating) or the app will just start experiencing rendering errors and possibly freezing or crashing. This scenario should only occur on a very low percentage of possible runtime targets.
If you have instances of hardware and driver combinations where JavaFX is not behaving as you would wish (i.e. not correctly executing your program, logging spurious exceptions or freezing and crashing), then file a jira issue with the hardware and software specifications to get the JavaFX team to look into providing support for that combination.
I know it is weird but I need to execute a Qt GUI application that supports X11 protocol on MS Windows platform.
It is obvious that if I build my Qt source code in Unix environment it automatically becomes an X11 application and this application can be run only on Unix Operating Systems, not MS Windows.
I tried to use MXE (MinGW cross environment) to compile my application in Unix for Windows, but it does not help for X11 issue. It creates an application for Windows but the application is not an XWindow application.
There is also a XPortMinGW project for minGW. But I do not know if it works for Qt applications.
Is there any way to build my Qt application with X11 support that can run in Windows OS?
I don't think that there's any need for cross-compilation. There are two problems:
Getting Xlib compiled for Windows. I don't know offhand of any maintained Xlib implementations that are ported to Windows. You will definitely need to find one, or make one. Hopefully Xlib depends only on a handful of posix APIs and they may be easy to translate to win32. Forget about Cygwin.
You may have luck porting Xlib yourself to Qt's network backend and making it cross-platform in the process, too. Xlib would simply use the core and network modules of Qt. No problem with that.
The good news here are that Qt 5 comes with a bundled Xlib implementation. It would be presumably much easier to get that to compile on Windows than some other implementation.
Configuring Qt to build using said Xlib on Windows. To do it right, you'll probably want to mess a bit with and rebuild the configure tool that comes with Qt, and add a makespec that will link with the Xlib.
This should be much easier to do with Qt 5.
It's not an entirely trivial thing to do, but should be possible. Give yourself a month and expect to get very intimate with some details of Qt's configuration and Xlib.
Notes About Cygwin
If your application is closed-source and distributed outside of your organization, you need to buy a commercial license in order to redistribute cygwin.dll. Otherwise, Cygwin is GPL and merely linking to cygwin.dll makes your application a derived work.
Cygwin becomes problematic when you mix posix- and non-posix code in the same application, especially if the non-posix code is a large framework like Qt. You can of course use the Posix platform code in Qt and make it all run on Cygwin, but that way you lose performance and expose yourself to shortcoming of Cygwin's emulation of POSIX APIs.
Using Cygwin for Xlib / windowing system but having Qt otherwise use Windows APIs may require a lot of tweaking for Qt code. So may using Qt with Xlib on Windows of course, but at least you don't have to debug/work around Cygwin's quirks.
I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things. Any tips or advice would be helpful
To launch the development ASP.NET server, just open a terminal window and run the "xsp2" command from the Mono installation.
The only thing that is missing from the Mono distribution on the Mac compared to Linux is the Apache module, that one you will have to compile yourself if you want to deploy your application in production on OSX.
Since I first worked with mono osx, they've added Cocoa# and ObjC#, but the ASP.NET core was pretty solid (about 3 years ago). You can in fact write web applications according to the Onion book, and port 'em to IIS with little or no difficulty.
Honestly if you want to run ASP.NET you probably don't want to struggle with getting it to run via mono on MacOS. Intel-based Macintoshes can boot Windows, and Apple provides Windows drivers for their various devices as part of Boot Camp.
Alternately you can buy Parallels or VMWare Fusion for less than $100. I use VMWare Fusion. There is also a Mac version of VirtualBox from Sun which is free, though I have never used it.
For MacOS development (not .Net) you really should try Apple's XCode. It is free. It primarily focuses on Objective C though Python, Ruby, and other languages can be used to develop native Mac applications.
Edit 9/22: I'm sorry neither you nor Kev found this a useful answer. Let me try to expand a bit: the Macintosh has a long history of software being ported in from Windows, applying a theme to make the GUI elements look Mac-like but otherwise being content with a minimum cost port. Such software never behaves like a real Mac application: it doesn't respond to AppleEvents, it won't be scriptable, it handles only the cross-platform clipboard formats, etc.
You're free to do whatever you want, including running ASP.NET using mono. If its for your personal use, knock yourself out. However if you're considering it as a way to offer your web-enabled product in a Mac version, I urge you to reconsider. The Mac market has for the most part rejected such products. You'll get some sales, but nothing like you would get for an app which behaves like a native Mac application.
Now, let the down-voting continue.
You can also run ASP.NET via NGINX - easy to install using:
sudo brew install nginx
See installation tutorial: http://www.robertmulley.com/tutorial/nginx-install-and-setup-mac-os-x-mavericks/
See configuration steps for your app: http://www.mono-project.com/docs/web/fastcgi/nginx/
(Note: see my pull request as the fastcgi-mono-server4 should now be used - https://github.com/mono/website/pull/82/files)
Why use Mono on a Mac? Run Parallels, VMWare, or Boot Camp.