Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java program into .exe

Status
Not open for further replies.

eclipse33

Programmer
Apr 13, 2001
94
0
0
CA
Hi,

I have a small project coming that that requires me to write a program with a database connected to it. The customer will flip through a bunch of images and also add client info into the program. (pretty vague program description I know)

I should have any major problems writing it but...

What are my options as far as making it .exe to run on the clients salespeople laptops. Is it my only option to make it an .exe?

Is there any issues about an exe and a database backend?

I am not sure yet (have to find out) if it is going to be installed on a PC or Mac...does that make a difference?

Would VB be better suited for this?

Thanks
eclipse33
 
If you really really want to make an .exe, this article is for you:


But: I would not recommend making the client an .exe, as it's Java - the platform independency will definitively be lost. If you just use the JRE (Java Runtime Environment) which is downloadable from and also available for Mac ( - already integrated in Mac OS X I think), you don't have to worry big deal about your future platform (yes, there are little differences, but it will work on both of them)...

That's also the reason why I would definitively suggest Java - is there a VB implementation on the Mac anyway, left aside the VBA in Office? Please correct me if I'm wrong, but I don't think so...

Maybe VB would be a better choice if you're new to java - while its db processing capabilities are indeed very powerful, VB is way simpler for not too complicated db access... but: you loose the possibility to deploy on Mac, and you stick with a boring yet simple language :)

Way to go (I think): Grab a book about JDBC at your local librairy [reading], look if you can handle it (I think you will, it's not all too complicated) and try writing a small application that accesses the database - if you're there, the rest will be there almost by miracle [pc2]. And if it doesn't there's still TekTips...

I hope you're not more confused now than before...

PS: Yes, you're right, I just found out how to make those new, way cooler smileys [hippy]
allow thyself to be the spark that lights the fire
haslo@haslo.ch - www.haslo.ch​
 
I'd like to put in my two cents worth. If you're planning to use third party classes contained in jar files, you will most likely not be able to create an EXE anyway. My Visual Cafe will include the basic java classes, but it cannot include third party classes that it cannot compile. That means you have to have the source code for everything except what's included in the jdk.

Also, since garbage collection is normally done by the jre, your EXE has to have some other type of gc included with it. To keep EXE size down, the alternate gc may have limited functionality. Your program may run differently than when run under the jre.

My conclusion is that if you need an EXE, go to VB. If you can live with an jre on the client machine, go with java.

 
You can't use an executable jar file? Then you just install the JRE on the client machine, fix the classpath, click on the jar file, and it runs just like an exe. (Plus you get the platform independance mentioned earlier)

It's a little weird working with the manifest file, but should be ok.

See for more info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top