junior_in_oracle
asked on
in java javac: file not found
hi friends
this is my first program in java and i get the error message could some help plz
C:\>javac first_prog.java
javac: file not found: first_prog.java
Usage: javac <options> <source files>
use -help for a list of possible options
thanks & regard
first_prog.java is not in the current directory. Did you save it?
ASKER
hi CEHJ
which directory you mean
which directory you mean
ASKER
i told i'm newwwww plz be more specific
The directory you're in. C:\
ASKER
the java is installed in this path
C:\Program Files\Java\jdk1.6.0_04\bin
You don't really want to be in that anyway. Do the following and work there
mkdir "%USERPROFILE%\java-proj"
cd "%USERPROFILE%\java-proj"
ASKER
okay man
this is the result
C:\>mkdir "%USERPROFILE%\java-proj"
A subdirectory or file C:\Documents and Settings\mohammed\java-pro
C:\>cd "%USERPROFILE%\java-proj"
C:\Documents and Settings\mohammed\java-pro
could you explain this later after you solve the problem pleeeeeeeeeeeeez
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry CEHJ
there is a new error could help plz
C:\Documents and Settings\mohammed\java-pro j>javac first_prog.java
first_prog.java:1: class HelloApp is public, should be declared in a file named
HelloApp.java
public class HelloApp
^
there is a new error could help plz
C:\Documents and Settings\mohammed\java-pro
first_prog.java:1: class HelloApp is public, should be declared in a file named
HelloApp.java
public class HelloApp
^
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hi CEHJ
is this mean it's work
C:\Documents and Settings\mohammed\java-pro
C:\Documents and Settings\mohammed\java-pro
Please post source code
ASKER
this is the source code
public class helloapp
{
public static void main(String[] args)
{
System.out.println("Hello,
}
}
is there any error??
ASKER
CEHJ
why I should put all of my examples in this path (C:\Documents and Settings\mohammed\java-pro
could i put in another directory like this :
(c:\mywork) or
(c:\examples)
ASKER
hi CEHJ
it's work thanks for help and advice
could you provide me with website or links have examples and doc plz
>>why I should put all of my examples in this path (C:\Documents and Settings\mohammed\java-
proj>)
Because that's where use files should be kept in Windows
Take the tutorials at Sun
http://java.sun.com/docs/books/tutorial/
proj>)
Because that's where use files should be kept in Windows
Take the tutorials at Sun
http://java.sun.com/docs/books/tutorial/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)
You don't close the question btw - you accept an answer or answers. Otherwise it give the site admins more work
You don't close the question btw - you accept an answer or answers. Otherwise it give the site admins more work
ASKER
ok CEHJ, tell me how i'm new in this forum, and also tell me how i give u the point
plz, i'm new
I don't think you can do anything now - let things take their course and don't worry about it too much
ASKER
ok, at least show tel me what exactly should i do after some answer my question . i don't want make this mistake again . sorry if there is any mistake in my english language
>>ok, at least show tel me what exactly should i do
Well i did ;-) - you accept one or more answers. See https://www.experts-exchange.com/help.jsp
Well i did ;-) - you accept one or more answers. See https://www.experts-exchange.com/help.jsp
:-)