• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic