Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   How do i convert Java .class fine into .exe file! (http://www.velocityreviews.com/forums/t644678-how-do-i-convert-java-class-fine-into-exe-file.html)

G 11-16-2008 12:58 AM

How do i convert Java .class fine into .exe file!
 
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

Arne Vajhøj 11-16-2008 01:04 AM

Re: How do i convert Java .class fine into .exe file!
 
> 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

Lew 11-16-2008 01:20 AM

Re: How do i convert Java .class fine into .exe file!
 
>> 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

Andrew Thompson 11-16-2008 02:42 AM

Re: How do i convert Java .class fine into .exe file!
 
> ..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

ldv@mail.com 11-17-2008 07:36 AM

Re: How do i convert Java .class fine into .exe file!
 
> 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

Roedy Green 11-17-2008 06:31 PM

Re: How do i convert Java .class fine into .exe file!
 
<georgexu316@gmail.com> 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'.

Roedy Green 11-17-2008 06:36 PM

Re: How do i convert Java .class fine into .exe file!
 
<georgexu316@gmail.com> 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'.

Andrew Thompson 11-17-2008 09:46 PM

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

> 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/

GK 11-19-2008 10:02 AM

Re: How do i convert Java .class fine into .exe file!
 
> 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)?

Lew 11-19-2008 04:01 PM

Re: How do i convert Java .class fine into .exe file!
 
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


All times are GMT. The time now is 06:25 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.