Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 10 of 10

Thread: Distribution of Application

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Location
    İstanbul
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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.

    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.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default 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?

  3. #3
    Junior Member
    Join Date
    Aug 2011
    Location
    İstanbul
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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 ...

  4. #4
    Member
    Join Date
    Sep 2011
    Location
    United States
    Posts
    30
    My Mood
    Fine
    Thanks
    0
    Thanked 6 Times in 5 Posts

    Default 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.

  5. #5
    Junior Member
    Join Date
    Aug 2011
    Location
    İstanbul
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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.
    Last edited by Onur; September 12th, 2011 at 04:33 AM.

  6. #6
    Member
    Join Date
    Sep 2011
    Location
    United States
    Posts
    30
    My Mood
    Fine
    Thanks
    0
    Thanked 6 Times in 5 Posts

    Default 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.
    Last edited by SerratedMind; September 12th, 2011 at 05:31 AM.

  7. #7
    Junior Member
    Join Date
    Aug 2011
    Location
    İstanbul
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Distribution of Application

    I am testing these programs too. I will give feedback about that...

  8. #8
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,180
    My Mood
    Hungover
    Thanks
    141
    Thanked 602 Times in 517 Posts

    Default 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.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  9. #9
    Junior Member
    Join Date
    Aug 2011
    Location
    İstanbul
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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

  10. #10
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,180
    My Mood
    Hungover
    Thanks
    141
    Thanked 602 Times in 517 Posts

    Default Re: Distribution of Application

    I'm not really sure what you're asking me. Did you look at Java Webstart?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. how to run any installed application through my java application??
    By sgsamanthjain in forum Java Theory & Questions
    Replies: 1
    Last Post: April 1st, 2011, 08:17 AM
  2. Replies: 2
    Last Post: March 23rd, 2011, 08:51 AM
  3. random uniform distribution with probability assignment
    By blascobz in forum Object Oriented Programming
    Replies: 0
    Last Post: February 28th, 2011, 08:16 AM
  4. [SOLVED] [help] the application file (.jad) for application does not appear to be the ....
    By ordinarypeople in forum Java ME (Mobile Edition)
    Replies: 0
    Last Post: April 4th, 2010, 03:50 AM
  5. Replies: 0
    Last Post: December 3rd, 2009, 03:43 PM