File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes how do you recognize javac as an internal or external command (compiler error) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how do you recognize javac as an internal or external command (compiler error)" Watch "how do you recognize javac as an internal or external command (compiler error)" New topic
Author

how do you recognize javac as an internal or external command (compiler error)

brian layton
Greenhorn

Joined: Jul 13, 2008
Posts: 9
hey i am making i own server atm but i cant compile. i have downloaded java and jdk but it still doesnt work. i know i have to set a path or something but im really new at this coding stuff and have no idea hwo to do this and without my compiler i cant update so its really driving me crazy.

please help

[edit]Change "u" to "you" in title. CR[/edit]
[ July 14, 2008: Message edited by: Campbell Ritchie ]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Welcome to JavaRanch

That isn't a compiler error; it is failure to find the compiler in the first place and is a very common problem. I wrote about it recently here; find that thread and follow the instructions and links there.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Please don't use abbreviations like "u" for "you;" I shall alter it. This FAQ explains why.
brian layton
Greenhorn

Joined: Jul 13, 2008
Posts: 9
the guide on that link for updating the path varible is for windows xp and 2000 but im using windows vista and i cant find environment varibles on my computer
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14432
    
  23

On Windows Vista: Click the Start button, right-click on Computer, select Properties. Then click Advanced System Settings on the left side of the window. Then you'll get the same settings window as on Windows XP; click the Environment Variables button.

(Note, my Windows Vista is in Dutch, and I'm guessing what the English names are).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
brian layton
Greenhorn

Joined: Jul 13, 2008
Posts: 9
sorry for all the questions but im really new to this kind fo computer stuff. but wat would is the bin file name for the most recent jdk?
brian layton
Greenhorn

Joined: Jul 13, 2008
Posts: 9
ok, nvm i found the file name
when i add it in environment varibles theres two options, varible and value, do i put the file name in value and PATH in varible or what?
brian layton
Greenhorn

Joined: Jul 13, 2008
Posts: 9
i think i made a path for java now but my compiler still doesnt work it says ...
Note: stream.java uses or overrides a deprecated API.
Note: Recompile with -Xlint eprecation for details.

what do i do??

[edit]Disable smilies CR[/edit]
[ July 14, 2008: Message edited by: Campbell Ritchie ]
Carl Pettersson
Ranch Hand

Joined: Sep 09, 2003
Posts: 73
The warning means what it says: You are using a API, or resource, (class/interface etc) that is marked as 'old', or deprecated. This doesn't mean that it won't work, just that it is not the recommended way any more.
The suggestion of compiling with Xlint is good, you do it like this:

Now javac will tell you more about which API it considers old. Mostly (if not always?), the java specification documents (http://java.sun.com/reference/api/index.html) will give hints on what you should use instead of the old way.
Hope this helps.

(Gah, stupid smilies... )
[ July 14, 2008: Message edited by: Carl Pettersson ]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19784
    
  20

Originally posted by Jesper Young:
On Windows Vista: Click the Start button, right-click on Computer, select Properties.

Little hint: you can get the same screen faster by pressing and holding the Windows key, then pressing Break.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Lolle Holmgren
Greenhorn

Joined: Nov 26, 2009
Posts: 1
brian layton wrote:i think i made a path for java now but my compiler still doesnt work it says ...
Note: stream.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:Deprecation for details.

what do i do??


Same error for me. But can you all please tell us how to fix it?
:confused:
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Welcome to the Ranch

That is a completely different and unrelated problem from "cannot recognize javac . . .". It is not actually a compiler error, and your code will have been compiled. Do exactly what the message says

javac -Xlint:depreciation MyClass.java

That will give you a list of warnings of what you have used. When you find out which deprecated methods you have used, go to the link which Carl Pettersson quoted last year, then go to the methods or classes which your error message mentions, and it should tell you what to use instead. I have probably spelt depreciation wrongly; you may need to write Depreciation instead.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how do you recognize javac as an internal or external command (compiler error)