I have just written a java application to talk to a blood machine. And it posts its data to a web server using OAuth security and XML, and the application works great.
But now I need to distribute it to customers who have these machines. This program is in a .jar file and its also requires other .jar files which are in my project/dist folder.
During the execution it uses little .png files which are displayed as icons on the screen, that the user can click etc.
I want to some how wrap all of this together (including the images) and distribute them either by an installer or i can use a web server.
What is the best way to accomplish this, i tried to copy the .jar and the dist folder (as per the instructions that came out of netbeans) but when I run java -jar myfile.jar it prints out the text i had from the IOException because i have not included the .png files.
Code for the PNG files: Im using this:
try
{
databaseimage = ImageIO.read(new File("image/database.png"));
databaseDisconnectedImage = ImageIO.read(new File("image/database_delete.png"));
}
catch (IOException ioe)
{
System.out.println("Problem Creating Systray: "+ioe.getMessage()+" Current Working Directory is: "+System.getProperty("user.dir"));
}