Originally posted by Doug Nichols:
I have a GUI swing application that runs great in Eclipse. How do I distribute this to other people running Windows computers?
I know about making a JAR file, and how to use webstart to launch this from a website, however I'd like to keep it 100% localized to the user's machine.
thanks!
A JAR will make it "100% localized to the user's machine". It is even convenient to make the JAR executable.
Layne[/QB]
Originally posted by Doug Nichols:
So are most people using JSmooth for this, or is there a better one that everybody likes?
danke!
Originally posted by James Laison:
a jar file makes it convinient to run a java application by simply double clicking it. But the only problem is that it can't be executed on a system with a JRE.
Originally posted by Ken Blair:
Excuse me? Did that perhaps mean any system without a JRE? I'd like to see a client-side Java desktop application that can be. If you compile from Java into native code it does not count because it is no longer Java.
[ January 16, 2006: Message edited by: Ken Blair ]
Originally posted by James Laison:
I have tried it before. I created an exe file with a java exe builder. The exe will run fine on a system that has JRE on it and when you take it to another system with JRE, you will get an error or prompt say could not fine JVM. To the best of my understanding, even though you build an executable out of your java app, you still need the JRE for it to run on the designated client. Give this a try and u will c for urself.
Originally posted by Layne Lund:
I think you haven't built a true "exe" file then. There are programs available that will turn a JAR file into a stand-alone exe file that does not require the JRE to be installed. I haven't used any yet, so I don't know exactly how well they work.
Besides, this isn't what you wrote in your first post above. So I think you should go back and reread it and the response from Ken Blair.
Layne
Originally posted by James Laison:
I used exe4j from ej-technologies to create an executable for a java application but the executable will not run unless a JRE is present on the system.
If you don't mind, i will like you to tell us the java to exe builder software that converts a java application to an executable file and making the executable run without any jvm present on the system. I want you to experiment this and verify if it runs without a JRE or not.
And if it is possible to create an executable from a java app and make it run without a JRE, then you have solved a whole lot of my problems.
Chris Shepherd way of distributing his apps is quite very intelligent. Just that when someone double clicks the icon that launches the application, a command prompt window comes up because the batch file launches the program.
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Originally posted by James Laison:
I have tried it before. I created an exe file with a java exe builder. The exe will run fine on a system that has JRE on it and when you take it to another system with JRE, you will get an error or prompt say could not fine JVM. To the best of my understanding, even though you build an executable out of your java app, you still need the JRE for it to run on the designated client. Give this a try and u will c for urself.
Originally posted by James Laison:
a jar file makes it convinient to run a java application by simply double clicking it. But the only problem is that it can't be executed on a system with a JRE.
Originally posted by Chris Shepherd:
I have been installing java apps for years on customer's computers. On my machine, I create a directory which includes my jarfile and support jar files that aren't part of the JRE. I also include the entire JRE directory structure. Once all the resources and the JRE are included, I write a batchfile to call my jar with the localized JRE and throw it in there too.
Then I get an installation creator and bundle the whole thing up and ship it to the customer. He gets shortcuts to the batchfile placed in his start menu and/or desktop.
The major advantages of this over just using an executable jar file is that the user doesn't have to have java installed and even if they do, it doesn't matter if their version isn't the right one. You package the correct version for your app along with it and it's done. As a side bonus, many times the app is mobile as long as you keep it in the same directory structure (ie, run it from your hard drive or a thumb drive, or a CD,etc) as long as they can find the batch file and its writen to be path neutral, they can run the program.
We also do this on our hardware running linux as well. We don't use an installer, but as long as you can get your directory structure in place in a home directory it will run. Now the batch file has to be different because of the differences in how batch files are processed, and the JRE is different, but once you have the correct directory structure, batch file, and JRE, you can place that structure anywhere you have permission.
Hope this helps,
Chris
[ January 17, 2006: Message edited by: Chris Shepherd ]
Originally posted by James Laison:
If you don't mind, i will like you to tell us the java to exe builder software that converts a java application to an executable file and making the executable run without any jvm present on the system. I want you to experiment this and verify if it runs without a JRE or not.
Originally posted by Chris Shepherd:
Ken:
No I grab the entire JRE directory which includes all the necessary libraries and binaries(java,javaw) to run for the JVM I have been coding to. I have only been distributing to clients in Windows environments, so as long as my upgrade code is done with the same JVM that I sent to a client originally, there are no compatibility issues. I do hand place code onto a linux embedded system that lives in our hardware, but once I have a single drive setup right, I just clone the disk for each new piece of hardware ordered. If I had to distribute on different platforms, it could still be done just the way I describe, only I would have to get the proper JRE flavor for the platform in question, just as you said. As far as installing it, if you can make an installer or tarball, or any form copying a directory structure and dropping it in place, then my method should work fine as long as your batch file was setup correctly for that platform(my linux batch is different from my windows batch).
Always look on the bright side of life. At least this ad is really tiny:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|