GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Changes between java versions. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Changes between java versions." Watch "Changes between java versions." New topic
Author

Changes between java versions.

Alex Manfredi
Greenhorn

Joined: Mar 17, 2010
Posts: 4
Hi everyone! I have just registered here. Thanks in advance!

I am having probably a very basic problem, but I can't figure it out myself.

I am trying to learn Java, I got a lot of material about it, but the java they teach are of different versions. I am running Java 6 using Eclipse, and sometimes I get stuck in a very simple exercise like HelloWord or Add2Integers...
I am trying to run an Add2Integers program, but I can't "import acm.program.*" or extend "ConsoleProgram" as the book says, also the "readInt " does not work, where says "println" only works if I use "System.out.println".

I have searched on the java website the syntax changes between the version, or what have changed between the versions, I couldn’t find anything to clarify. One of the videos I downloaded says that using a different version is not a big deal, but it is since I can’t run a simple exercise.

It is probably very simple for who knows, but it is getting me frustrated!

Thanks a lot!




CCNA. But useless in programming.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3602
    
  15
Java 6 is the latest version of Java and it is backwards compatible, so any standard Java stuff in your teaching materials should work.

Your problem is that the acm.program package and the ConsoleProgram class are not part of standard Java. They are probably in a third party jar file that you need to include in your classpath when compiling or running your program. Either your teachers or the teaching materials should tell you how to get hold of this jar file.


Joanne
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39053
    
  23
Nice to see you again, Joanne. And welcome to the Ranch, Alex Manfredi
Alex Manfredi
Greenhorn

Joined: Mar 17, 2010
Posts: 4
Good to know that it is not a syntax that changed or so.

I don't remember they saying where to get those JAR files. I going to look again anyway!

Is there any material that you recommend to someone like me willing to learn programming withoul a programming background?

I feel that sometimes lack of very basic knowledge get me stuck/confused!!


Thanks a lot for you reply!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39053
    
  23
There is more about .jar files in this Java™ Tutorials section.
 
GeeCON Prague 2014
 
subject: Changes between java versions.