Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,544 members, 7,812,705 topics. Date: Monday, 29 April 2024 at 05:46 PM

Save Me From Javac Compiler - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Save Me From Javac Compiler (802 Views)

Java online compiler for swing programs / Pls Help, Website For C/c++ Compiler Free Download Windows 7 / Facebook Releases A Php Just-in-time Compiler (2) (3) (4)

(1) (Reply) (Go Down)

Save Me From Javac Compiler by nairawebs(m): 7:06pm On Oct 07, 2009
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"wink;
System.out.println("Redeemer's University"wink;
System.out.println("ICT Department"wink;
}
}

I saved the program as Aliyu.java
Re: Save Me From Javac Compiler by yawatide(f): 9:02pm On Oct 07, 2009
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.
Re: Save Me From Javac Compiler by Bassie(m): 7:38am On Oct 08, 2009
Re: Save Me From Javac Compiler by nairawebs(m): 10:05am On Oct 08, 2009
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.
Re: Save Me From Javac Compiler by Bassie(m): 4:29pm On Oct 08, 2009
You Welcomed!
Re: Save Me From Javac Compiler by candylips(m): 4:37pm On Oct 08, 2009
better still download an IDE . Netbeans and Eclipse are very good will save you a lot of headache
Re: Save Me From Javac Compiler by cauchy(m): 10:49am On Oct 09, 2009
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
Re: Save Me From Javac Compiler by yawatide(f): 3:00pm On Oct 09, 2009
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
Re: Save Me From Javac Compiler by iGuru1(m): 2:34am On Oct 10, 2009
@yawa-ti-de
You are a genius, i have been watching and reading you post, they are all making impact.
Thx

(1) (Reply)

What Would Become Of Ict In The Next 20 Years? / Cheap Books On Programming And Web Devpt - Www.kalahari.com.ng / What Can I Do With Gis?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.