Jump to content

To finish my project

- - - - -

  • Please log in to reply
21 replies to this topic

#1
xle_camry

xle_camry

    Programmer

  • Members
  • PipPipPipPip
  • 141 posts
Hello dear programmers! My friend and I have made a JFrame application in Java.
We used NetBeans IDE 6.9. Moreover, we used Microsoft Access database.
So, everything is ok, our program works when we click Run file.
And at the end, we want to make our program executable in .exe format and
distribute it. We built .jar file, it is not a problem.
But how should we do it in .exe format? And also how should we place it in installer?
What programms can we use to make them? It must be like this:
1. User clicks setup.exe and it must install our application to PC.
2. User opens our application.exe and our application must work.
Additionally, we want to place our database.mdb into our exe file or into installer.
Is it possible? Are there any advices who can give me?

#2
HighKing Scott

HighKing Scott

    Newbie

  • Members
  • PipPip
  • 15 posts
I can't answer your part of the question that deals with creating the executable, I'm not familiar with that IDE, but as far as creating an installer for your software application, Google "Free Installer" and you should come up with a ton of freeware utilities that will do want you need.

Here are some examples:

Inno Setup
ClickTeam Install Creator

#3
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
And for getting a .jar into a .exe
Convert Jar to EXE, jar file to executable, java JAR to EXE. Converting Jar to exe. | ViralPatel.net

#4
xle_camry

xle_camry

    Programmer

  • Members
  • PipPipPipPip
  • 141 posts
Thanks, but is it possible to store my database.mdb file also into exe ??? What about my database file?
Will it be near my exe file or inside of it?

#5
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
If you put it in the jar, it will also be in the exe ;)

#6
xle_camry

xle_camry

    Programmer

  • Members
  • PipPipPipPip
  • 141 posts
No I think. What abt database? I show direction D:/database.mdb. But in other computers if there wont be my database, application wont work.
So, is it possible to store database in exe file too?

#7
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
I dunno, I never used those jar to exe programs. I assume you can as an installer is basicly just like a zip/rar unpacker.

#8
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Generally, you're going to want to use an installer to place the mdb file in the same folder as the .exe. Or you can distribute the whole thing as a zip file if you don't want to mess with an installer.

As a side note, an alternative to making it an exe is to ship a batch file to act as a launcher. This is what SQuirreL SQL client does.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#9
xle_camry

xle_camry

    Programmer

  • Members
  • PipPipPipPip
  • 141 posts
thanks WingedPanther, I think using an installer is more appropriate. There is no other way lol.

#10
xle_camry

xle_camry

    Programmer

  • Members
  • PipPipPipPip
  • 141 posts
WingedPanther, I have a question to you. Ok, I will place mdb file and exe file into installer, no problem. But what should i show path?
While writing code, we must show the place of that mdb file. My mdb is in D: database.mdb.
So, in other computers it wont work. What should I do in order not to mistake? What path must i show? Thanks.
You know it is like in html---> <img src="photo.jpg"> and <img src="D:photo.jpg">, in html we put it in same folder.
But in Java, where should we place mdb file? In which folder exactly?
Thanks!

#11
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Since you're doing this in windows, have the installer write to the registry where it went. Alternatively, if the mdb file is in the same folder as the .exe, then the exe can simply look in its own folder.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#12
xle_camry

xle_camry

    Programmer

  • Members
  • PipPipPipPip
  • 141 posts
What should i show in the code? about path i mean?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users