Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Installing Java on XP

  Asked By: Bonni    Date: Mar 12    Category: Java    Views: 806
  

Sorry to be a pain, but could anyone help with
getting java set up on my machine...<br>Im able to
compile java code but I cant run it on my machine. Ive
set the PATH to the directory of the \bin and Ive set
CLASSPATH=. <br>Nothling seems to get it to work, Im going
bald with all the hair Ive pulled out over the last
month or so trying to get it up and running.<br>Any
help at all would be greatly appreciated.

Share: 

 

7 Answers Found

 
Answer #1    Answered By: Jeffrey Washington     Answered On: Mar 12

Am I right in thinking that I should be able to
run a java  program through a dos command without
having to set  the environment variables in windows. If
so does anyone know what command I would type to get
one to run... I have bee trying to use Text Pad but
to no avail.<br>if I could at least get a program to
run on my machine  I will sleep at nights...

 
Answer #2    Answered By: Landra Schmidt     Answered On: Mar 12

Yes..you type in java  FileName to run  after compiling. Make sure your
filextension is filename.java instead of "java.txt"

 
Answer #3    Answered By: Alexander Bouchard     Answered On: Mar 12

Ive just tried that and I get an error message
saying 'java' is not recognised as an internal or
external command, operable program or batch
file....<br>Its not as if im trying to run  anything taxing. Im
about ready to boot my machine  into touch!

 
Answer #4    Answered By: Erika Evans     Answered On: Mar 12

Well, in that case CLASS PATH is not set  correctly. Can you detail the steps in
your installation?

 
Answer #5    Answered By: Jermaine Powell     Answered On: Mar 12

No, you do have to set  the envirnment variables
in Windows.<br><br>Your /bin directory  should be set
in the path  envirnoment variable. Otherwise WINDOZ
will never find your java.exe file.... unless you are
in the /bin directory when you run  it.<br><br>Those
of us who use an IDE sometimes are lulled into a
false sense of security, because usually, the IDE sets
an internal path and classpath when it
executes.<br><br>Using TextPad (or vi in Unix/Linux) is one way to
really get down and dirty and have to understand your
environmental variables.

 
Answer #6    Answered By: Frank Butler     Answered On: Mar 12

Set your environment variable on your system
first, i.e. path=c:\;c:\jdk1.4\lib. Your problem is your
environment is not set. Once you write your java  program and
get ready to save it, in the save box do
this..."MyJavaProgram.java" The emphasis here is to put what ever the program
name is in quotes("") before saving it. This will make
certain that it don't end up like
'MyJavaProgram.txt.java' With all this done, just go to the command line,
to the directory  you saved the file and type javac
MyJavaProgram.java, after it compiles and return to the command
prompt, type java MyJavaProgram and the program should
run and you should be able to sleep.<br>So, your
solution should be (1)Set Environment variable and (2)Save
your files in Quotes("..java").

 
Answer #7    Answered By: Francis Riley     Answered On: Mar 12

Go to http://javasoft.comFind the
link to the J2SE (Java 2 Standard
Edition).Java 1.4 is released now, so you can download that or
Java 1.3 (get the latest release of that).You
want to download the full SDK (Software development
kit), which contains the Runtime Environment, the
Classes, and the Source to all but the "native code"
classes.You can get the Windows edition.Install it by
just executing the exe. Then, set  your environment
variables either in a .bat file or the best way is through
the Control Pannel.Use diahron's post for the
correct way to set it.Good luck.Stephen
McConnellhttp://www.crosslogic.com

 
Didn't find what you were looking for? Find more on Installing Java on XP Or get search suggestion and latest updates.




Tagged: