aspose file tools*
The moose likes Beginning Java and the fly likes javac complications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "javac complications" Watch "javac complications" New topic
Author

javac complications

caleb wiggins
Greenhorn

Joined: Jul 21, 2007
Posts: 8
i have my bin path right but when i try to compile it gives me this readout

javac: file not found: BeerSong.java
usage: javac <options><source files>
use -help for a list of possible options

i was just wondering if any one else has had this problem and could help me out i had it working just the other day and now its doing this any and all help is much appreciated
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Originally posted by caleb wiggins:
i have my bin path right but when i try to compile it gives me this readout

javac: file not found: BeerSong.java
usage: javac <options><source files>
use -help for a list of possible options

i was just wondering if any one else has had this problem and could help me out i had it working just the other day and now its doing this any and all help is much appreciated


It's telling you that it can't find the file BeerSong.java, is BeerSong.java in the same directory as where you are running javac from?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
caleb wiggins
Greenhorn

Joined: Jul 21, 2007
Posts: 8
i dont think they are how do i change that?

the file is saved in a notepad doc. the other is in a seperate folder

thanks
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Use the command cd to change directories. For example, if your file is in a directory called "myjava," type...

C:\>cd myjava


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Gaurav Chauhan
Greenhorn

Joined: Apr 14, 2008
Posts: 27
i am sure that java source file is not in the current directory. Check the location of the .java file and use CD COMMAND to move to that folder and then try to compile.

Today i noticed a classmate of mine was having the same problem.


Don't tell me there is nothing beyond sky, There are footprints on moon.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Also be absolutely sure that you haven't created a file named "BeerSong.java.txt"; Notepad is all too happy to do that for you.


[Jess in Action][AskingGoodQuestions]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41837
    
  63
Also be absolutely sure that you haven't created a file named "BeerSong.java.txt"; Notepad is all too happy to do that for you.

What can you expect if you combine coffee and beer - being just a simple text editor, it must get confused...


Ping & DNS - my free Android networking tools app
caleb wiggins
Greenhorn

Joined: Jul 21, 2007
Posts: 8
i changed the directories and got the same result so does this have something to do with the update that i downloaded? or am i just doing something wrong and thank you for all your guys help
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

your file must be saved ad BeerSong.java.txt

Open the file in notepad and choose File-->Save As
Then Enter the name of the file "BeerSong.java" including the double quotes.
Also remember to keep the Capitalization correct i.e. save the file as BeerSong.java and not beersong.java or beerSong.java...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javac complications