• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Installing Java Application On User Machines

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic