General discussion

Locked

compiling java in windows

By djeesfan ·
i have trouble compiling and running java programs on my windows pc when its not in the bin folder. please help!

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

compiling java in windows

by Ricky In reply to compiling java in windows

Check/Set you Java executable and class paths.

Trust you've installed java from the SUN CD. Then check what paths it puts in the autoexec.bat and config.sys files and change them as required...

Collapse -

compiling java in windows

by djeesfan In reply to compiling java in windows

The question was auto-closed by TechRepublic

Collapse -

compiling java in windows

by Ricky In reply to compiling java in windows

Check/Set you Java executable and class paths.

Trust you've installed java from the SUN CD. Then check what paths it puts in the autoexec.bat and config.sys files and change them as required...

Collapse -

compiling java in windows

by djeesfan In reply to compiling java in windows

The question was auto-closed by TechRepublic

Collapse -

compiling java in windows

by Jay Eckles In reply to compiling java in windows

Try this:

In a DOS window, type this command:
set PATH=%PATH%;C:\pathto\java\
[obviously replacing C:\pathto\java with the path to the Java executable on your system]

Then try running a Java program. If it works, then it is in fact your environment that was the problem. You'll want to modify your environment to include this path in your path statement permanently - ask another question if you don't know how to do that.

Good luck.

Jay Eckles
www.jayeckles.com

Collapse -

compiling java in windows

by djeesfan In reply to compiling java in windows

The question was auto-closed by TechRepublic

Collapse -

compiling java in windows

by shariqsaad In reply to compiling java in windows

Step 1
open the "autoexec.bat" file located at "c:\" in any editor for eg. "Note Pad", "Word Pad" or "MS Word".

Step 2
Find the line starting with "Path = " or starting with "CLASS PATH =". and then add at its end the directory path where your"*.java" means java project files are located. for eg mines are in "c:\shariq\java"
so i would add something like this
PATH = c:\shariq\java\java
or
CLASS PATH = C:\shariq\java\java
or (if i have alreay some thing in in Path like)
Path = c:\windows; c:\windows\command;
than i would add to this
Path = c:\windows; c:\windows\command;c:\shariq\java\java
or
Class Path = c:\windows; c:\windows\command;c:\shariq\java\java


shariqsaad@yahoo.com

Collapse -

compiling java in windows

by djeesfan In reply to compiling java in windows

The question was auto-closed by TechRepublic

Collapse -

compiling java in windows

by djeesfan In reply to compiling java in windows

This question was auto closed due to inactivity

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums