Hi everybody,

I followed the Invaders tutorial and I'm trying to make it into an exe file. I have JBuilder 9 and I tried the "Native Executable" tool and it just opens up the program and closes it. Any help would be appreciated.

Thanks in advanced,
C++

java was not designed to natively run on any operating system, so any thing like your jbuilder is completly independent of sun java. As far as i know many java to exe compilers are actually convert java to c++ then compile that, which might be why it doesn't work

What is the code you're running. I think I might know what your problem is, but I have to see the code you're using to confirm my suspissions.

paradox,

thanx! that makes sense. How exactly do u create a jnlp file?

and also how 2 make it into an exe file?

Thank you again.

There's a lot of information on JavaWebstart, read it.

And if you'd read other replies you'd know by now that you do NOT make exes out of Java classfiles.
There are some expensive tools out there that can do it, which a search engine should turn up, but that completely defeats the purpose of the language.

Hi everybody,

I followed the Invaders tutorial and I'm trying to make it into an exe file. I have JBuilder 9 and I tried the "Native Executable" tool and it just opens up the program and closes it. Any help would be appreciated.

Thanks in advanced,
C++

What program are you trying to turn into an exe ... is it a GUI based program or a command line program ?? if its a GUI program then there's an option in JBuilder about making a GUI exe ... and if its a command line program then you'll have to take care that you input some random thing at the end of the program so that it may show up until you press that key ....

The native exe option is just an exewrapper to facilitate easier starting of the application.
It still needs an installed JVM on the target machine.
Effectively it's little more than a glorified batchfile :)
This is the normal way for Java.

nanosani,

Thanks for offering to help. It's a GUI application.

C++

The native exe option is just an exewrapper to facilitate easier starting of the application.
It still needs an installed JVM on the target machine.
Effectively it's little more than a glorified batchfile :)
This is the normal way for Java.

True ... the exe file will only run where jvm is installed ... but you can also use installation creators to first install jvm on the target machine and then install your software .. but that will be of too much size.

If its a GUI app .. and its like running and disappearing ... then you should check your constructor code ... there must be some mistake there.

nanosani,

thanx for ur help. i dont think there's an error in my constructor code, but in case there is, what kind of error would it be? Also, what's that option in JBuilder you mentioned earlier?

Last, is there anyother way 2 make it executable w/out an exe file? I know you said JWS, but i dont really understand it so can u plz maybe help me out???
Thanx.

I have used JBuilder 7 ... so I'm afraid I'll not be able to tell you the exact paths .... but I remember that the first option in the native exe builder was the dos based program creation and then second one was the windows based one ... and then others for mac linux etc ... you'll have to check the second one ...

There are other tools for building exe of java programs ... you can search google for the tools..

You can also make a small C program that executes your java files ...

can you explain how to make a small C program to do that???

Thank you very much.

when i run it using the CP, it loads the frame, but it's blank (at least the canvas part). In CP, it says there's a NullPointerException. That doesnt make sense because when I run it in JBuilder it compiles perfectly - with no exceptions.

Do you know what could be causing this?

The code is all online: here's the website:
www.planetalia.com/cursos/index.jsp

Thanks again.

Unfortunately I no longer do programming ... but I do remember that I saw the c++ code in the famous ebook "330 java tips" (now a more advanced version is available named "1000 java tips" but its not free)... you can hunt it down on google. The author's website is http://www.javafaq.nu ..

This article has been dead for over six months. Start a new discussion instead.