Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How do i convert Java .class fine into .exe file!

Reply
Thread Tools

How do i convert Java .class fine into .exe file!

 
 
G
Guest
Posts: n/a
 
      11-16-2008
I know people are getting tired of answering it, and i've been
searching the web for hours, but i still don't get it! I need to
convert my .class file into native windows machine executable (.exe)
that does not require JRE. How do I do it? Does the java JDK include a
file that converts it into .exe? Thanks
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      11-16-2008
> I know people are getting tired of answering it, and i've been
> searching the web for hours, but i still don't get it! I need to
> convert my .class file into native windows machine executable (.exe)
> that does not require JRE. How do I do it? Does the java JDK include a
> file that converts it into .exe?


The simple answer is that you don't !

You create an executable jar, let your users install JRE and
then they doubleclick on your jar and it runs.

There are various third party solution like Jet Excelsior
etc., but they are not widely used in the Java world.

Arne
 

Last edited by Ian; 01-23-2010 at 12:43 PM..
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      11-16-2008
>> I know people are getting tired of answering it, and i've [sic] been
>> searching the web for hours, but i [sic] still don't get it! I need to
>> convert my .class file into native windows machine executable (.exe)
>> that does not require JRE. How do I do it? Does the java [sic] JDK include a
>> file that converts it into .exe?


Arne Vajhøj wrote:
> The simple answer is that you don't !
>
> You create an executable jar, let your users install JRE and
> then they doubleclick on your jar and it runs.
>
> There are various third party solution like Jet Excelsior
> etc., but they are not widely used in the Java world.


To expound, if you need an .exe, don't use Java. It is not uncommon for
Windows machines to have Java installed, and not hard to get it installed when
you distribute Java programs, so the actual benefit of "executablization" of
Java programs is, at best, very questionable.

AIUI, so-called "solutions" to this so-called "problem" consist of bundling
the JRE inside the .exe itself, hardly an elegant solution. Since version
6u10, Java has gotten more clever about minimizing its footprint for the
average program, so there's really no good reason to do this anyway.

You have to download Flash to run .swf files, Word or an associated reader or
OpenOffice to read .doc files, Media Player or equivalent for .mpg, etc. What
is the big deal about downloading Java for .jar files?

Go with Arne's advice.

BTW, "Java", being a trademark, is spelled with a capital "J", and the word
"I" in English, being English, should always be capitalized. This is good
discipline for those who program in the Java language, which is case sensitive.

--
Lew
 

Last edited by Ian; 01-23-2010 at 12:43 PM..
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-16-2008
> ..I need to
> convert my .class file into native windows machine executable (.exe)
> that does not require JRE. How do I do it? Does the java JDK include a
> file that converts it into .exe? Thanks


<http://pscode.org/javafaq.html#exe>

A better deployment option for this app.
might be JWS (JAva webstart), using the
deployJava.js to ensure the end user has
a suitable JRE.

Here are some basic examples of webstart
launch related to the webstart API.
<http://pscode.org/jws/>

--
Andrew T.
pscode.org
 

Last edited by Ian; 01-23-2010 at 12:44 PM..
Reply With Quote
 
ldv@mail.com
Guest
Posts: n/a
 
      11-17-2008
> I know people are getting tired of answering it, and i've been
> searching the web for hours, but i still don't get it! I need to
> convert my .class file into native windows machine executable (.exe)
> that does not require JRE. How do I do it? Does thejavaJDK include a
> file that converts it into .exe? Thanks


This article has all the answers:

http://www.excelsior-usa.com/articles/java-to-exe.html

LDV
 

Last edited by Ian; 01-23-2010 at 12:44 PM..
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-17-2008
<> wrote, quoted or indirectly quoted someone who
said :

>I know people are getting tired of answering it, and i've been
>searching the web for hours, but i still don't get it! I need to
>convert my .class file into native windows machine executable (.exe)
>that does not require JRE. How do I do it? Does the java JDK include a
>file that converts it into .exe? Thanks

see http://mindprod.com/jgloss/nativecompiler.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
Your old road is
Rapidly agin'.
Please get out of the new one
If you can't lend your hand
For the times they are a-changin'.
 

Last edited by Ian; 01-23-2010 at 12:44 PM..
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-17-2008
<> wrote, quoted or indirectly quoted someone who
said :

> I need to
>convert my .class file into native windows machine executable (.exe)
>that does not require JRE. How do I do it? Does the java JDK include a
>file that converts it into .exe? Thanks


What you probably want instead is an installer that will download and
install the JRE if it is missing, then install your app.

See http://mindprod.com/jgloss/installer.html

The catch is, you then need separate installers for each platform.

Another way to do it is to check if Java is installed with JavaScript,
and if not, display some instructions on what to do. They are not much
harder than installing an ordinary app. There is a psychological
barrier.

Consider thought that Flash, Adobe PDF need a run time too, and Users
install them without resistance. All they need is a little hand
holding.

You might try getting them installed with those ghastly OBJECT EMBED
tags.
--
Roedy Green Canadian Mind Products
http://mindprod.com
Your old road is
Rapidly agin'.
Please get out of the new one
If you can't lend your hand
For the times they are a-changin'.
 

Last edited by Ian; 01-23-2010 at 12:44 PM..
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-17-2008

> I need to
> >convert my .class file into native windows machine executable (.exe)
> >that does not require JRE. How do I do it? Does the java JDK include a
> >file that converts it into .exe? Thanks

>
> What you probably want instead is an installer that will download and
> install the JRE if it is missing, then install your app.
>
> Seehttp://mindprod.com/jgloss/installer.html
>
> The catch is, you then need separate installers for each platform.
>
> Another way to do it is to check if Java is installed with JavaScript,


deployJava.js is the currently recommended script,
and it completely replaces the (much despised*)..

> You might try getting them installed with those ghastly OBJECT EMBED
> tags.


...nested OBJECT/EMBED elements.

--
Andrew Thompson
http://pscode.org/
 

Last edited by Ian; 01-23-2010 at 12:44 PM..
Reply With Quote
 
GK
Guest
Posts: n/a
 
      11-19-2008
> I know people are getting tired of answering it, and i've been
> searching the web for hours, but i still don't get it! I need to
> convert my .class file into native windows machine executable (.exe)
> that does not require JRE. How do I do it? Does the java JDK include a
> file that converts it into .exe? Thanks


What about the GNU Java Compiler (gcj)?
 

Last edited by Ian; 01-23-2010 at 12:44 PM..
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      11-19-2008
GK wrote:
> What about the GNU Java Compiler (gcj)?


I've never been satisfied with it. It hasn't played well with standard code.
I don't know if it's current with modern Java yet; it didn't used to be. I
haven't seen evidence that it's popular. Give it a try. My information is
old. Things might've improved.

I won't bother, though.

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Any tool to convert java raw code (a la java 1.4) into generics code Royan Java 8 02-15-2008 02:35 PM
boutique and fine art royalty free images - free fine art image offer Andrew Mowat Digital Photography 0 09-14-2004 05:35 AM
Tools to extract data from SQL database and convert it into XML & insert XML data into SQL databases Harry Zoroc XML 1 07-12-2004 10:10 PM
Job to convert Java App 1.3.1 to Java Newest of Java Michael Kintner Java 0 11-30-2003 04:42 AM



Advertisments