File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes I'm a Java Newbie. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "I Watch "I New topic
Author

I'm a Java Newbie.

Darryl Neeley
Greenhorn

Joined: Mar 18, 2006
Posts: 6
=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

Joined: Aug 31, 2004
Posts: 11343

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.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Darryl Neeley
Greenhorn

Joined: Mar 18, 2006
Posts: 6
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

Joined: Mar 18, 2006
Posts: 6
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

Joined: Mar 22, 2002
Posts: 60
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 ]

<a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank" rel="nofollow">How To Ask Smart Questions</a>
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

For more details, see this step from Sun's installation instructions (1.4.2 for Windows).
Darryl Neeley
Greenhorn

Joined: Mar 18, 2006
Posts: 6
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

Joined: Aug 31, 2004
Posts: 11343

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I'm a Java Newbie.