File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
brian layton
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47229
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47229
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't use abbreviations like "u" for "you;" I shall alter it. This FAQ explains why.
 
brian layton
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
brian layton
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lolle Holmgren
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47229
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic