The Artima Developer Community
Sponsored Link

Java Answers Forum
JAVAC CAN'T READ FILE

6 replies on 1 page. Most recent reply: Dec 8, 2003 10:14 AM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 6 replies on 1 page
Nour-eddine Ghtami

Posts: 3
Nickname: nour
Registered: Dec, 2003

JAVAC CAN'T READ FILE Posted: Dec 5, 2003 6:41 AM
Reply to this message Reply
Advertisement
HI
I CAN'T COMPILE MY "filename.java" WHENEVER I TYPE:javac filename.java I GET THAT ERROR MESSAGE:(CAN'T READ filename.java) I UNDERSTAND THAT SAVING FILE AS TEXT FILE OR USING A TEXT EDITOR THAT DOESN'T SUPPORT JAVA EXTENTION WOULD GENERATE THIS ERROR MESSAGE, BUT IN MY CASE I AM USING "WINEDIT" EDITOR WHICH SUPPORT JAVA FILES AND SAVING THE CODE AS "filename.java" WITH JAVA FILE EXTENTION BUT STILL GETTING THAT ERROR MESSAGE!?
I DON'T KNOW WHAT TO DO TO GET IT RIGHT. ANYONE TO HELP PLEASE I WOULD BE VERY GRATEFULL .

Nour

kind regards


Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: JAVAC CAN'T READ FILE Posted: Dec 5, 2003 7:35 AM
Reply to this message Reply
May be someone will help you if you type your question after turning off your CAPS LOCK!!!!

Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: JAVAC CAN'T READ FILE Posted: Dec 5, 2003 7:38 AM
Reply to this message Reply
>OR USING A TEXT EDITOR THAT DOESN'T SUPPORT JAVA >EXTENTION WOULD GENERATE THIS ERROR MESSAGE

Every text editor is a potential tool to edit Java source code. There is nothing called java extension, all java source files are plain text files.

Nour-eddine Ghtami

Posts: 3
Nickname: nour
Registered: Dec, 2003

Re: JAVAC CAN'T READ FILE Posted: Dec 5, 2003 9:35 AM
Reply to this message Reply
thank you Senthoorkumaran for your reply and the clarification regarding the text editor for Java source code.

but i am still having that problem of compilation as i stated before. what should i do to get the file read and compiled?

many thanks

Nour

Adam Duffy

Posts: 168
Nickname: adamduffy
Registered: Feb, 2003

Re: JAVAC CAN'T READ FILE Posted: Dec 8, 2003 4:11 AM
Reply to this message Reply
Do a simple dir filename.java or ls filename.java or whatever the equivalent is for the operating system you are using. Make sure the filename is spelt correctly and your command line is in the correct directory before compiling.

Adam

s

Posts: 23
Nickname: codemonkey
Registered: Nov, 2003

Re: JAVAC CAN'T READ FILE Posted: Dec 8, 2003 9:44 AM
Reply to this message Reply
The problem is more than likely a classpath problem.
A common newbie mistake, make sure you have .(current working dir) in your CLASSPATH env var or pass it in on the javac command line e.g.
javac -classpath /path/to/any/needed/jars:. NewbieJavaProg.java

Good Luck and Happy Coding!
The Monk

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: JAVAC CAN'T READ FILE Posted: Dec 8, 2003 10:14 AM
Reply to this message Reply
After you find your file (since you are using WinEdit, you must be on Windows, so you'll use the dir command as suggested above), I bet we can guess what your next problem will be, unless you've miraculously named your class "filename"...

Flat View: This topic has 6 replies on 1 page
Topic: I am in deep, ..........you knw Previous Topic   Next Topic Topic: Tab Problem!!!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use