Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.

A Member? Please Login  
type your username and password to login
Date: July 26, 2008, 08:17 PM
223897 members and 127240 Topics
Latest Member: jeans2
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming  |  Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.  (Read 253 views)
adewsteve
Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« on: February 11, 2008, 12:01 PM »

My Fellow nairaander please am writing a java program and am having a problem with the application when i was about to compile all the file with the command "javac Welcome1.java" in the command prompt it was giving me an error message javac is not an inter or external command and i was told in the book that if i get this message that means my sys JSE 5.0 Development kit is not instaled proparly that i should change the  path. That is where am facing problem am using windows vista i tried doing that but it was still the same thing anybody know the way out, My Email is adewsteve@yahoo.com   I have Ebooks on diff Program topic.
Bossman (m)
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #1 on: February 11, 2008, 04:57 PM »

You need to add the location of your JDK to your path.
my2cents (m)
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #2 on: February 11, 2008, 06:36 PM »

Ade:

In case you don't know how, go to your desktop, right-click on "my computer" and make sure your set up is similar to these screenshots.  When I last installed the JDK, I was impressed that the wizard set up the class path for me automatically.  I guess this isn't the case with you.

p.s.
1) I use Windows XP professional, so what you see on Vista may not the same as these screenshots (I don't use Vista)

2) Forgive my photoshop "skills" - I am not much of a designer  Cool

I hope this helps.


* classpath1.jpg (24.25 KB, 300x348 )

* classpath2.jpg (27 KB, 300x354 )

* classpath3.jpg (17.23 KB, 384x215 )
adewsteve
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #3 on: February 11, 2008, 06:48 PM »

Quote from: Bossman on February 11, 2008, 04:57 PM
You need to add the location of your JDK to your path.

This is what was at the system path  C:\Program Files\Java\jdk1.5.0_<version>\bin
This is my java file directory    c:\Program Files\Java\jdk1.5.0_14\bin
Could it be where the problem is i await a reply from you.
my2cents (m)
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #4 on: February 11, 2008, 06:49 PM »

what exactly is in "<version>"?
adewsteve
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #5 on: February 11, 2008, 10:35 PM »

Quote from: my2cents on February 11, 2008, 06:36 PM
Ade:

In case you don't know how, go to your desktop, right-click on "my computer" and make sure your set up is similar to these screenshots. When I last installed the JDK, I was impressed that the wizard set up the class path for me automatically. I guess this isn't the case with you.

p.s.
1) I use Windows XP professional, so what you see on Vista may not the same as these screenshots (I don't use Vista)

2) Forgive my photoshop "skills" - I am not much of a designer Cool

I hope this helps.
Quote from: my2cents on February 11, 2008, 06:49 PM
what exactly is in "<version>"?

Am sorry for disturbing you guys i have change the path to "C:\Program Files\Java\jdk1.5.0_14\bin" because that is the directory you can find javac application but yet after re-starting the computer all effort remain the same please do i need to add it like this ", ;C:\Program Files\Java\jdk1.5.0_14\bin"please reply me back the right way to add it, Thanks And God Bless.
adewsteve
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #6 on: February 11, 2008, 10:39 PM »

If you don't mind me calling you please paste your phone number as well, i ill give you a call.
Bossman (m)
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #7 on: February 11, 2008, 10:42 PM »

Read and follow this carefully. If after doing so you still have problems, I would reinstall the JDK.  Also, make sure you have ; at the end of your path.

http://java.sun.com/j2se/1.4.2/install-windows.html
my2cents (m)
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #8 on: February 12, 2008, 05:56 PM »

This might help clear up some air:

Though a temporary fix, you can avoid the classpath thing altogether by, in DOS, going to where you have your Java installed (probably in the C drive and in java/bin) and doing the following:

1) Type java -version:  if something comes up, you are in the right place
2) Either type next "javac (path to java file)" or move the file to the bin folder and run javac *.java for example
3) Then run java (class name, without the .class extension)

NOTE: This is a temporary fix and should only be used if you are doing your regular "hello world" type app.  For more serious apps, you gotta set your classpath man.
mimoh_mi (m)
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #9 on: March 03, 2008, 03:55 PM »

darth
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #10 on: March 07, 2008, 02:34 AM »

Ehm, dude's instead of all this command line wahala why don't you just download netbeans free online at www.netbeans.org.

 Huh
don_java (m)
Re: Javac Welcome1.java Could Not Compile The Application I Wrote,please Help.
« #11 on: March 07, 2008, 11:23 AM »

 Cool
Another answer to your problem could be as a result of the CD-ROM,or right click on the My Computer icon on your Desktop,and a dialog box will appear,after that click on the Advanced link of the Dialog box,you will see a Startup and Recovery label on the Dialog box,click on the Enviroment Variables,click on New to set the Class path:jdk1.5.0\bin,make sure that the version that you are using has been properly burned into the CD-Rom.As for Vista that OS sucks,this is one Microsoft failed projects,they should borrow a leaf from OSS.
       
                                                           Keep it Real!
 Database Development For Mosque/church  Can One Be A Web Developer And Software Engineer At The Same Time?  Aptech, Niit Or Karrox For Oracle Certificati  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 
Google
 
Web www.nairaland.com
Sections: TV/Movies (2) Music/Radio (2) Celebrities Jobs (2) Career Romance Books Politics Sports Fashion Travel
Health Schooling Religion General(2) Business Webmaster Programming Computers Phones Cars & Trucks

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

Nairaland is owned by Oluwaseun Osewa
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.