Hi, i want to be able to install my newly created java application on a 'user' machine. However, I have several things to consider. Firstly, the program uses a database and therefore requires the MySQL JDBC connector. I have also used other external programs such as JasperReports. On my own machine its not been a problem to just drag these external jar files into the ext folder of the java home directory and then add a "classpath(?)" reference in my environmental variables. However, having to do this on evey machine the program is to be installed doesn't seem the most suitable or 'professional' way. It would be ideal to just have all the necessary files (ie MyApplication.jar, VariousJasperReport.jar, mysql-connector-xxx.jar) in one folder. Additionally, not having to set any environmental variables would be great also. I'm sure there is a way to do this as other java programs i may have installed on my own machine don't seem to make entries in the environmental variables or place jar files in the main java home directory!!
This is the first time i've tried to install my application like this so am a bit sketchy on some of the details. For instance.....the dreaded Classpath still remains a mystery to me despite article reading and all.... If anybody could give any advice it would be greatly appreciated. Thanks!
This shouldnt be a big issue, you can create a jar file and put all the class files of the libraries you are using in it.
For example if your mysql connector classes are in the ext/com/mysql/.. directory just place the com directory into the same directory as your other class files and the JRE will detect it when you run your program.
Have you looked at Java Webstart? It will handle all your jar delivery and update woes in a clean and professional manner without manipulating environment variables or worrying about where the jre is. will also create shortcuts and icons for ya too.
it's part of java itself, so search sun.com for webstart since i am being to lazy to provide a real link