Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I compile my Java sources ?

17 views
Skip to first unread message

Princess Morgiah

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
Hi everybody ,

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

J.T. Wenting

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
is this a troll attempt, or someone who is really dumb?
Use the JDK...
goto http://java.sun.com and get it ;)

"Princess Morgiah" <Princess...@Yahoo.com> wrote in message
news:8a8q5g$1buc$3...@buty.wanadoo.nl...

Princess Morgiah

unread,
Mar 10, 2000, 3:00:00 AM3/10/00
to
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>...

Andrew Gower

unread,
Mar 10, 2000, 3:00:00 AM3/10/00
to
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

Darius

unread,
Mar 10, 2000, 3:00:00 AM3/10/00
to
The point to java is you don't make .exe. It is supposed to be platform
independant. Some of the IDE packages will allow you to make .exe's like
jBuilder and CodeWarrior but not the base jdk. It goes against what java
stand for more or less. I assume you know how to run them with the java
command.

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 ;)
> >

The Casteels

unread,
Mar 11, 2000, 3:00:00 AM3/11/00
to
A very frustrating problem, and despite what some have said about this going
against the core principal of what Java is all about, I feel that Java is a
powerfull enough language that an exe compile option would be a tremendous
asset.

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
>

Princess Morgiah

unread,
Mar 11, 2000, 3:00:00 AM3/11/00
to
Andrew Gower wrote in message <8aac1k$lus$1...@pegasus.csx.cam.ac.uk>...

>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


Princess Morgiah

unread,
Mar 11, 2000, 3:00:00 AM3/11/00
to
Hi Darius ,

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 ...

Princess Morgiah

unread,
Mar 12, 2000, 3:00:00 AM3/12/00
to
The Casteels wrote in message <38CA4585...@usit.net>...

>A very frustrating problem, and despite what some have said about this
going
>against the core principal of what Java is all about, I feel that Java is a
>powerfull enough language that an exe compile option would be a tremendous
>asset.

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

0 new messages