• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I'm a Java Newbie.

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic