How could I transform java to .exe

J

JTL.zheng

I want to transform my java program to Windows program(someting like
xxx.exe file)
and this xxx.exe file can run in Windows that didn't install the JRE

how can I transform it?
is that any tools to do it?
 
J

Jon

JTL.zheng said:
I want to transform my java program to Windows program(someting like
xxx.exe file)
and this xxx.exe file can run in Windows that didn't install the JRE

how can I transform it?
is that any tools to do it?

You could use the GNU java compiler which produces native code from
java input. It is available through the cygwin package
(http://sources.redhat.com/cygwin).

Regards,

Jon Trauntvein
 
A

Andrew Thompson

JTL.zheng said:
I want to transform my java program to Windows program(someting like
xxx.exe file)

If your user base is all Windows, why not
program in .NET?

Alternately, if you might like to target Mac
or Linux/Unix machines as well, why not
install using web-start?

Andrew T.
 
J

JTL.zheng

Thank you for your advices
If your user base is all Windows, why not
program in .NET?
I have not learnt .net.
and I have write some programs in java
but what bother me is that not everyone has installed JRE
and they will not try it.
so I want to turn it to native code.
 
O

Oliver Wong

JTL.zheng said:
Thank you for your advices


I have not learnt .net.

C# is pretty similar to Java such that you can pick C# pretty quickly,
if you already know Java. There are also compilers which take Java source
code and emit .NET binaries, but you can't use most of Sun's class
libraries, as they won't be available in a .NET environment. Instead,
there's a pseudo-equivalent called the GNU ClassPath, I think.
and I have write some programs in java
but what bother me is that not everyone has installed JRE
and they will not try it.
so I want to turn it to native code.

.NET isn't native code either, but I bet Microsoft is going to make sure
..NET gets bundled with every copy of Vista.

- Oliver
 
A

Andy

JTL.zheng said:
I want to transform my java program to Windows program(someting like
xxx.exe file)
and this xxx.exe file can run in Windows that didn't install the JRE

how can I transform it?
is that any tools to do it?

Hi,

try a program like JSmooth (http://jsmooth.sourceforge.net/).
It packs your .jar and optionally the JRE in an .exe-file so that you
can run it very easy.
But this is only a wrapper for your .jar, it doesn't transform it to
native code.

Regards,
Andy
 
I

Ian Wilson

JTL.zheng said:
I want to transform my java program to Windows program(someting like
xxx.exe file)
and this xxx.exe file can run in Windows that didn't install the JRE

how can I transform it?
is that any tools to do it?

This is a FAQ, search the archives for previous answers.
"Excelsior Jet"
GCJ
...
 
A

Andrew Thompson

JTL.zheng said:
Thank you for your advices

I have not learnt .net.
and I have write some programs in java
but what bother me is that not everyone has installed JRE

Instead, you expect everybody to install Windows?!?
and they will not try it.

I know of more people who 'would not let Windows
infect a PC' than either know or care about the
existence of Java.
so I want to turn it to native code.


This 'program for everybody' is an illusion.

Get over it and concentrate on providing
'the working prgoram - or clear steps about what
to do to get to get the working program'..
then encourage your end-users to recognise
that the best way to run your program is with
an up-to-date Java Plug-In.

Andrew T.
 
N

northerntechie

JTL.zheng said:
I want to transform my java program to Windows program(someting like
xxx.exe file)
and this xxx.exe file can run in Windows that didn't install the JRE

how can I transform it?
is that any tools to do it?

You should look at reading 'Write Portable Code', Brian Hook, No Starch
Press, 2005. It does not have java examples but the book does
elucidate certain portability issues that you are going to run into --
especially if you plan to utilize the gcj compiler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top