• 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

Trying to install JAVA JDK

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI

I HAVE DOWNLOADED THE JAVA JDK 1.6, BUT I AM HAVING TROUBLE WITH THE ENVIROMENT VARIABLES. I HAVE TYPED IN JAVAC INTO THE COMMAND PROMPT JUST TO MAKE SURE THAT IT IS INDEED JAVA 1.6 WHICH IT IT.

AT THIS CURRENT TIME THE USER VARIABLES FOR MY COMPUTER DOESNT HAVE ANY. BUT THE USER VARIABLES FOR THE SYSTEM HAVE: HOME: C:\Program Files\java\jdk1.6.0_23 AND THE PATH WHICH IS IN SYSTEM VARIABLES IS : C:\Program Files\Java\jdk1.6.0_23\bin;

I REALLY DO NEEED HELP WITH THIS AS I CAN CHANGE DIRECTORY TO THE FOLDER WHERE THE JAVA FILES ARE, BUT I AM UNABLE TO COMPILE ANY OF THE FILES. I NEED URGENT HELP AS I AM TRYING TO COMPLETE A WEBSERVER ASSIGNMENT WHICH IS DUE AND THIS WOULD HELP IF I AM ABLE TO DO THIS AT HOME AND NOT JUST AT IN THE LABS AT MY UNIVERSITY. ALL HELP WOULD BE APPRECIATED THANK YOU
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yo, dude! All that uppercase makes things hard to read and really hurts my eyes. I'd suggest that if you really want people to read your posts that you make them easier to read. Check out this FAQ: KeepItDown.
 
Brenda Stevens
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
lol ok thanks for that as i am new to this forum sorry about the upper case. i have now changed to lower case and hope this helps
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

If...

javac -version

...is confirming that you have 1.6 installed, then it sounds like your variables are correct, because javac is recognized. What specific error messages are you getting when you try to compile?
 
Brenda Stevens
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You,

The error that I am receiving is that it is saying the file is not recognized. I thought maybe I had made a spelling error, but I have tried to compile other .java files and I keep recieving the same error message which is javac : file not found
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Command Prompt, change directories (cd) to the directory that contains your .java source file. That's probably where you should be compiling from.

Type...

dir

...to get a listing of that directory. Is your .java source file listed there?
 
Brenda Stevens
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I have changed directories to where the file is and typed the command dir but it doesnt list any files which I have stored in that directory :|
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you paste exactly what your command prompt is showing when you change directories? For example...

H:\>cd java/tools
H:\Java\Tools>
 
Brenda Stevens
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C:\users\jay> cd oscn
C:\users\jay\oscn>
C:\users\jay\oscn> javac UselessHTTPServer01.java
javac: file not found: UselessHTTPServer01.java
usage: javac <options> <source files>
use -help for a list of possible options

C:\users\jay\oscn
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"jay may", please check your private messages for an important administrative matter. Thanks.
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, check Bear's message and handle that.

Next, can you paste exactly what you get when you type dir at C:\users\jay\oscn>

And if UselessHTTPServer01.java does not appear, are you absolutely certain that's where you've saved it?

(I'm starting to think it just doesn't like being called "Useless." )
 
Brenda Stevens
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah it is definately in that folder. I just tried to make a new folder and put a .java file into it and then tried to change the directory to the new folder but it said The system cannot find the path specified.

Ok after i have typed dir at C:\users\jay\oscn> the message i get is:

C:\Users\jay\oscn>dir
Volume in drive C has no label.
Volume serial number is 0402-9e21

Directory of C:\users\jay\oscn
08/11/2010 13.49 <DIR> .
08/11/2010 13.49 <DIR> ..
0 file(s) 0 bytes
2 Dir(s) 4,724,436,992 bytes free
 
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

Brenda Stevens wrote:Yeah it is definately in that folder.


The output of the dir command shows that the folder is empty. So your source file is definitely not in that folder.
 
Brenda Stevens
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I assumed it was in that folder becase when i looked in the folder via my documents is in there. Im now slightly confused as to if it is because of my enviroment variables because my user variables dont have anything but my system variables have both the home and the path in them.
For JAVA_HOME i have C:\Program Files\Java\jdk1.6.0_23
For Path i have C:\Program Files\Java\jdk1.6.0_23\bin
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brenda Stevens wrote:Ok I assumed it was in that folder becase when i looked in the folder via my documents is in there...


In Windows, isn't "My Documents" somewhere like, C:\Documents and Settings\user\My Documents...? Perhaps the app you're using to save your .java file is not showing you a complete path?

When you save the .java file, try going all the way back up to "C:" and then down to your destination folder.
 
reply
    Bookmark Topic Watch Topic
  • New Topic