Computer Science Canada

book suggestion?

Author:  lord_pwnerer [ Sun Oct 01, 2006 12:03 pm ]
Post subject:  book suggestion?

Does anybody have a good suggestion for a book that I could learn Java from? I'm not new to programming just to java, so hopefully not a very very begginner one.

Author:  lord_pwnerer [ Sun Oct 01, 2006 12:05 pm ]
Post subject: 

By the way, just incase it's any help, I'm using the Holt "ready to program" compiler

Author:  wtd [ Sun Oct 01, 2006 12:36 pm ]
Post subject: 

Not to toot my own horn too much, but...

http://compsci.ca/v2/viewtopic.php?t=9576

Author:  Tony [ Sun Oct 01, 2006 3:59 pm ]
Post subject: 

wtd's introduction to Java is an excellent resource.

and HoltSoft's "ready to program" has got to be one of the worst approaches to Java. Ever.

Get Sun's (seeing as they've made the language) javac - command-line compilers will do you wonders.

Author:  lord_pwnerer [ Sun Oct 01, 2006 4:10 pm ]
Post subject: 

Thanks, I'll be sure to do that, I just ordered the "Introduction to programming in Java" I hope it's not a bad book, I'll be sure to read that tutorial, looks great when I skimmed through it, Thanks!

Author:  lord_pwnerer [ Sun Oct 01, 2006 4:15 pm ]
Post subject: 

Oh yeah, not to be rude or anything, but I was just wondering, what's the difference between HoltSoft's and Sun's, I mean sure Sun Microsystems developped the language, but don't both compilers compile code? I mean how far can you take a compiler so that it's "A better approach". Not saying that you're wrong seeing as I have no experience in the matter, I was jsut wondering.

Author:  [Gandalf] [ Sun Oct 01, 2006 4:30 pm ]
Post subject: 

First off, RTP isn't a compiler, it's best classified as an IDE which uses the IBM java compiler. That compiler is outdated, and I'm pretty sure is no longer supported. Aside from the compiler, RTP doesn't exactly follow Java convention and promotes things such as extraneous commenting.

Author:  Tony [ Sun Oct 01, 2006 4:52 pm ]
Post subject: 

from what I understand, Holtsoft's 'Ready to Program' relies on their own libraries, and apparently some people had difficulties trying to run any standard Java.

so basically
a) Any book / documentation you read will not be (as) applicable to Ready.
b) if you go ahead and use Ready's libraries, you'd have to forget all of that if you plan on using real Java elsewhere.

While Notepad is a sufficient text editor to write Java (or _any_ other language), some syntax highlighting might be nice. SciTE is a good choice.

If you are looking for a full out IDE (Integrated Development Environment)(it's a suite where you develop your application) - Eclipse is arguably the best. Alternativly NetBeans has some cool features, such as a GUI builder.

There are a lot of good choices out there, buit RTP is as good for Java, as Frontpage is for web authoring.. meaning bottom of the barrel. I'd pick Notepad over ether. Laughing

Author:  [Gandalf] [ Sun Oct 01, 2006 5:02 pm ]
Post subject: 

That too, with RTP you will most probably be encouraged to use HoltSoft's third party libraries, although it isn't neccessary to. If you truly wish to understand Java and you stay with RTP, it would be best to avoid those libraries.

As for IDEs vs. simple editors + command line compiling, I prefer a combination of the two. Editors like Crimson Editor and EditPlus allow you to set shortcuts to compile and run, which gives you some convenience while not cluttering you with all that useless IDE garbage. Smile Whichever route you take, though, it's a large asset to know how to use the command line.

Author:  wtd [ Sun Oct 01, 2006 5:19 pm ]
Post subject: 

The compiler RTP uses only supports Java 1.4.2. Java 1.5.0 introduced a number of notable improvements.

If you use RTP, you won't be able to use these, and you will have to work harder to get anything done.

Author:  lord_pwnerer [ Sun Oct 01, 2006 6:38 pm ]
Post subject: 

Could you guys suggest a good up to date compiler then please? on with text highlighting is nice.

Author:  [Gandalf] [ Sun Oct 01, 2006 6:43 pm ]
Post subject: 

You still do not seem to understand the difference between compiler and IDE. The IDE includes the syntax highlighting, debugger, and the whole GUI that you are programming in. The compiler is simply put the program that makes your code run. They are seperate programs in all cases that I know of other than Turing.

So what you are looking for is Java's compiler (Java SE 1.5.0 SDK), from java.sun.com, and any IDE which has been mentioned above, or else a simple editor with Java syntax highlighting (Crimson Editor, EditPlus, SciTE, etc).

Hope that clears something up rather than confusing you further. Smile

Author:  wtd [ Sun Oct 01, 2006 10:53 pm ]
Post subject: 

A compiler translates human-readable source code into machine-interpretable code. In the case of Java, that code is for the Java Virtual Machine, but source code may be compiled for other machines as well.

A development environment is simply the tools you use to write programs. It is generally composed of a text editor, and a compiler. An integergrated development environment (IDE) attempts to take those individual components and wrap them up in a single cohesive interface.

Author:  lord_pwnerer [ Mon Oct 02, 2006 4:02 pm ]
Post subject: 

you say that the IDE is composed of the text editor and the compiler, but I'm assuming that I need to download the compiler first so that the IDE can use it right?

(Sorry I'm just a confused nooblet)

Author:  [Gandalf] [ Mon Oct 02, 2006 4:05 pm ]
Post subject: 

Some IDEs install a compiler automatically, some don't. You'll have to give a specific example if you want specific help.

Author:  wtd [ Mon Oct 02, 2006 4:48 pm ]
Post subject: 

There is no point spending so much time on this particular issue.

I assume you're using Windows. Probably XP.

Download JDK 1.5.0 from Sun.

http://java.sun.com/javase/downloads/index.jsp

Get the vanilla version. None of the "Java EE" or Netbeans stuff.

Make sure your PATH environment variable includes the directory where the Java binaries are located. In this case, those programs are java.exe and javac.exe. You can do this by going to Start -> Control Panel -> System -> Advanced (tab) -> Environment Variables (button) -> User variables. There you want to either edit an existing PATH variable, or add a new one.

If one exists, add the directory where the Java executables are located, separating it from the other directories with a semi-colon. If no PATH variable already exists, then simply create a new variable named PATH and for its value paste in the directory where the Java executables are located.

Now, you can open a command prompt and use the javac command to compile Java programs, and the java command to run them.

With the compiler set up, grab Notepad++. It'll provide you with a decent text editor, including things like syntax highlighting, line numbers and code folding.

Author:  lord_pwnerer [ Mon Oct 02, 2006 7:16 pm ]
Post subject: 

If this sounds like a total idotic question to you it's probably because it's the ravings of a noob. Would I be able to creat standalone exe's using the java compiler? Also, would I be able to compile the code using Notepad++ (sorry i'm totally new to the software).

Author:  wtd [ Mon Oct 02, 2006 7:21 pm ]
Post subject: 

The way Java works, Java source code is compiled to class files which are interpreted by the Java Virtual Machine. That said, people have created compilers which generate native executables from Java source code. GCJ (part of the GNU Compiler Collection) is just such a compiler.

Your best bet is to stick with Sun's tools.

Notepad++ is simply a text editor. It exists for one purpose, and one purpose only: to do a spiffy job of helping you edit text.

Use the command-line for your compiling.


: