Click to See Complete Forum and Search --> : learning java
thejustman
11-23-2002, 04:00 PM
Hello, I am going to try to start learning to program in Java. I currently run Linux on a 486dx2, and windows on a PII 300. Are both of these machines fine for writing programs on? Also, If I write code on a Linux machine, can I still view this program or applet on a Windows or Mac machine, and vise versa(not sure how to spell that)? Any tips or help you can give will be appreciated.
Thanks, Justin
raz0rblade
11-23-2002, 04:21 PM
i dont know any java, but yes it will run on any system with java installed.
Sawdusty
11-23-2002, 06:16 PM
Java is pretty well completely cross platform and will run on any platform that supports it (= 100% of all PCs). It does this by compiling everything into machine independent Java Byte Code (tm) and then running an interpreter on each machine. This makes it slower than C++ (they say), but in most cases that's not too important (since machines are executing a couple of billions of instructions and rising).
Java is easy to learn and easy to use. One of the best resources is thinking in java, by Bruce Eckel. It's available as a download at www.bruceeckel.com. The definitive source of Java information is java.sun.com. They have great forums, great tutorials, and the entire Java API.
Welcome to my world: welcome to Java. :)
Dusty
mingshun
11-24-2002, 02:12 PM
Originally posted by thejustman
Hello, I am going to try to start learning to program in Java. I currently run Linux on a 486dx2, and windows on a PII 300. Are both of these machines fine for writing programs on? Also, If I write code on a Linux machine, can I still view this program or applet on a Windows or Mac machine, and vise versa(not sure how to spell that)? Any tips or help you can give will be appreciated.
Thanks, Justin
Running Java will be slow almost anywhere :p
Hence PII or PIV doesn't really matter.
I have tried running Java Swing between Linux and Unix a few times. It will work if you are not careful with compilation.
For example, if there is a "package name1" in one of your program source codes and hence, you need to be one directory above "name1" so that you can compile the sources. I realised quite a number of my friends didn't notice this and hence have some problem bring Windows Java source codes over to Unix directories.
In coding GUIs, don't use absolute values. Try to make use of length of components instead. Hmmm, what else? I couldn't remember but as far as I know, sometimes it depends on what application you use to open your Java class files.
thejustman
11-24-2002, 03:55 PM
Alright, thanks for all the info, I'll be doing quite a bit of reading on Java for a while now. I'm sure ill be back with some more questions :).
Thanks, Justin
IsaacKuo
11-24-2002, 10:52 PM
I'm learning Java right now also. The most incredibly useful course I've found is:
http://www.cafeaulait.org/course/index.html
These are the lecture notes for a Java programming course taught by Elliotte Rusty Harold at Polytechnic University. It's great, with lots of easy examples demonstrating useful concepts (like how to make an applet without flicker).
In particular, it has an excellent introduction to network programming--makes it easy to get started with programming your own client OR server.
The only danger I've found so far is that it's easy to get ahead of yourself, making something rather advanced which works great, but skipping a bunch of more basic concepts which could work better and easier.
For example, I had a slick little fully operational multi-threaded game server that any number of players could telnet into simultaneously before I even understood what "implements runnable" meant.
Because of this, I started writing my client applet using the same methods I learned to create the server--which meant a lot of needless complication with creating a helper Thread subclass to handle the socket connection. I've since learned about using "implements runnable" as it relates to applets, and basically started from scratch doing the client the correct way.
thejustman
11-25-2002, 12:13 AM
Hey thanks alot! That is a very helpful website! I would also like to take a class on it, but this is pretty much the same thing. Well thanks for the link, I'll be a frequent visitior on that website.
Justin