Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I'm a Java Newbie.

 
Darryl Neeley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
=P I need to know, how to get my source code to compile. I have J2SE, which comes with Javac. I need to know about how to get it to compile it. Like I said, I'm a major newb to Java. =P
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

Try this Hello World example, which takes you through the steps.

If you have problems, please post back with the specific issue.
 
Darryl Neeley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I finally figured it out. Thank you for your help, and thanks for welcoming me here. I plan on learning Java rather quickly, so I'll probably be a familiar face here in the Help Thread. =P
 
Darryl Neeley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now, another question. How do I get the path "Javac" to be set to where I can simply go "javac HelloWorldApp.java" instead of having to type the entire File Address?

I've went into System and Enviroment Variables, and I have it set to:
Name: javac
Address: C:\j2sdk1.4.2_11\bin\javac

What else do I need to do to get it to work?
 
Mark Van Tuyl
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to go into System and Environment variables and add
C:\j2sdk1.4.2_11\bin\
to the 'path' variable.

Alternatively, you can add
%JAVA_HOME%
to the 'path' variable.
[ March 18, 2006: Message edited by: Mark Van Tuyl ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For more details, see this step from Sun's installation instructions (1.4.2 for Windows).
 
Darryl Neeley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what do I put as the name? Isn't that how it's brought up? I've got this as what it is. Tell me what I'm doing wrong.

Name: javac
Value: C:\Program Files\Java\jdk1.5.0_06\bin
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name of the system variable is PATH.

The value for this variable could be a list of different paths, each separated by semicolons (assuming a Windows operating system). Listed among these paths should be...

C:\Program Files\Java\jdk1.5.0_06\bin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic