Want to make exe/jar of a java based project

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 34
Reputation: arkaprava is an unknown quantity at this point 
Solved Threads: 0
arkaprava's Avatar
arkaprava arkaprava is offline Offline
Light Poster

Want to make exe/jar of a java based project

 
0
  #1
Aug 22nd, 2007
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 .
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 871
Reputation: vinod_javas is an unknown quantity at this point 
Solved Threads: 7
vinod_javas's Avatar
vinod_javas vinod_javas is offline Offline
Practically a Posting Shark

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

 
0
  #2
Aug 22nd, 2007
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.
Adios,

Vinod......
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 871
Reputation: vinod_javas is an unknown quantity at this point 
Solved Threads: 7
vinod_javas's Avatar
vinod_javas vinod_javas is offline Offline
Practically a Posting Shark

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

 
0
  #3
Aug 22nd, 2007
If you want to create Exe means you have to go for third party tool.
Adios,

Vinod......
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 34
Reputation: arkaprava is an unknown quantity at this point 
Solved Threads: 0
arkaprava's Avatar
arkaprava arkaprava is offline Offline
Light Poster

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

 
0
  #4
Aug 22nd, 2007
Originally Posted by vinod_javas View Post
If you want to create Exe means you have to go for third party tool.
Please Mention one third party tool
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 871
Reputation: vinod_javas is an unknown quantity at this point 
Solved Threads: 7
vinod_javas's Avatar
vinod_javas vinod_javas is offline Offline
Practically a Posting Shark

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

 
0
  #5
Aug 22nd, 2007
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.
Adios,

Vinod......
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 34
Reputation: arkaprava is an unknown quantity at this point 
Solved Threads: 0
arkaprava's Avatar
arkaprava arkaprava is offline Offline
Light Poster

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

 
0
  #6
Aug 22nd, 2007
just Tried execJ but cannot include tablespace into the exe
The application is running from exe without any operation on database
Batman is actually Bruce Wayne, Spider-Man is actually Peter Parker. He has to put on a costume to become Spider-Man. And it is in that characteristic Superman stands alone. Superman didn't become Superman. Superman was born Superman.Clark Kent is how Superman views us. And what are the characteristics of Clark Kent. He's weak... he's unsure of himself... he's a coward. Clark Kent is Superman's critique on the whole human race.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

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

 
0
  #7
Aug 22nd, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 34
Reputation: arkaprava is an unknown quantity at this point 
Solved Threads: 0
arkaprava's Avatar
arkaprava arkaprava is offline Offline
Light Poster

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

 
0
  #8
Aug 22nd, 2007
Originally Posted by stultuske View Post
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
Batman is actually Bruce Wayne, Spider-Man is actually Peter Parker. He has to put on a costume to become Spider-Man. And it is in that characteristic Superman stands alone. Superman didn't become Superman. Superman was born Superman.Clark Kent is how Superman views us. And what are the characteristics of Clark Kent. He's weak... he's unsure of himself... he's a coward. Clark Kent is Superman's critique on the whole human race.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,259
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 493
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

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

 
0
  #9
Aug 22nd, 2007
Read this arcticle "Convert Java to EXE" and you may find some answers
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

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

 
0
  #10
Aug 22nd, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 6810 | Replies: 12
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC