|
nairawebs (m)
|
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)
|
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  Let us know how it goes.
|
|
|
|
|
|
|
|
nairawebs (m)
|
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.
|
|
|
|
|
|
|
|
candylips (m)
|
better still download an IDE . Netbeans and Eclipse are very good will save you a lot of headache
|
|
|
|
|
|
cauchy (m)
|
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)
|
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 
|
|
|
|
|
|
i-Guru (m)
|
@yawa-ti-de You are a genius, i have been watching and reading you post, they are all making impact. Thx
|
|
|
|
|
|