I'm working through some tutorials from another post I made about a year ago and using both Netbeans and Emacs (text editor) under Linux. There seems to be a different code standard under Netbeans then when compiling on the console.
For example I can use "throws IOException" when compiling on the console, however with Netbeans I get an error about an unresolved symbol and after some expiremention I found I can use "throws Exception" instead. Another example is "aCharcter = (char)System.in.read();" works fine on the console, however in Netbeans it just skips to the next line without waiting for input from the keyboard..
So maybe the tutorials I'm using are out of date? Or does Netbeans just use a different coding standard? Makes no sense to me, but that's all I can come up with.
I've tried Eclipse also, but get random crashes and was told I should try another version of VM. I had one h*ll of a time getting an older version installed once before, and don't want to go through it again. I am running SDK 1.4.2 and 1.4.2 Java 3 Runtime Environment.
So anyway does anyone have some advice? I don't really mind coding on Emacs and compiling on the console, but I prefer the comfort and ease of use of an IDE.
Well that's good advice. Avoiding IDE's at first that is. Emacs has syntax highlighting but it's not all that great. Syntax highlighting is the main reason I wanted to use an IDE.The other features I've lived without for a long time, so no biggie there.
Actually any importing I tried gave me errors on the next line... ";" expected on the very next line (no matter what it was) was the error I got.
So I guess it's all just a Netbeans problem. I was going to try JEdit, however Suse 9.2 Pro has custom Java packages which cause dependency problems with some of the 'jpackages' so.. I guess I'll stick with Emacs for now, or until I get me Eclipse problem settled.
Eclipse is a great IDE, and nothing says you have to use all the whiz-bang features while you're starting out. Syntax highlighting is key and API lookup can be very nice for beginners and experts alike.
The error "; expected" can be very cryptic. I know this sounds crazy, but it means that the compiler expected to see a ";". Whacky, eh? You didn't happen to have a ";" at the end of your import line, did you?Welcome (back) to JavaRanch!
Actually I'm not really sure what I did wrong. But it works fine in Eclipse for some reason. I have actually borrowed a book from a friend "Just Java 2 6th Edition" and working my way throught that. Not really sure however if this book is quite what I need, but I've learned quite a bit so far.
Problem is with most books is that there is just too much reading, and not enough actual coding. I learn better by just jumping in, and I get bored very quckly by having to read page after page about variables. I've done programming before, so all this is not new to me. Just new to Java.. Again.
Anyway thanks for the Welcome back. This is the first place that came to mind when I started back with Java. If only there was more sites like this one.
If you want some project ideas that you can use to get up to speed, check out the links in this post from beginning of February. I poked around briefly on some and they had a good collection of fun things to do to practice coding. Nothing helps motivate like a good diversion of writing a simple maze game instead of yet another ComplexNumber implementation.