PDA

View Full Version : Questions - Java, Swing, Executables, etc.


Jearb
07-26-2008, 07:47 PM
Hello, fellow coders! I've been learning Java for a month now, and have finally settled with the fact that, if I want to code Java, I have to learn DOS. So I have. A little.

But I was thinking; it's pretty annoying having to go into Command Prompt just to run one of my applications, so I was wondering, is it possible to make my apps executable, so other people can run them without hassle?

Also, I was wondering if it's possible to create a Madness Interactive-esque game with Java. For me, it's not as much a matter of how hard it is, more if it's at all possible. I am very much a newb, so don't be surprised if I have a sort of "LOL WUT?" response to...your...responses.

Thanks a bunchload,
Jearb

WorldEvolution
07-26-2008, 10:27 PM
The game part is very possible. Runscape is written in java. There are ways to write and exe file with java. I'm myself trying to learn how to do that. Someone told be borderland compiler dose it for you but haven't tired it yet.

brad211987
07-27-2008, 12:35 PM
In java you can create executable .jar files that you can click on to run your program. Here is a link to an example I've had bookmarked for a while now.

http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html (http://csdl.ics.hawaii.edu/%7Ejohnson/613f99/modules/04/jar-files.html)

Jar files are very easy to work with, and if you use a build tool such as ant, you can script it to do the build with a single click as well.

As for your game, I'm not familiar with it but I'm sure its possible. To make it multiplayer/interactive, you may need to learn how to do client/server programming in Java, but its nothing too difficult.

Jearb
07-28-2008, 03:37 AM
Kay. Thanks, guys. Oh, and, does the Jikes compiler work well?

Aradon
07-28-2008, 10:56 AM
Just to note on the jikes page:


It's worth pointing out that Jikes is not, and is not intended to be, a complete development environment -- it is simply a command line compiler. It should not be considered a replacement for more complete tools, such as Visual Slick Edit or Eclipse which provide sophisticated graphical IDEs (Integrated Development Environments).


To me, personally, I stick with just the JDK provided by Sun. It's open source (now) and is the official Java copy, providing the same JRE that will most likely be on all computers around the world.

So if there are any problems, it's not the compiler, it's your code :)