By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

Making an exe

P: n/a
Using the Netbeans IDE or the command line, is it possible for me to
turn my Java code into a native executable for x86 WindowsXP? If not,
is there a free tool I can use to turn .java or .class files into
executables?
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
PlasmaDragon wrote:
Using the Netbeans IDE or the command line, is it possible for me to
turn my Java code into a native executable for x86 WindowsXP? If not,
is there a free tool I can use to turn .java or .class files into
executables?


GCJ works for me on Linux, although some of the standard library classes
haven't been implemented yet. I would be interested to know whether it
works on MS Dubya, too.
Jul 17 '05 #2

P: n/a
PlasmaDragon wrote:
Using the Netbeans IDE or the command line, is it possible for me to
turn my Java code into a native executable for x86 WindowsXP? If not,
is there a free tool I can use to turn .java or .class files into
executables?


We had this problem at work once, how to make an "executable" for our
java program.

Its easy actually, all you need to do is load up your VC++ and create an
empty win32 application. Create yourself a fancy icon (metallic-style
please :-) ) and then load the java class manually.

There are several ways to do this. You can actually do something like
ShellExecuteEx( "javaw -jar MyApp.jar",... );

or there is a way to manually load the JVM. But i never did it this way.

What we used to do is keep the command in an ".ini" file on the client's
machine. The exe would just concatenate the parameters but and prepend
the "javaw.exe" exe to run (weak security measure).
Hope it helps.
Jul 17 '05 #3

P: n/a
Thanks for the help. I was able to make an C++ executable containing
the line

system("java MyJavaProgram");

and it worked.

I tried using GCJ thru the bash shell, but it resulted in the error
"undefined reference to '_WinMain@16'", even when compiling a trivial
HelloWorld program.
Jul 17 '05 #4

P: n/a
You might also be interested in the following link, which offers jre-less
GUIs. The app is free for 60 days.

http://www.excelsior-usa.com/jetswt.html
Pl**********@lycos.co.uk (PlasmaDragon) wrote in message news:<15**************************@posting.google. com>...
Using the Netbeans IDE or the command line, is it possible for me to
turn my Java code into a native executable for x86 WindowsXP? If not,
is there a free tool I can use to turn .java or .class files into
executables?

Jul 17 '05 #5

P: n/a
PlasmaDragon wrote:
Using the Netbeans IDE or the command line, is it possible for me to
turn my Java code into a native executable for x86 WindowsXP? If not,
is there a free tool I can use to turn .java or .class files into
executables?


Or you can try JSmooth, http://jsmooth.sourceforge.net , but in my
practice it acts like a fool when trying to find the specific .jar file.
~ Let us linux ~
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.