I have recently started writing a Role Playing Game in Java .
Now I have written a substantial amount of the code needed , and then it
struck me : how do I compile a Java program ?
Could anyone tell me how I create a stand-alone .exe from my Java sources /
classes ? I'd prefer an option which allowed me to do it WITHOUT using
JBuilder ...
Thanks in advance ,
Princess Morgiah
"Princess Morgiah" <Princess...@Yahoo.com> wrote in message
news:8a8q5g$1buc$3...@buty.wanadoo.nl...
I have JDK installed , and I know how to compile to classes . But I don't
know how I can make an executable from my sources .
Therefor I posted my question on this NG ...
Princess Morgiah
J.T. Wenting wrote in message
<952633039.21789....@news.demon.nl>...
If you use microsoft visual j++ you can compile to an .exe, but
unfortunately it will only work on computers with Internet-explorer 4 or
better installed. So some windows 95 users won't be able to run it. Does
anyone know how to make Visual j++ include a virtual machine in the .exe? I
think I've seen it done but don't know how.
Most people seem to just distribute their Java game as class or .jar files
and bundle it with a virtual machine so people can run it. This doesn't seem
a very good solution, but I'm not sure there is much of an alternative.
Alternatively if you make your game an applet, you can just distribute it as
an html file+class files, which anyone can load into their browser. This is
a good solution since it requires nothing extra to be installed, and makes
for a small quick download.
Thanks
Andrew
java <classname>
Hope that helps.
Darius
Princess Morgiah <Princess...@Yahoo.com> wrote in message
news:8a9ela$2sf9$1...@buty.wanadoo.nl...
> This is no troll attempt , and I wouldn't call myself dumb since I have
been
> programming for the last eight years now ... I'm just new
> at Java .
>
> I have JDK installed , and I know how to compile to classes . But I don't
> know how I can make an executable from my sources .
>
> Therefor I posted my question on this NG ...
>
> Princess Morgiah
>
> J.T. Wenting wrote in message
> <952633039.21789....@news.demon.nl>...
> >is this a troll attempt, or someone who is really dumb?
> >Use the JDK...
> >goto http://java.sun.com and get it ;)
> >
Has anyone considered creating a java2cpp converter?
I learned java first, and am now just opening the book of C++, the two languages
are very similar, what sucks about C++ is all the periferal files required
(.h,.mfc,.atl.........)
Java is a much cleaner and more straight forward language........
My point is, it shouldn't be that hard to translate java source to C++
source..... should it?
Andrew Gower wrote:
> Hi,
> This seems to be rather tricky to do. I haven't found a decent solution
> myself, so if anyone knows how I'd like to know too!
>
> If you use microsoft visual j++ you can compile to an .exe, but
> unfortunately it will only work on computers with Internet-explorer 4 or
> better installed. So some windows 95 users won't be able to run it. Does
> anyone know how to make Visual j++ include a virtual machine in the .exe? I
> think I've seen it done but don't know how.
>
> Most people seem to just distribute their Java game as class or .jar files
> and bundle it with a virtual machine so people can run it. This doesn't seem
> a very good solution, but I'm not sure there is much of an alternative.
> Alternatively if you make your game an applet, you can just distribute it as
> an html file+class files, which anyone can load into their browser. This is
> a good solution since it requires nothing extra to be installed, and makes
> for a small quick download.
>
> Thanks
> Andrew
>
Hi Andrew ,
Thanks for your explanation ! I'll try to do it with MS Visual J++ , but I
don't like the fact that I'm limited to Win98 and IExp4 and stuff .
I could always do as you say , distribute it as .class or .jar . But could
you also tell me how I can build a .jar file ?
The idea of distributing my game as an applet is not an option I guess . I'm
working on a RPG game , and the game world I'm defining right now is huge !
So there would be just too much extra files to download .
Thanks again ,
Princess Morgiah
I knew that Java was meant to be platform independant , and I think that's a
great thing .
But I just hoped there was some way of making a fast .exe Win version of my
game ( or parts of it ) to distribute to betatesters , who wouldn't need the
JDK to run my game .
I know how to run and compile to classes , but thanks for the information
anyway ...
Thanks ,
Princess Morgiah
Darius wrote in message ...
Well , I agree with you : this should be an option . But it isn't ,
unfortunately - maybe something for the future ?
>Has anyone considered creating a java2cpp converter?
>
>I learned java first, and am now just opening the book of C++, the two
languages
>are very similar, what sucks about C++ is all the periferal files required
>(.h,.mfc,.atl.........)
>Java is a much cleaner and more straight forward language........
>
>My point is, it shouldn't be that hard to translate java source to C++
>source..... should it?
I've been around in this programming business quite some time now , and I
have learned C++ before Java . You are right , Java is much cleaner and more
straight forward . But there is a huge problem ( I guess ) when you want to
create a java2cpp converter : Java uses a garbage collector and implicit
pointers , whereas with C++ you need to do your own housekeeping and specify
all pointers explicit . So this could be one of the big issues when writing
such a converter ...
Anyway , thanks for the input !
Princess Morgiah