Hi, I just started research and playing around with Java a week ago. My uncle's company gave me all the necessary software and everything, and now I am trying to learn as much as I can in the fastest possible time. Browsing through the first page, I realized that I wanted to learn everything, programming, hacking, developing games, etc.

So far, I just started to read up on the java.sun.com guides and other various web tutorials. I was just wondering, about those guides on the stickied thread, is there any order I should read them in? Are there levels of difficulty that I should be aware of and learn certain things in a specific order?

Thanks

Hi, I just started research and playing around with Java a week ago. My uncle's company gave me all the necessary software and everything, and now I am trying to learn as much as I can in the fastest possible time. Browsing through the first page, I realized that I wanted to learn everything, programming, hacking, developing games, etc.

So far, I just started to read up on the java.sun.com guides and other various web tutorials. I was just wondering, about those guides on the stickied thread, is there any order I should read them in? Are there levels of difficulty that I should be aware of and learn certain things in a specific order?

Thanks

Ok question--

What do you already know about Software Development / OOP ? Are you familiar with another language?

Ok, I just picked up Java, and am not familar with any other language.

My knowledge of programming in general is very scarce and I went straight to Java. Some guides I read told me to learn C first, although others said Java was an easy language and I could just go straight to that. (Which is what I did)

Now, I have been reading the tutorial on Java Sun, and I find like I am not fully understanding the function of everything. I know what it does and the format of it, but I still unsure with how to use it.

A similar analogy would be in calculus. It is like I know what a derivative is, but I don't know how to find it, solve for it, or use it.

Ok, I just picked up Java, and am not familar with any other language.

My knowledge of programming in general is very scarce and I went straight to Java. Some guides I read told me to learn C first, although others said Java was an easy language and I could just go straight to that. (Which is what I did)

Now, I have been reading the tutorial on Java Sun, and I find like I am not fully understanding the function of everything. I know what it does and the format of it, but I still unsure with how to use it.

A similar analogy would be in calculus. It is like I know what a derivative is, but I don't know how to find it, solve for it, or use it.

Whoever told you to learn C first is a putz.

Java is far easier to learn (biased opinion from one who is still learning Java, some C++ and a bit of C#)

What you want to do is just make some practice programs. Not just a few, but tons and try to convince yourself of what is happening.

Afterwards, read up on what you do by googling around for Java tutorials or viewing the ones posted here.

Basically practice with reading through the tutorials, experimenting, coming up with your own conclusions then doing research on the right answer and compare it with your conclusions.

Eventually you'll get to the point where you will learn new ideas easily because your thinking alignment will be more in sync with what you need to do.

Ok thanks man. Oh yeah, another problem I am also encountering with the Java Sun tutorials is the fact that it is all for 1.4.

Apparently, I am using Java Eclipse SDK and within it says
-JRE System Library [jdk 1.5]-

Unfortunately, some of these programs and facts from the Java website don't apply to this version. I was wondering if there is some sort of online tutorial that is more geared towards 1.5 .

EDIT: Even basic stuff like this happened.
I got this line straight from the Java Sun guides.

int i = 461012;
System.out.format("The value of i is: %d%n", i);

This gave me errors, and I corrected it with this.

Integer[] w = {new Integer(1),new Integer(2),new Integer(3)};
	System.out.format("The value of w is: %d%n", w);

if you have no experience what so ever, maybe the best approach would be to figure out what OO is all about.
you're uncle may have provided you with all the software you need, but so do Sun combined with any which OS you're using.
if you have your JDK installed, a text editor is all you need to get started, and it is by far a better way to learn the basics than any IDE that'll make or complete fragments of code for you.

The books "Head First Java" and "Core Java: Volume 1" are both good places to start if you want to go the book route. They'll provide more detailed step-by-step explanation of things than most individual tutorials you'll find on the web.

I am and will be in China for the next couple of months, and I don't have any access to American books here. Although I am from the USA, it never occurred to me to bring over books.

*facepalms*

So, are there any online tutorials specifically for 1.5 version?

So, are there any online tutorials specifically for 1.5 version

1.5? i have 1.6 and all of the sun tutorials work fine for me, i believe that Sun keeps the JDK's backwards compatible, although you may get warnings of depreciations or "unsafe operations", usually meaning casting from a list of type object to one your using.

commented: Yeah hopefully he'll see the light and upgrade @_@ +1

How odd. As I stated before,
I am using Java Eclipse SDK and within it says
-JRE System Library [jdk 1.5]-

and about 1/3 of the programs give me a compiler error. I talked to a programmer and my uncle's office and he said yeah, some things are different so it wont work out as the tutorial says.

How odd. As I stated before,
I am using Java Eclipse SDK and within it says
-JRE System Library [jdk 1.5]-

and about 1/3 of the programs give me a compiler error. I talked to a programmer and my uncle's office and he said yeah, some things are different so it wont work out as the tutorial says.

You should upgrade.

I'll give you a link to my Instructor's website (via pm) - has all of the steps to upgrade to 6.0 in the event that you forget a step.

Interesting you should say that 1.6 is backwards compatible. I just talked with the programmer at work, and he said that in 1.5, they removed certain functions such as assert or format, but it was re-instituted in 1.6. He said the purpose of using 1.5 is because it is the most stable version right now, and every software related piece in the company runs off of 1.5

Now I am stuck, he told me to keep 1.5, but if I don't change it, I won't understand most of those online tutorials.

How odd. As I stated before,
I am using Java Eclipse SDK and within it says
-JRE System Library [jdk 1.5]-

and about 1/3 of the programs give me a compiler error. I talked to a programmer and my uncle's office and he said yeah, some things are different so it wont work out as the tutorial says.

That is the runtime. Has nothing to do with the compilation. Eclipse has it's own compiler and you can set it to expect source from anywhere form 1.4 to 1.6.

Look at your preferences
Windows->Preferences Java->Compiler Compiler compliance level

And at your project properties
Project->Properties Java Compiler (if "Enable project specific settings" is checked) Compiler compliance level


The problems you listed above are actually caused by code for 1.5 or later being compiled at a 1.4 compliance level.

So my compiler compliance level is 1.4

and for the second part under properties, "Enable project specific settings" is not checked off.

How do i resolve these problems and not get that compiler error when using programs from the Java Sun site??

-------------------------------------------------------------------------------------------------------------------
In addition, I was reading someone's post on how to create an instant messenger program, which lead me to this website

http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html

So I copied the scripts of Example 1 into my Java client, and the client script of example 1 did not work. I run it, and it opens for about 2 seconds, then closes, and the console says Unknown host: kq6py.eng

I don't think this is because of my compiler version or anything, because I didn't get any compiler errors.

Oh yes, and it also says this is the compiler/interpreter commands to run the program. Exactly where to I insert or paste this? :

javac SocketServer.java
javac SocketClient.java

java SocketServer
java SocketClient

So my compiler compliance level is 1.4

and for the second part under properties, "Enable project specific settings" is not checked off.

How do i resolve these problems and not get that compiler error when using programs from the Java Sun site??

Change the compiler compliance level to 5.0 or 6.0 (and, if you're version won't let you, upgrade Eclipse).

-------------------------------------------------------------------------------------------------------------------
In addition, I was reading someone's post on how to create an instant messenger program, which lead me to this website

http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html

So I copied the scripts of Example 1 into my Java client, and the client script of example 1 did not work. I run it, and it opens for about 2 seconds, then closes, and the console says Unknown host: kq6py.eng

I don't think this is because of my compiler version or anything, because I didn't get any compiler errors.

No, it's because you need to change the hostname referenced in the program. Your hostname is, seemingly, not kq6py.

You need to change

socket = new Socket("kq6py", 4321);

to

socket = new Socket("<your hostname or ip address>", 4321);

Oh yes, and it also says this is the compiler/interpreter commands to run the program. Exactly where to I insert or paste this? :

javac SocketServer.java
javac SocketClient.java

java SocketServer
java SocketClient

You don't, if you're using Eclipse for this. Eclipse has it's own compile and run functions (which you, hopefully, already know how to use).

You use those commands if you are compiling and running the things manually from the command line.

Thanks, my previous problem was resolved. Now for the current one:

Okay, I fixed the IP adress problem, but now, the client window closes on me saying No I/O. I am still new to this, but I don't see the problem at all. I already have the server running.

I'm not sure if you can run two programs from Eclipse at the same time. You're probably better off compiling and running these from the command line (one command shell per).

By this, you mean running from command prompt? I tried doing it before, although it never actually worked for me. I would to as far as typing in dir and seeing my java files there, but when I type javac HelloWorldApp.java, it never ran.

well, first you should configure the file types in your OS such that it recognizes the java file type.

go to control panel->file types->add new file type.

under the extension name type in java and click on confirm......

then ur OS will recognize the java files and ur program will get compiled.....and also ensure that the source file is stored in java\bin folder.

and u also have to set the class path variable. to the directory where u store and compile ur java files.

well, first you should configure the file types in your OS such that it recognizes the java file type.

go to control panel->file types->add new file type.

under the extension name type in java and click on confirm......

then ur OS will recognize the java files and ur program will get compiled.....and also ensure that the source file is stored in java\bin folder.

and u also have to set the class path variable. to the directory where u store and compile ur java files.

There is no file types in control panel, unless I am looking in the wrong place.

EDIT: Okay I found it. Java is already an extension. And the source file is stored in the Java\bin folder. Yeah.. everything is set up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.