944,105 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 13648
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Aug 22nd, 2007
0

Want to make exe/jar of a java based project

Expand Post »
I have done a stand alone project on Java Swing and MySql where the frontend is designed by Swing and backend is designed on MySQL

I wanna build an exe of the project by incorporating the MySql schema and tablespace into the archieved file(exe/jar)

Plz tell me whether is it possible?
If it is possible then tell me how can I do this .
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
arkaprava is offline Offline
34 posts
since Aug 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

you can create jar for your project

you have to make manifest file

Manifest-Version: 1.0
Specification-Title: Java Utility Classes
Created-By: 1.5.0 (Sun Microsystems Inc.)
Main-Class: maninclassname


save it as manifest.mf keep this file in current project folder.

and go to project location then type in command prompt:

jar cmf manifest.mf anyname.jar *.*

press enter then you will get your jar file created.
Reputation Points: 119
Solved Threads: 7
Practically a Posting Shark
vinod_javas is offline Offline
871 posts
since Feb 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

If you want to create Exe means you have to go for third party tool.
Reputation Points: 119
Solved Threads: 7
Practically a Posting Shark
vinod_javas is offline Offline
871 posts
since Feb 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

If you want to create Exe means you have to go for third party tool.
Please Mention one third party tool
Reputation Points: 10
Solved Threads: 0
Light Poster
arkaprava is offline Offline
34 posts
since Aug 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

execJAVA currently am using this exe converter from jar file.

but its trial version only.

you can download this from www.JavaAPIs.com

anyway you have to convert your application in to jar format.
Last edited by vinod_javas; Aug 22nd, 2007 at 3:17 am.
Reputation Points: 119
Solved Threads: 7
Practically a Posting Shark
vinod_javas is offline Offline
871 posts
since Feb 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

just Tried execJ but cannot include tablespace into the exe
The application is running from exe without any operation on database
Reputation Points: 10
Solved Threads: 0
Light Poster
arkaprava is offline Offline
34 posts
since Aug 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

nativeJ is an easy to use java-to-exe tool, but why would you want to make an exe of it,?

if you're intending to let other people use your program as well, I'd suggest you stick with the jar file.
Reputation Points: 938
Solved Threads: 357
Posting Maven
stultuske is offline Offline
2,528 posts
since Jan 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

Click to Expand / Collapse  Quote originally posted by stultuske ...
nativeJ is an easy to use java-to-exe tool, but why would you want to make an exe of it,?

if you're intending to let other people use your program as well, I'd suggest you stick with the jar file.
Jar file is good for using the software , also batch file can also be created
by which we will run the jar file without trying into commandline
but the problem is what will be the databases and connectivity how can I import database schemas in the jar file which will be created .
and suppose I want to run/deploy the application in a machine where the mysql server is not present and also classpath is not present , so in that case database schema and tablespaces also should be packaged with jar file

How can I solve it out jar along with schema and connections
Reputation Points: 10
Solved Threads: 0
Light Poster
arkaprava is offline Offline
34 posts
since Aug 2007
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

Read this arcticle "Convert Java to EXE" and you may find some answers
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004
Aug 22nd, 2007
0

Re: Want to make exe/jar of a java based project

If you are talking about DB server installation through your executable jar, I won't recommend it. See, DB installation requires user interaction, which shall not be easiest of things to achieve.

If you ask your application users to at least install DB server and have a default user, rest I think is achievable.

Without much thinking I can think of following strategy to get this done:
  1. Have a properties file with DB credentials - username/password and table space related values which user wishes to create for new application installation. This properties file should also contain default username and password.
  2. You can have a batch file which will call up a java code which shall in turn read from this properties file, login into DB, create tablespace and user in client's DB.
  3. Next, you can have all DDL statements in a file, and same java code can execute this sql file to create your DB schema.
  4. Once this is done have another batch file to execute the actual application code, which shall execute your application.

This is a two step process, but I guess would be safer and faster to do. For the second step you can think of creating an exe.

For your concern on not having classpath or for that matter even JRE, please go through following link:
http://forum.java.sun.com/thread.jsp...sageID=4441193

After this classpath won't be that big problem I guess.
Reputation Points: 10
Solved Threads: 4
Light Poster
ksaxena is offline Offline
31 posts
since Jul 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Software Sales Problem
Next Thread in Java Forum Timeline: Julian date to Calender Date





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC