Distribution of Application
Hello,
I have complited my project and it is time to distribute it to my friends. But there are some things that i don't know. First, i thought that i will distribute .jar file which netbeans create. But i used third party API to write my project. So to run the .jar file it needs third pary API's library in the same directory with .jar file. Because of this i can't just give the jar file. I need to give one .jxl file with the jar file. It is not good to tell eveyone don't delete .jxl, it does not work etc. What should i do ? This is the first time that i will distribute an application, i need some suggestions. :confused:
I did some research and found; .jar files can be converted to .exe files. What you think about this proccess ? Do you advise that ? I have no idea about it ! Actually no idea about all this stuff.
Re: Distribution of Application
Are you able to execute your program from the one jar file and have the code in that jar file find the classes in the other jar file? If not, do you know about the Class-Path: record for the manifest file?
Re: Distribution of Application
First i am using netbeans. When click the jar file in project's dist folder, it runs. But if i copy the jar file, paste another location it is not working. However if i copy the jxl.jar api file also in the same directory it runs. So as you see your question's answer is depends on the situation. I don't have any experience about this subject. I can't give a clear answer to you. I hope you understand my situation. Let's say it is not working with just one jar file. What should i do ? After wrote this message, i will also do research about this ...
Re: Distribution of Application
So, if I understand correctly, when you place the program.jar and jxl.jar into the same folder then the application works. If that is the case I would just have the distribution be a folder containing the two .jar files. If you wanted to you could zip the folder but that won't really do anything. As for creating a .exe go ahead and check out JSmooth. There are plenty of other programs like JSmooth as well if you don't like what you see.
Re: Distribution of Application
You have understood me correctly. I have been looking that kind of programs since this morning. I used jsmooth and created program.exe, it runs on my laptop(win 7). But when run it on my desktop win xp (jre installed, jdk not installed !) It said You have to download java. Do you want to download ? ( Jsmooth's property as you know) I installed jdk, but didn't run. I didn't understan what is the problem.
Also i want to ask a another question to you . If target machine hasn't jdk , like happened to me, is there any way to run the program without installing jdk ?
I used Advanced Installer and qsetup to create a setup.msi file. Advanced Installer work but i used demo versions, do you know free version of this kind of programs ? Qsetup is too professioanl for now, so i didn't use.
Re: Distribution of Application
I may be able to help a bit here. In the JSmooth User Manuall there is a section called JVM Bundle which describes a way to include the jre (~12mb). As far as I know, you would not be able to run the program without at least the jre. I can't think of any free installation creators other than NSIS, but I think it is kinda old at this point.
Go here to get the jre.
EDIT: Forgot to mention that I'm not sure why the xp machine wouldn't run it if you did the installation. Perhaps a restart was necessary? I also noticed, unfortunately not soon enough, that Launch4j seems to be updated more than JSmooth and may possibly yield better results. I'm going to set up some tests to see what I can get to work as well. I said the jre is ~12mb, that's just the installer it is actually around 86mb.
Re: Distribution of Application
I am testing these programs too. I will give feedback about that...
Re: Distribution of Application
No idea about netbeans, but eclipse has an option to extract required libraries and files into the Jar.
And as for creating a .exe, I'd be way more likely to run a jar than a .exe. That's just me though.
You could also look into Java webstart.
Re: Distribution of Application
Finally i distributed my project, i converted it .exe with using Excelsior JET. But if i want to use it for CMS it is very expensive. For now i am satisfied.
@KevinWorkman
Can you explain why are you thinking in that way ? Because, after i distributed the my project, i need to add update option to my project. It will check the version of the program and if needed it will update the program. I have no idea about that, i started reading today. As i see, .jar files can be updated even while it is working. So does JAVA's update feature work for my application which is converted .jar from .exe ? If it does not, i suppose i need to use .jar file instead of .exe
Re: Distribution of Application
I'm not really sure what you're asking me. Did you look at Java Webstart?