auto-updating JavaFX/ScalaFX client installation - javafx-8

Is there any ready-made installer, component, api or any combination, that would let a JavaFX application, or any JVM based client for that matter, automatically and securely check for a new version of itself, and get, install and re-launch the new version?
Although not ideal, is it doable at least with sbt?

in the Moment there is only a feature request for Java 9
Take a Look at this aproach which seems straight forward
AutoUpdate by Reportmill

Install4J is a a tool for creating installers for JVM applications, it provides for creation of auto-updates
https://www.ej-technologies.com/products/install4j/features.html
You can also build Install4J projects from SBT using the sbt-install4j plugin (disclaimer: I am the author of the plugin).

I have come to believe that the most practical (partial) solution is Java Web Start. Mature, documented, and comes along with the JRE and JDK. I wonder if anyone had experience with it for ScalaFX or JavaFX applications.

Related

Is there a simple way of adding griffon functionality to groovy?

I've been learning about groovy and it works nicely with eclipse via the eclipse groovy plugin. I've been informed that I should use griffon if I want to write desktop applications.
Is it possible to add libraries/jars/etc to my groovy install so that I can create griffon applications? (I know that I could try this instead, but it doesn't really do what I want.)
Griffon is more than just a set of libraries, it's a full blown framework that provides a command line tool that takes care of many things, like processing resources, launching the application, packaging and deployment. It's also extensible via plugins. This being said, you cannot build a Griffon application with just its runtime libraries placed under ~/.groovy/lib

Eclipse configuration to support dual Equinox/Felix environments

What are some configuration changes to make Eclipse PDE best support working with both Equinox and Felix?
Here's an example problem I'm currently having. I can run my application ok via the Eclipse OSGi Framework launcher. Similarly, there are no compilation problems in PDE. However, when running in Felix I will get NoClassDefFoundErrors:
java.lang.NoClassDefFoundError: org/w3c/dom/DOMException
My understanding is it's my Eclipse setup that is at fault here; org.w3c.dom is not a 'default' OSGi package and shouldn't be loaded when I run it in Eclipse. Similarly, the import in my code for org.w3c.dom.DOMException should be an error.
I know how to fix this for Felix: declare an Import-Package. But that's not my question. My question is how to force Eclipse PDE to take on a closer configuration to Felix... basically to make it stricter in loading packages?
I think Equinox does behave like Felix, if you run it stand alone. It's more of an Eclipse legacy thing than an Equinox thing, as stated on osgi.org.
As far as I know, there isn't any way to override the boot delegation from Eclipse, but I'd love to be proven wrong, as I've faced this problem often.
If you are developing a server application I recommend to not use the PDE at all. I am using maven and the maven bundle plugin to develop my bundles. Then I deploy on Apache karaf. Debugging also is quite simple by using the karaf dev:watch command and remote debugging. I never really missed the PDE features and they never worked well with my maven build.
This sounds like that launcher is setting bootdelegation to legacy mode. See the following page on the OSGi Wiki: http://wiki.osgi.org/wiki/Why_does_Eclipse_find_javax.swing_but_not_Felix%3F

How to use Jersey with Eclipse Helios?

My base need is to use the Jersey framework to develop very basic REST webservices.
I've read several tutorials regarding Jersey (JAX-RS framework) and writing webervices but so for I've not found an easy way to setup a development environment based on Eclipse Helios and Glassfish (Open Source Edition). When creating a Webservice in Eclipse, it seems to use JAX-WS, or when creating a Dynamic Web App, Eclipse reports a credentials error (I use admin/admin) or a wrong user name / password.
The tutorials I've found either use myEclipse, or Tomcat, or Maven. The later works pretty well but I wish I could avoid using the command line because creating the web.xml and other files like that one is really scary, and I'm not sure these files are supposed to be human-written. So I suppose (maybe I'm wrong) using a IDE will make things easier.
What do guys use ? How do you generate these files ? Do you use Eclipse only for writting code or also use the deploy facilities?
Any pointers are appreciated !
Thank you
SCO
You DO need to modify web.xml whenever it's needed. Especially with JAX-RS, you will have to define your servlet in web.xml.
I recommand you to use Maven. There are plenty of exemple in the web to do so. Good luck, JAX-RS is really great ! Maven is also nice.
I also use eclipse for creating and consuming web service based applications. In addition to WTP, I also use Axis plugins to make things easier (through wizards, highlighting as well as for schema verification).
The bottomline is to find the plugins that suit you the best

Eclipse EAR module publish log

I am using weblogic worshop to develop my spring based application. Basically it takes lot of time to publish the application to weblogic server. Is there any way to find out what’s going on when eclipse try to build and deploy the project? Basically does it maintain any log file?
Thanks ,
Manoj
Weblogic does a stupid thing according to my experience. If you deploy some WAR, it extracts the libraries in it, and does some analysis in them. You can avoid this behaviour by removing the "static" (not changed by you during work) libraries from the war during development. After removal, add them to system classpath of the domain. It will publish and start a lot faster.
You will find better support for developing Spring applications for WebLogic Server if you migrate to Oracle Enterprise Pack for Eclipse. Workshop is legacy software that is no longer being actively developed. Using Workshop is only necessary for those developing with the deprecated Apache Beehive framework.
http://www.oracle.com/technetwork/developer-tools/eclipse/overview/index.html
OEPE includes a much newer publisher implementation, so you may find your issue resolved. If not, please post to OEPE forum for direct access to people who can answer you question.
Cannot post a forum link, but you can find it from the above URL or via Google.
Thanks Konstantin and Gabor for replying to my question.
Konstantin - I am using Oracle Weblogic workshop 10.3 and I am restricted to use this IDE only.I guess it has OEPE correct me if I am wrong.Also I tried the FastSwap action but everytime I save the changes to a java file the server says -'Publish' and I have to republish the entire application which is taking lot of time.
Thanks,
Manoj

SWT Deployment as EXE

I've recently started learning SWT (on class #4, to be precise) due to business requirements, and previously I had been developing with Swing for 2 years.
We deployed Swing applications as jars with resource dependencies. In SWT, what are the deployable forms and equivalents?
I have questions but since my training is online, I'm on a course-ware and there is no instructor, except StackOverflow:
Can SWT apps be deployed as independent EXE's? And what's with the "Eclipse EXE" thing people talk about? Does it mean that all SWT outputs will be Eclipse based EXEs? Or can they be completely independent EXEs?
If the answer to 1 is yes, how does the compiler produce native win32 executable code? This is one area where I'm thoroughly confused. Typically, a deployable jar is fed to the VM which reads the manifest and does its stuff, but an EXE as output? What's really behind the scenes?
How are external resource bundles managed? At the time of deployment?
Internationalization support?
Thanks.
Deploying an SWT application is exactly like deploying a Swing app, with the addition of several jars and a native library. You must currently be using some tool to make exe files for your Swing app; that tool may or may not be competent to also package up a native code library. It is unlikely that the tool is creating 'native win32 executable code'. Rather, it is packaging up Java class files along with the JRE and a stub Windows PE file.
SWT is developed as part of Eclipse. Eclipse has the Rich Client Platform, or RCP. If you build your Java application as an RCP application, you can use the Eclipse tools to generate an executable package for Windows (or anywhere else). It is not a single executable, it's a directory with an executable in it. However, you don't have to use Eclipse to use SWT.
An RCP application has to use much more than just SWT. It has to be constructed as a set of OSGi bundles that depend on the core Eclipse platform. Once you have such a thing running inside Eclipse, there is a wizard in Eclipse that will create a Windows 'executable' (a directory containing your code in JAR file(s), a lot of Eclipse code in JAR files, the JRE, and a PE .exe stub). You can automate that process from ant, though I've never done it myself. You will need to do book-length reading to get up to speed on all of this, I fear.
There no difference between SWT and Swing in terms of resources and internationalization. Other Eclipse-related libraries include an I18N discipline, but not the core SWT. You just use locales and property files as in any other Java application.
SWT is not Eclipse-based, but the Eclipse UI is SWT-based. Eclipse uses the SWT library for its drawing. It is used a GUI library from the Eclipse consortium, available for many systems. If you want to deploy your normal Java Application with an SWT GUI you just add the corresponding libs and .dll's or .so's. Therefore, everything you can do (deployment) with Java respectively speaking Swing, can be done with SWT, if you provide the according libraries. There are tools and ways to compile everything into .exe's but that is not necessarily needed.
I do not really get the Eclipse EXE thing you are talking about, but eclipse just provides a starter exe, which is basically just a wrapper. Otherwise, some people refer to Eclipse RCP als Eclipse EXE but this is not correct. You CAN use the Eclipse RCP to base your App and this would use SWT as UI library. But you can use SWT all by yourself just as library without the Eclipse trail.
I hope this helps.
You can use a java to EXE wrapper like this one http://jsmooth.sourceforge.net/.
Hope it helps.
Basically you need to get your project running with the conventional java -jar command.
Then create an exe bootstrap program that runs the command when you double click it.
Extra things can be done like checking JVM versions inside the exe program.