re: java development
Friday, December 7, 2001 at 3:00 am Windows XP Annoyances Discussion Forum
Posted by Tony
(2 messages posted)
This not so much an XP problem as a how-to-get-going-with-Java problem. The standard
installer for the JDK just unpacks the files onto your hard disc. You have to do
some more setting up before the system can find those files. Not much though. In
order to do basic Java development you just need to edit two environment variables
'PATH' and 'CLASSPATH'. PATH is an environment variable that is usually present
on all MS OSes since DOS and it tells the system where to look for executable files.
In this case you want C:\jdk1.3.1_01\bin (or something similar - depending on which
version of the JDK you have and where you have installed it) added to your path.
To do this (on XP) go
1. start, settings, control panel
2. double click on System and select the 'advanced' tab
3. click the 'Environment Variables' button
4. select the PATH variable and hit 'edit'
5. at the end of the string add a semi-colon and then the path you want to add (C:\jdk1.3.1_01\bin
or similar)
I think the command prompt only loads the environment variables when it starts so
you will want to open a new command prompt window to work in.
You should now find that you can type javac (or jar or rmic...) and the system will
find the executable.
You still need to set the CLASSPATH variable which the java system uses to find library
files.
Go through the same rigmarole to get to the environment variables page in System
only this time
hit 'New' and enter 'CLASSPATH' in the variable name field and 'C:\jdk1.3.1_01\jre\lib\rt.jar'
(or wherever rt.jar is) into the variable value field.
There's many different ways of accomplishing the same thing. You can for instance
write batch files to set up your development environment for different versions and
different projects, but for simple java development just setting up PATH and CLASSPATH
as above should see you through.
On Tuesday, December 4, 2001 at 10:01 pm, Hing-Lung TSANG wrote:
>Hi all!
>
>I wish to know what happened when I installed the JAVA Development Kit Standard
Edition.
>I got to a DOS prompt and type
>
>javac filename.java
>
>then it comes up with the error that there is no such program installed.
>
>Without compiling it, my java program would not run!
>
>Thanks to any responeses
- Written in response to:
- java development (Hing-Lung TSANG: Tuesday, December 4, 2001 at 10:01 pm)
There are presently no replies to this message.
|
|