Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Learning Java with C++ background

Status
Not open for further replies.

timmay3141

Programmer
Dec 3, 2002
468
US
I'm going to learn Java, and I'm coming from a strong background in C++. As I understand it, Java isn't even compiled, so I need directed as to how to make an executable file. Basically, could someone point me in the right direction for getting started? I don't even know if I'll need something similar to a compiler or not.
 
First off - IDE = Eclipse
great IDE for developing java code

next check out "How to" in eclipse, that should get you started on you first Hello World file.

public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello there!");
}
}

Dano
dan_kryzer@hotmail.com
What's your major malfunction
 
I have to disagree here. Eclipse is (depending on your opinion) a good IDE, but if you are learning, I think you often spend more time learning the IDE than the language.

My advice is to start with notepad/textpad/vi/emacs or similar text editor, and compile and run you code from the command line. This way you will get to grips with Java, not an IDE.

Java is compiled. At runtime the compiled byte code is then translated or interpreted to native machine code for execution.

To download the Java Standard Development Kit go here :


and click on the 3rd blue bar named " Download J2SE v 1.4.2_03 " and go for the SDK (not JRE).

This will contain the compiler (javac.exe), interpreter (java.exe) and all the standard core classes you will need, aswell as the Java Runtime Environment (JRE).

If you know C++ well, you'll have no problems with Java. There's no explicit pointer usuage !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top