Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

How could I transform java to .exe

Thread view: 
JTL.zheng - 05 Dec 2006 11:20 GMT
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?
Jon - 05 Dec 2006 12:22 GMT
> 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
Andrew Thompson - 05 Dec 2006 12:43 GMT
> 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.
JTL.zheng - 05 Dec 2006 15:59 GMT
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.
Oliver Wong - 05 Dec 2006 16:36 GMT
> Thank you for your advices
>
>> If your user base is all Windows, why not
>> program in .NET?
>
> 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
Andrew Thompson - 05 Dec 2006 21:33 GMT
> Thank you for your advices
>
[quoted text clipped - 3 lines]
> 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.
Andy - 05 Dec 2006 16:38 GMT
JTL.zheng schrieb:
> 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
Ian Wilson - 05 Dec 2006 17:03 GMT
> 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
 ...
northerntechie - 06 Dec 2006 04:04 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.