Save Me From Javac Compiler

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 24, 2009, 07:22 AM
431641 members and 298664 Topics
Latest Member: Emmyart
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming  |  Save Me From Javac Compiler
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: Save Me From Javac Compiler  (Read 136 views)
nairawebs (m)
Save Me From Javac Compiler
« on: October 07, 2009, 07:06 PM »

Please fellow nairalanders help me out. I am just starting programming with Java and 'hav downloaded and installed  j2sdk1.4.2_13 in my C:\ drive as taught. I also created a folder on the C:\ drive and named it Java Programs to store all my java programs. Initially i ran my first program by going through the command promt:
C:\>
C:\>Java Programs
C:\Java Programs

On getting here, i followed the book's instruction to set the classpath by entering this command:

set classpath=C:\j2sdk1.4.2_13\bin
set classpath=.

After doing this, i typed the command to compile the codes as:

javac Aliyu.java
 
The DOS promt kept telling me that the 'javac' is not recognized as an internal or external command.

Please help me out. I have tried it out with other prorams from the book and another java programming book but it still refused to compile the codes which i am sure is correct.
 
This is one of the programs copied her below.

public class Aliyu
{
public static void main(String[] args)
  {
   System.out.println("Aliyu Bamidele Joshua");
   System.out.println("Redeemer's University");
   System.out.println("ICT Department");
   }
}

I saved the program as Aliyu.java
yawa-ti-de (f)
Re: Save Me From Javac Compiler
« #1 on: October 07, 2009, 09:02 PM »

More than likely, you haven't set your classpath correctly.  Here is something else you could try:

From where you are, type "java -v".  This should spit out the version you are using.   If this gives an error similar to what you are experiencing now, do a "cd" into the directory where "javac" is then run the command and specify the path to the file.  That should do it.

While you are at it, you might want to set the classpath via "my computer" on your desktop.  Unfortunately I am at work and the admins have blocked access to this and I don't remember how to get to where you need to go off the top of my head.  Then again, we have such great nairalanders here that I am sure they will answer you quickly Grin

Let us know how it goes.
Bassie (m)
Re: Save Me From Javac Compiler
« #2 on: October 08, 2009, 07:38 AM »

nairawebs (m)
Re: Save Me From Javac Compiler
« #3 on: October 08, 2009, 10:05 AM »

Oh guys, i really dont know how to thank you enough! It was the path that was not set correctly. I followed Bassey's link to more suggestions and finally got it right. I'm very GRATEFUL to you ALL. Thanks and God bless.
Bassie (m)
Re: Save Me From Javac Compiler
« #4 on: October 08, 2009, 04:29 PM »

You Welcomed!
candylips (m)
Re: Save Me From Javac Compiler
« #5 on: October 08, 2009, 04:37 PM »

better still download an IDE . Netbeans and Eclipse are very good will save you a lot of headache
cauchy (m)
Re: Save Me From Javac Compiler
« #6 on: October 09, 2009, 10:49 AM »

Men the case is solve if u are using windows.
procedure
1) Right Click on the computer -> properties->Eniroments Variables->Add path.
2)Copy the path of the jdk1-2-.5\bin.
3) to the file.

you are on
yawa-ti-de (f)
Re: Save Me From Javac Compiler
« #7 on: October 09, 2009, 03:00 PM »

Quote
1) Right Click on the computer -> properties->Eniroments Variables->Add path.
2)Copy the path of the jdk1-2-.5\bin.
3) to the file.

That's what I was trying to recall off the top of my head but couldn't  Cool
i-Guru (m)
Re: Save Me From Javac Compiler
« #8 on: October 10, 2009, 02:34 AM »

@yawa-ti-de
You are a genius, i have been watching and reading you post, they are all making impact.
Thx
 Metaquotes Language  Java For Newbies  Can Any Body Help With Oracle Db E-books  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.