Page 1 of 2 12 LastLast
Results 1 to 20 of 22
  1. #1
    kiki2009 is offline Member
    Join Date
    Jun 2009
    Posts
    43
    Rep Power
    0

    Default How to create Setup for java application

    hello,
    i'm new to java, please anyone help and show me the way how to create SETUP for my dummy application.

  2. #2
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    7

    Default

    You don't create a setup with java?
    I die a little on the inside...
    Every time I get shot.

  3. #3
    kiki2009 is offline Member
    Join Date
    Jun 2009
    Posts
    43
    Rep Power
    0

    Smile what would i do to make it as executable

    Thank for that kind information.

    :)Please give me some idea about how to run it as executable, also how to include data base part in it like SQL Server 2005.Cause i'm using the SQL Server 2005 as the backend.

  4. #4
    ne0lithic is offline Member
    Join Date
    Jul 2009
    Location
    India
    Posts
    2
    Rep Power
    0

    Default

    Are you talking about an executable like a ".exe" for windows? Well the whole idea of Java is platform independence so what you can do is generate an executable jar file (an option available under the Export list in the Eclipse IDE). Then you can create a batch (.bat) file simply containing the line:

    java -jar myExecutableJarFile.jar

    This can be done using notepad as long as the file is saved as yourFileNameHere.bat

    This bat file then becomes an executable file under windows.

    As for the other question,

    Well ideally all your database related code is going to do, is contact an existing server and run various queries. In that case, you need to have the database up and running already so it wouldn't require any specific additional set up work.

    If you actually need to setup a database you need to consider using a setup creator software that is usually not free.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  6. #6
    corlettk is offline Member
    Join Date
    Apr 2009
    Location
    Brisbane
    Posts
    86
    Rep Power
    0

    Default

    In a word... webstart

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  8. #8
    corlettk is offline Member
    Join Date
    Apr 2009
    Location
    Brisbane
    Posts
    86
    Rep Power
    0

    Default

    Ummm... The web or the desktop... it works equally well with file:// URL's.

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  10. #10
    kiki2009 is offline Member
    Join Date
    Jun 2009
    Posts
    43
    Rep Power
    0

    Default

    thank alots ,
    which type of setup creator will i refer too.

  11. #11
    kiki2009 is offline Member
    Join Date
    Jun 2009
    Posts
    43
    Rep Power
    0

    Default

    above database it is workin but how to include it within the exe jar file and without going to the data sources and create the connection every time i want to run the program.

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    What type of database are you using?

    If it's a simple access database it's okay to include those files within the jar package. But if you are using a database like SQL, I don't think it's a good idea to include it within the jar file, it can be a huge in size as well. In such cases best thing is setup the database separately in the local machine. You can execute a script to create table structure.

  13. #13
    corlettk is offline Member
    Join Date
    Apr 2009
    Location
    Brisbane
    Posts
    86
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    If it's a simple access database it's okay to include those files within the jar package.
    Ummm... The MDB would be _readonly_ if it lived in the jar-file... and if it can be readonly then why use a DB in the first place?

    @OP: Typically the database is NOT embedded in the program... if that's what you're after then consider using JavaDB (extends Apache Derby. Ships with the JDK) or HSQLDB, or Perst, or Infinity or indeed any of the free "embeddable" Java-only RDBMS's.

    BTW... All these "client side DB's" still need to be configured to use the local filesystem... you still can't save the data back into your JAR-file.

    Cheers. Keith.

  14. #14
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by corlettk View Post
    Ummm... The MDB would be _readonly_ if it lived in the jar-file... and if it can be readonly then why use a DB in the first place
    What my point is, in most of the application I used access database for light-weight applications. I mean for databases with less amount of data. In that case included that database in the jar file is okay, rather asking from client to setup database locally. It's a mess-up. Most of the clients don't know those stuff. And also no messup with the exact table structure need in the application.

    And what happen if the database is not readonly? More than 90% databases used for read as well as write.

  15. #15
    kiki2009 is offline Member
    Join Date
    Jun 2009
    Posts
    43
    Rep Power
    0

    Default

    When i execute the program it run successfully and the database as well, from JCreator.
    I'm using sql server 2005 as my backend for my application, i have create exe file using jar 2 exe and installation part with Inno setup creator, but i can't include the database part inside the installation part so please help me to solve this problem.
    I really thankfull to you for your help.

  16. #16
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    As we discuss here including the database in the jar file is not a good idea. Say anyhow you've included in the jar file. At the installation how you going to handle the database setup?

  17. #17
    corlettk is offline Member
    Join Date
    Apr 2009
    Location
    Brisbane
    Posts
    86
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    What my point is, in most of the application I used access database for light-weight applications. I mean for databases with less amount of data. In that case included that database in the jar file is okay, rather asking from client to setup database locally. It's a mess-up. Most of the clients don't know those stuff. And also no messup with the exact table structure need in the application.

    And what happen if the database is not readonly? More than 90% databases used for read as well as write.
    Surely you must be joking?... On the other hand I may just be discovering what level of competence passes for "senior" on this forum... and I've got tell ya'... it's more than a bit whiffy.

    An RDBMS embedded in the executing jarfile? Ergo: a java program that rewrites itself as it's running? Can anyone spot the problem here? Just try a quick example of that, and please let me know how you get on.

    No, I really don't think so Tim. And even if it could be made to work why would you take the obvious security risks? No, much safer, simpler and saner to just create a database on the clients file system, like normal people. Definately, definately.

    Cheers. Keith.

  18. #18
    kiki2009 is offline Member
    Join Date
    Jun 2009
    Posts
    43
    Rep Power
    0

    Default

    then how to handle database during creating the setup, don't find it in Inno setup creator to include it because it cannot be leave open, it not that wise to let other see what it is in that database ,example like login it has been store in it and there should be some way to hide the databse from other to view it. as many application there is database behind it and we can't see what is in it after we install it so also it had been inside the setup file encapsulated.

  19. #19
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by corlettk View Post
    Surely you must be joking?... On the other hand I may just be discovering what level of competence passes for "senior" on this forum... and I've got tell ya'... it's more than a bit whiffy.
    Okay, you are more expert here than I. So can you tel me what's wrong with my comment? I think you've no idea what I mean in my last post. And also you have no idea about clients thoughts.

  20. #20
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default please help me

    Hai friends,
    I had developed an application for a video shop in netbeans in which the there were English,Hindi etc section .If the user choose the english the data means the list of dvd,cd will be loaded on the drop down and the list of coustomers or a textbox to enter the new coustomer who want to take the dvd or cd for rent,the appliction was mainly developed on swing,and the data that stores is in the ms acess.And there are other features also for the appliction.After the completion of the project the i clean and build the appliction,Then the netbeans create a jar file,But my problem is that how i will give the project to the customer ie the customer is a less knowledge in computer so i had to give this appliction in a setup formate so that if he clicked the setup it will auto matically install the software with the whole database connection and database ,and if any day he uninstalled the s/w the data that store initially has not be remove from the computer,i had gone through install4j s/w to make the setup but i not fully success in developing the s/w.Will any body please help me how to do the above thing or any website that form the tutorial to do ,

    Thanks in advance

Page 1 of 2 12 LastLast

Similar Threads

  1. java,jsp code to create a website statistics application
    By g.shashikala in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 08-15-2009, 05:00 PM
  2. Replies: 1
    Last Post: 10-21-2008, 01:16 PM
  3. Replies: 4
    Last Post: 09-14-2008, 05:19 AM
  4. What tool to create Install / Setup packages
    By mwildam in forum New To Java
    Replies: 12
    Last Post: 11-21-2007, 09:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •