954,219 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

can we create .exe file using java

If it is possible please guide me.

sasidharnet
Newbie Poster
8 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

Google for a third party program for doing this, but it is not recommended. Why take a language meant for creating cross-platform software, and take that exact advantage away by turing the product into a native executable which can then only be run on one platform?

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

I agree with Masijade, one would tend to not create an 'exe' file from a Java program. Indeed there should exist a byte code to exe compiler, though I wonder how efficient/valid one would be; Java is a growing language and some of the specifications of Java aren't easily portable to C++ (which is what a 'class' to 'exe' compiler would likely attempt to do).

What usually happens is that we create a 'jar' file. This file is recognized by Java and executes much like an 'exe' file; the only catch is that you must have Java installed, which of course you do. The easiest way is to make a 'jar' file is to use NetBeans :D

PoovenM
Junior Poster
151 posts since Aug 2006
Reputation Points: 56
Solved Threads: 11
 

If you look as far as page 2 of the forum, this is answered in two different threads. Please take some time to find answers on your own before you ask others to hand them to you.

Ezzaral
Posting Genius
Moderator
15,985 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 
If it is possible please guide me.


Yeah its possible, kills the cross platform concept of java though, but whether for proof of concept or you cant live without .exe in your windows, or for whatever reasons it maybe, yes its do-able...

well, you could use Microsoft J# .NET, but then you'd be needing the .NET Framework installed, rather than having and using Java installed.


or you can use software like "JarToExe Convert Wizard" @ http://www.regexlab.com/en/jar2exe/

or JexePack a command line tool allowing you to package your Java application (class files), optionally along with its resources (like GIF/JPG/TXT/etc), into a single compressed 32-bit Windows EXE, which runs using Sun's Java Runtime Environment. @ http://www.duckware.com/jexepack/index.html

or u can just use google look for more software, and say ... put a search like "java to exe" or something like that.

:-/

NetByte
Newbie Poster
11 posts since Feb 2006
Reputation Points: 44
Solved Threads: 2
 

Hey i also got that question some tym before..i dont know the exact reason y java didnt allow to create .exe files.....

but java can create .class files.
also u can create .jar files..
jar files can be executed in java virtual machine enviorenment.there are some software tools support to create exe files in the internet.but they also not efficient...

but its not a prob when u created a .jar file....

bye....

nuwan243
Newbie Poster
15 posts since Dec 2006
Reputation Points: 8
Solved Threads: 0
 

GCJ can be located at http://gcc.gnu.org/java/ , Is able to compile java into bytecode or a native executable ( don't know if this works on win32 tho ).

Launch4J is another GPL option http://launch4j.sourceforge.net/ , a small JVM that ships with your software.

Paul.Esson
Junior Poster
181 posts since Feb 2005
Reputation Points: 21
Solved Threads: 10
 

i am java fresher a have good logic skill still i want to improve any guidence

manju.fresher
Newbie Poster
5 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
 
i am java fresher a have good logic skill still i want to improve any guidence

This post, in this thread, isnot, exactly, an endorsement of your claim of having "good logic skill".

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 
This post, in this thread, is not, exactly, an endorsement of your claim of having "good logic skill".

lol

anglok
Newbie Poster
3 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
 

making of game in java

saadi ahmad
Newbie Poster
2 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 
making of game in java


Asking of coherent question in new thread.

Ezzaral
Posting Genius
Moderator
15,985 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

You probably want to be able to run a java program by clicking an icon instead of running from the command line or from an IDE.

Create a .jar file, put it on your desktop and click away.

noodlecode
Newbie Poster
21 posts since Jan 2009
Reputation Points: 48
Solved Threads: 2
 

File name : abc.txt
________________________________

Sunday 21/11/2009

Debasish 20 Bangalore
Amit 25 Orissa
Biswajit 32 Pune

Monday 22/11/2009

Lulu 24 Orissa
Bikash 29 Bombay
Masanta 21 Delhi

Tuesday 23/11/2009

Mahesh 22 Delhi
Mithun 34 Kolkata
Hashan 29 Lucknow

___________________________________
output will be ###################
___________________________________


Sunday 21/11/2009

Amit 25 Orissa
Biswajit 32 Pune
Debasish 20 Bangalore

Monday 22/11/2009

Bikash 29 Bombay
Lulu 24 Orissa
Masanta 21 Delhi

Tuesday 23/11/2009

Hashan 29 Lucknow
Mahesh 22 Delhi
Mithun 34 Kolkata


:: my requirement is i have a existing txt file like this as above and i need output will come like this. if possible add time stamp...

give me the coding if anybody know....

Debiprasad123
Newbie Poster
1 post since Oct 2009
Reputation Points: 8
Solved Threads: 0
 

Yeah, I think I can do that in about ten minutes for you. But first, how much are you going to donate to Daniweb for wasting everyone's time?

BestJewSinceJC
Posting Maven
2,772 posts since Sep 2008
Reputation Points: 874
Solved Threads: 354
 

What is this? Has this thread become the new "I'll just dump my trash here" thread?

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

you need to convert jar file into exe using 3rd party softwares. And i guess op has purpose of converting it into native code, he might want to distribute it to others hes not exactly sure if theres java installed. Sorry poor english

autorunman22
Light Poster
43 posts since May 2011
Reputation Points: 13
Solved Threads: 3
 

Uhm, the last post here was about two years ago, and the last meaningful post was about four years ago. Killing this zombie now.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You