Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > Java

Reply
 
LinkBack Thread Tools Display Modes
Old 07-22-2004, 10:38 PM   #1 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
Compiling Java program to a stand-alone application

Does anyone know if it is possible to compile a Java program to a stand alone program so that it can just be run and, if so, how to do it?

At the moment I usually just write a BAT file that calls Java and then runs the compiled file, but that only works if it points to the proper address of the Java runtime (well, with my limited bat writing skills it does, anyway)

Thanks for any help.
Punch-M6.net is offline   Reply With Quote
Old 07-23-2004, 03:14 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,139
Belisarius is on a distinguished road
You can compile it to a "jar" file. In windows, that means you should be able to just double-click on it if you have Java setup right (Windows associates it with "jar" files).

I actually wrote a walkthrough a while ago for setting it up (when you installed Java, it should have been setup automatically).
__________________
GitS
Belisarius is offline   Reply With Quote
Old 07-25-2004, 04:57 AM   #3 (permalink)
akpugazh
Registered User
 
akpugazh's Avatar
 
Join Date: Jul 2004
Posts: 1
akpugazh is on a distinguished road
Reply for Standalone Java Program

Just put all you Java files and Pacakges in a folder say if you are creating a XYZ application put them in a folder called XYZ and then zip it using winzip with name "XYZ.jar". This is the executable jar which will work.
akpugazh is offline   Reply With Quote
Old 07-25-2004, 08:59 AM   #4 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
If you're talking about packaging and distributing a Java app for someone that doesn't necessarily have the JRE installed, and can simply double click an executable file and have it run, yes this is possible.

You might look at something like jexepack (something I ran across whilst searching for this on Google)
bdl is offline   Reply With Quote
Old 07-27-2004, 08:22 PM   #5 (permalink)
Punch-M6.net
Registered User
 
Join Date: Jul 2004
Location: Australia
Posts: 21
Punch-M6.net is on a distinguished road
Thanks for the walkthrough! That's pretty much what I was after, I'd seen .jar files before but didn't know how to make them myself.

And the JexePack looks interesting, I'll have to have a play with it. There was also a link on that page to another program called 'Excelsior Jet' (http://www.excelsior-usa.com/jet.html) that compiles Java programs to native code that also looks interesting.

Thanks again for all the help!
Punch-M6.net is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Developer Position in Kansas City justplaindoug Java 0 10-29-2004 11:52 AM
C++ Deadlock Detection Program Help... coolsc81 Standard C, C++ 2 10-26-2004 06:14 AM
downloading the java sdk without the sun application server? sde Java 2 08-02-2004 07:53 AM


All times are GMT -8. The time now is 01:07 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting