any good tutorials on creating an installer that will install a spring mvc web application, namely setting up tomcat and postgresql on someones desktop?
Best thing is to create a directory containing all stuff (tomcat+ webapp, postgresql) and a cmd script firing up the DB and appserver. Zip this up. Than, you can use a tool like http://www.advancedinstaller.com/java.html to wrap it up in an MSI file, that unzips the application, installs Java (if necessary) and create shortcuts.
This is assuming the target platform is Windows. For other platforms you can use a similar approach.
Related
I need to create a customized installer.
I have two primary requirements:
It is important to create a single installer to make the installation process easy and smooth.
At the same time I want to have as small an installation package as
possible.
The following components are required:
Java (JRE)
Apache Web Server
Apache Tomcat
MySQL
My Spring based webapp (This would go into the tomcat directory)
I am currently using xampp which makes Java installation external. It also contains some extra stuff like PHP, Perl which I do not need and by removing them from the installer I can save about 50 MB from the compressed file.
I am considering the following options but not sure what would be the best to go with.
Customize XAMPP - add required installers, remove unneeded packages. Not sure if this is the best way to use XAMPP.
Create a custom installer using Inno Setup
Create my custom installer using Visual Studio (lot of work, i guess)
What would be the best way to meet my requirements?
Thanks in Advance.
I would also consider NSIS. Read here to see how you can do multiple installations.
I have created a GUI application using Netbeans and it has a connection to a database( localhost).
Now I want to be able to distribute it as software.
Is there any way to produce a setup file for the Netbeans project? and how can I distribute a Netbeans project which uses a MySQL database?
how can I distribute a Netbeans project which uses a MySQL database?
You might want to get familiar with NSIS. NSIS will enable you to automate the installation process.
Your installation process will have to do the following:
Check that the Java Runtime Environment is the same version you used or higher.
Install your application JAR file somewhere.
Install the MySQL version that your application requires
Create and initialize the tables for your application.
Your installation process can do the following:
Create an uninstall executable.
Add an icon so that the user can start your application.
This installation process will take some time to develop and test.
You probably want to use an installer. Have a look at:
Install4j
Installshield (commercial)
Advanced installer if you target only windows platforms
There are many others but I hope this can help you...
Use the solution made by the suppliers of Java - Java Web Start.
The deployJava.js (described in the linked page) ensures the user has the minimum JRE needed to launch the app. & MySQL.
Launch the app. using Java Web Start.
Reference an installer-desc extension for installing the DB. Store any set-up details into the PersistenceService for later use.
JWS works on all major platforms for which J2SE is available and also provides..
..many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..
I am developing an application that will use MongoDB running on Windows Azure. This page http://www.mongodb.org/display/DOCS/MongoDB+on+Azure on MongoDB refers to a VisualStudio solution that has helper classes to get access to the mongo server settings and for deploying/configuring mongo instances. Is there a Java based solution?
Out of the box, the 10gen-provided solution is only a .net / Visual Studio version, which creates a Replica Set with several Worker Role instances. You'd then need to add additional Roles to run your app (such as an IIS-based web app in a Web Role, or a Tomcat-based Java app in a Worker Role).
The issue you'll run into: You'd need to:
Do your Java development in Eclipse
Generate the WAR file
Create your java scaffolding in a Worker Role in visual Studio which unzips Tomcat and the JRE, copies your WAR file to the appropriate directory, sets up the environment, and launches Tomcat.
If you want to forego Visual Studio altogether, you'd need to configure and launch mongod.exe from your Java startup script. When you create a Windows Azure project from Eclipse, you'll see that there are several sample startup scripts: one for JBoss, one for Tomcat, etc. Pick the one that matches what you're using, copying it over the main project startup script. Then you can customize it to grab mongod.exe and launch it. This should be pretty straightforward to create a standalone MongoDB instance, but you'd have lots of work to construct a replicaset. 10gen doesn't have an out-of-the-box Java project built already for this.
I'm working on Desktop applications. I'm using JFC/Swing to build the application.
Now I want to build application that can be upgradable by changing some jar files, instead of installing entire application again.
I'm stuck with some basic steps. I want to add JMenu from various jar files, so I dynamically added those jar files. Now my issue is that, I want to perform some functions like adding JInternalFrame to the main class, which loads entire jar files. I am not able to achieve it.
Please help me with this issue, and suggest any idea to make it possible.
Now i want to build application that can be upgradable by changing some jar files, instead of installing entire application again.
Java Web Start..
Java Web Start (JWS) is the Oracle Corporation technology used to launch rich client (Swing, AWT, SWT) desktop applications directly from a network or internet link. It offers 'one click' installation for platforms that support Java.
JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..
you can do it easily using URLClassLoader, you can see s simple example here:
http://snippets.dzone.com/posts/show/3574
We have a java application hosted on JBoss with a Posgres DB, and we've traditionally been selling it as an appliance (full server with application installed). Now, we need to allow clients to be able to download and install it on their servers. What is the best way to approach this? Ideally, I'd like it to be a one packaged installation file that they can run and it checks for dependencies, deploys the war file, executes the postgres sql to setup the database and start up jboss.
JBoss and Postgres will be installed by the client prior to installation.
The simplest way is to use a bash script for Linux and possible bat/cmd files for Windows, though that is not ideal. Are there any libraries available to accomplish something like this?
install4j can be used to let users install applications. The installation package will contain everything needed (application, JBoss, postgres). Furthermore, it has ant and maven tasks, too, and you can even allow the users to do some basic configuration on-the-fly.
The latest version of JBoss is OSGi based. Have you consider to use this solution ?
If JBoss and Postgres are already preinstalled and configured by users as they wish then it would be very difficult to make a silver-bullet automatic installer that takes into account and correctly handles whatever incompatibilities it can face in real life.
Maybe a detailed install instruction would be enough. Especially for advanced users. For the others - bundle some diagnoctic scripts in case they face problem.
Also consider using liquibase to do automatic database initialization and migration on application's startup. This would greatly simplify the rest of install procedure: just check deps, make datasource and deploy app.