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

Trying to install JAVA JDK

 
Brenda Stevens
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"jay may", please check your private messages for an important administrative matter. Thanks.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
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
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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic