View Full Version : Which would you recommend?
Tarkus
11-30-2002, 02:41 AM
I'm going to be dipping my toes into the water of Java to build an online game... I was wondering, which implimentation of Java would you guys recommend for me to use for such an endeavor? Since I don't want to run into compatibility issues with MS, I'm just curious if the latest version of Java has any issues...
stuka
11-30-2002, 01:49 PM
Well, I personally use the Sun JDK's, and the 1.4 version for Windows seems to cause no problems on Win2K.
Tarkus
11-30-2002, 06:49 PM
Ok, got 1.4... Now, I'm just playing around in Forte right now and I've written a program that does a loop and outputs to the system and makes a window. How can I build something thats executable without forte? You know, a standalone app, all I see is .java, .class and something else when I build.
inkedmn
11-30-2002, 08:02 PM
to execute a java class file from the command line, just type:
java myFile
(leave off the .class)
and your file has to have a main method to be run this way, btw...
Tarkus
12-01-2002, 02:13 AM
Ok, cool, thanks... now for a couple more questions...
Do you need to have inline classes withing classes or can you do it the way C handles it?
I see right now.
class Testio{
int Testoff;
int anotherthingy(int r) {
//Do stuff here
}
}
I want...
class Testio{
int Testoff;
int anotherthingy(int r);
}
int Testio::anotherthingy(int r) {
//Do the crap I need here
}
The reason I hate inline functions is because I like to break it up so that I can read it.
One more question. Say I wanted to make a bunch of classes and functions and whatnot but I wanted them stored in a different file in the project. How would I go about including that from the main file?
I know these questions are kinda stupid... but my books don't seem to cover that stuff.
Dru Lee Parsec
12-01-2002, 01:29 PM
Check out some of the examples I wrote at www.codeexamples.org Looking at the code would give you a better answer than what I can say with words. Essentially, this is the format of methods within classes :
public class MyClass {
// Constructor
public MyClass() {
// stuff goes here
}
public void someMethod(int) {
// stuff goes here
}
public String someOtherMethod() {
// stuff goes here
return "Foo";
}
}
Re: including files. Get Bruce Eckel's free book "Thinking In Java" from http://64.78.49.204/ and read chapter 6 (Although you may have to read up on some of the previous chapter to come up to speed)
Hope it helps
Isengard
12-02-2002, 04:39 PM
Since you want a standalone app, I suggest you pack all your class files etc in a .jar file. There are also programs on the marked that will create .exe files for you.
gufmn
12-02-2002, 07:37 PM
And if you want to have any resources left to run your code, I'd suggest dumping forte. ;)
inkedmn
12-03-2002, 01:02 AM
~vim++
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.