I have a server java project, which runs on glassfish.
How does it put into the package and run on any machine and install it?
Glassfish is a heavy server. If you wants to deploy your application on several machines, you should use a lighter Java server.
You can look at theses project, which provide a package with an embedded Jetty web server (with startup scripts for all plarforms: Windows, Linux, Mac, Solaris, etc.).
http://jenkins-ci.org/
http://www.sonarsource.org/
http://nexus.sonatype.org/
Once your application can work on an embedded Jetty server, create an installer will be much easier (with InnoSetup, IzPack, etc.).
Making Multiplateform installer with Izpack is really easy and fun. You can package your application in installer and run on any machine. Just go through the tutorial here and you will have your own installer.
Related
I have requirement to create installer for java application. The application should serve as Native Windows Service.
I have seen following projects which can be used to execute Java Application as Windows Service.
Java Service Wrapper
YAJSW ....
Issue:
As i have to deploy the service on more than 20 systems (Can be increased with passage of time). So i think i would be good enough to create installer and distribute the installer file.
So how i can create installer file for java application which run as Windows Service ?
This is an example, using the built-in support for Java from Advanced Installer.
Advanced Installer will generate at the end an MSI that will install your application, a wrapper EXE that can also run and install as a Win32 service. Along that it contains many other options that could be handy, like an automatic updater, etc...
I have a question about deploying windows application with java module.
I have windows application with several modules. One of these modules is written in java and is packaged as jar-archive. And if there's need for using this module, the application ask jre to start execute this jar.
For this time during application installation it's initialized jre installation.
I would like to understand the following.
Is it possible to install during application installation silently install jre in the application directory. So it jre copy could be used by the application.
I'm talking about structure like this:
/app
/app/jre
/app/modules/myModule.jar
So if it's needed to run myModule.jar I could do it with java from app/jre/bin ?
I saw something like that at Spark messenger (http://www.igniterealtime.org/projects/spark/). This application uses its own jre, which is installed at /Spark/jre/. But as I understand, this application is written in java and builded as a windows distributive using install4j.
I tried to find the answer to my question, but maybe I'm doing something wrong, I always find a solution of creating an exe-wrapper for jar file.
I would like to know about possibility to deploy application with installing jre locally in application folder.
You could ideally have used Java Web Start in the past.
Currently, you can use javapackager.
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html
The javapackager command allows developers to create standalone native install bundles that do not require a separate JRE installation. The native options include: installer, image, exe, msi, dmg, rpm, and deb.
This is ideal for desktop applications, where the user may not have their own JRE installed and just wants the program to run. It may not be appropriate for server-based applications where an administrator would want full control over the environment.
https://blogs.oracle.com/java-platform-group/entry/java_web_start_in_or
In your /app/jre/bin folder there should be an executable binary called java. So in your folder /app/modules you can run
/app/jre/bin/java -jar myModule.jar
That should work.
Am getting into java web development and currently web server (tomcat) is running on the same laptop I use for coding. Now, I want to install FreeBSD on other computer, then install stuff like tomcat, some db server to learn more about unix and have a more real world environment. Idea is to have my laptop for coding (it uses win7 and InteliJ as IDE) and this other computer (freeBSD on it) for server side stuff. So my question is, how do I make this happen? Is there a way to connect intelij to that computer and have intelij acces its file system where my web related stuf would be stored. That sounds like a good way to do it. Give me some advice and pointers, Thanks !
Not sure if this is what you want.
IntelliJ will allow you to remote debug an application in the tomcat server. However to have IntelliJ reload the application to tomcat requires the ultimate edition of IntelliJ.
That said you can write scripts or use Maven (Ant or Gradle) from within IntelliJ to deploy your application to Tomcat, its more clunky than the remote deploy option with ultimate.
Does Install4J has the feature of installing MySQL 5.0 and the database i have created ,for my Java Application on windows which is developed in Netbeans IDE
Utimately what i need is an .exe of my Java Application which is in Netbeans IDE and Installer that installs my Application into the clients system and the database created in MySQl .
Please Help with this
You could do this as part of a custom script to be run as part of your install but most likely you'd have to tailor it to each target environment. It would probably be a bit messy though as the installation process would vary wildly from Windows, to OSX, to Linux (and different Linux distros). Also, you'd have to deal with overwriting existing installations.
If you're code is database agnostic consider using something like http://www.h2database.com/html/main.html. It's pure Java (nothing to install besides adding JARs to your app), runs both in memory and persistent to disk, and feature rich. It would be much easier to deploy as you could have it save the database data in your apps install directory.
Add the MySQL installer on Files->Distribution Tree and run it with a "Run executable" action after the "Install Files" action has run.
Probably there's an argument for running that installer in quiet mode and to modify parameters of the MySQL installation.
I plan on using solr on my VPS.
My server is Ubuntu.
Does anybody know if Jetty can run without problems on Ubuntu, just as in the example Solr distribution?
With Tomcat it is possible, but my Q is, is it possible with Jetty?
Thanks
Yes. Works fine.
We have run several internal applications for a while on Jetty on Ubuntu and Debian. This works absolutely fine.
We bundle everything in a debian package and distribute it complete, appserver wars and jars as one package.
This is a lot easier than deploying on the standard tomcat distribution.