I have a Java desktop application which uses mysql database . Is there any Open source software for packaging or executable wrapper of Mysql server and Java desktop application into one single Exe/Debian package where i need not separately install Mysql server separately . Its like one click installer which installs everything and the application is ready to use. Thanks
The problem here is that MySQL is a standalone server, and cannot be easily embedded. You should use an embeddable or serverless database, such as :
SQLite (see the SQLite library for Java, containing all the server and the API in one jar)
Apache Derby (see the documentation for embedded use)
HyperSQL
Just so it's said here, if you are not a Open Source project, what you are trying to do is not only a problem technically but also could be one legally. From the mySQL license agreement:
For OEMs, ISVs, VARs and Other
Distributors of Commercial
Applications:
OEMs, ISVs, VARs and other
distributors that combine and
distribute commercially licensed
software with MySQL software and do
not wish to distribute the source code
for the commercially licensed software
under version 2 of the GNU General
Public License (the "GPL") must enter
into a commercial license agreement
with Sun.
You'll probably have to script something together and use the NSIS installer builder (which is free) for Windows.
For Debian it'll be just some scripts which have to be packaged together in a .deb.
But I really don't think there is a out of the box, or off the shelf solution for this.
Good luck :)
Related
I want to use MySQL for my Java app, but is very important that the user hasn't to start or install any program before start the app, so, How can I install MySQL (If it's necessary) and start the MySQL server directly by code? Have I to use other database?
MySQL has released this presentation dealing with details on how to do it if needed. It lists these three options:
Embedded library
Silent windows install
Launch mysql form command line
Check the presentation for details (the .pdf in the .zip linked at the page).
Note that you have to be licence compliant also to do this. GPL for GPL, commercial for commercial.
You can use something like the Nullsoft Scriptable Install System (NSIS) to install MySQL on the user's computer, along with your Java application. Your Java application would have to create all of the tables needed by your Java application.
Your other alternative is to use a Java embedded database, like HSQLDB. Your user would just install your Java application.
I am developing a standalone application for a client using Java Swing and jdbc with MySQL. I am using MySQL as the database.I want to know that how the client can install MySQL, is there a way by which the client can install MySQL in his machine,or can i distribute the MySQL setup.The client just needs the software running and do not want to go to any installation process.
What is the way around with that??
Use Java Web Start to launch the app.
The MySQL installer can be invoked from an installer-desc element in the launch file. Here is my demo. of the JNLP API ExtensionInstallerService.
You're likely to find H2, HSQLDB, Derby, or SQLite to be more suitable for your deployment. They're intended to be embedded in other applications.
This might not be the simplest solution, but it is a good idea to have an installer for your application, which would take care of MySQL installation. IzPack is a very reasonable installation tool, which can execute external applications (e.g. MySQL installer) as part of the installation process. This discussion might be of some interest.
However, as mentioned in other replies, the use of an embedded RDBMS such as H2, SQLite etc., is a better choice than MySQL for a standalone application.
Few portable database alternatives: Derby, SQLite.
I'm developing a Java 5.0 application that connects to Websphere Application Server default messaging queues.
My application will be deployed on Windows server (with sun JDK installed by default), in order to connect to the Websphere queues I have two choices:
Using IBM JRE
Using sun JRE, copying some IBM JRE's jars, setting some JVM properties, ...
The idea is, the second choice was painful, I'm trying to go with the first choice.
My question is: can I install an IBM JRE 5.0 on a non-IBM windows machine?
The reason the IBM JVM is so hard to get hold of is most likely that they want you to pay some money for it.
The "Easiest Way" to get a IBM JDK for Windows is probably from here: (but that is without support) https://www.ibm.com/developerworks/java/jdk/eclipse/
Edit: Do the product you want to connect to not include a set of client jar files you just need to add to your application?
There are two "answers".
Technically, yes, it's possible and it works no problem.
Legally, I don't know if the IBM JRE is licensed for use or distribution by itself. It was my impression that it was licensed only as part of another IBM product (like WebSphere MQ, or one of the Rational tools), which would mean you would have to license the other product on the machine before installing the JRE, and you would use the installer for the other produce to get the JRE onto the machine.
Best to clear this latter question up with an IBM representative.
I'm not sure if there is a free-to-download-and-distribute IBM JRE. There are certainly IBM Win32 JREs that are not tied to IBM PCs and if you own certain IBM products, you can redistribute the JRE as per their terms.
For example, this excerpt comes from the pithily titled IBM Rational Application Developer for WebSphere Software 7.5.2 GA license:
DISTRIBUTION OF JRE REDISTRIBUTABLES
You may distribute the software listed
below (the "JRE Redistributables")
only in conjunction with Your
application and subject to the
following terms: (1) Your
redistribution of the JRE
Redistributables must be in object
code and must comply with all
technical and user directions provided
with the Program; (2) Your application
must redistribute other
Redistributables identified in this
license with the JRE Redistributables
unless Your application is designed to
run only on general computer devices
(e.g., desktops and servers) and not
pervasive devices; (3) You may not
remove any copyright or notice files
contained in the JRE Redistributables;
(4)You will indemnify IBM or third
parties that provide IBM products
("Third Parties") from and against any
third party claim arising out of the
use or distribution of Your
application; (5) You may not use the
same path name as the original
files/modules; (6) You may not use
IBM's or Third Parties' names or
trademarks in connection with the
marketing of Your applications without
IBM's or Third Parties' prior written
consent; and (7) IBM or Third Parties
provide copies of these files or
modules "AS IS," i.e., You are
responsible for all technical
assistance for Your application.
In Your license agreement with the
recipient, You will notify the
recipient that these files or modules
may not be 1) used for any purpose
other than to enable Your application,
2) copied (except for backup
purposes), 3) further distributed
without Your application or 4) reverse
assembled, reverse compiled, or
otherwise translated.
The JRE Redistributables software can
be found in the following directory on
the installation media:
/jdk/jre
You can lookup/search IBM software licenses at http://www.ibm.com/software/sla/sladb.nsf.
Yes you can download an IBM 1.5 JRE on a non-IBM windows machine. Go here to download the IBM 1.5 SR9 JRE as a .pak file. Simply rename it as a zip and unpack it.
no .. you cannot, this JRK/JDK is part of WebSphere Application Server, legally you cannot use it unless you purchased the license of WAS and the application is used to connect to the WAS
I authored a Java freeware (closed source) product that I deploy on a web host and distribute via JNLP, inclusive Linux clients.
I plan to suggest this product for inclusion into several Linux distro, if possible "as is" (JNLP-based).
Can I already contact distros, or I need to reconfigure something (deploy on another host, convert JNLP to something, etc.)? What is your experience?
I would say that a freeware JNLP application is pretty much the opposite of what Linux distributions would tend to include.
Firstly, JNLP will not work with the native package management solution. If you wanted to get an application included in a distribution it would need to be package in the native format and updated in the standard way.
Secondly, most distributions will favour open source packages and many will not include non open source packages in their default repositories. Some distributions may have specical non-free repositories. Up until OpenJDK you may not even Java itself would be in these repositories.
In my opinion you would be better trying to build a user base on your own as you then have complete control over releases etc.
Generally Linux distros aren't very interested in things they can't integrate into their release schedules. Since JNLP allows you to deploy a new version at any time, they can't do a version freeze before release. This will exclude you from most distros - Debian even removed Adobe's flash plugin for this very reason, and if they'll remove Flash, don't expect them to make exceptions for a less well known application.
If you're willing to distribute it as just a plain .jar, you might be able to get it in - for debian, you'll want to read the Debian New Maintainer's Guide and Debian Policy on how to package things, submit an ITP (intent to package), upload a package, then seek sponsorship on the debian-mentors mailing list. More info can be found at the Debian mentors FAQ. Packages submitted to Debian will also make their way into Ubuntu in due course.
Other distributions will have different policies, of course; if in doubt, check their faqs, or ask on an appropriate mailing list for the distro in question.
Figure out a way to package it properly on each of the platforms you want to include your software on, and prepare for rigid software management (freezing, multiple versions etc if you want the code included in the standard installation.
Otherwise you may be able to create a simple package just containing the link to the JNLP page which may be included in the non-core parts. It is worth a try.
What applcation are we talking about?
Java programs tend to be very difficult to package and maintain. Therefore guidelines vary from distro to distro. So you should have a look at the specific guidelines for some popular distros first.
In addition to that: Everything that updates itself independently from the package manager can be real pain for the user and maintainer of the package so you should consider a different distribution model for inclusion in linux distros.
Is there a distributed version control system (like git or Mercurial) that can be used as an embedded library in Java applications (to implement versioned and synchronizable storage for application data), ideally written in pure Java and under a permissive license?
#Josh Moore's reply led me to JGit, which seems to be a competitor to JavaGit. JGit is pure Java and licensed under BSD.
Some further digging unearthed HgKit, which aims to implement Mercurial in Java. It is still pre-alpha and GPLed.
I do not know of any pure Java solutions. But, check out http://javagit.sourceforge.net/ you can use it to connect to a git repository with Java.
There is a pure Java library, SVN Kit for interacting with Subversion