Solved

setting classpath in windows NT

Posted on 1998-11-20
9
728 Views
Last Modified: 2012-06-27
i want to set the classpath in windows NT.

Logged on as administrator, i go to:
Start->Programs->Administrative Tools (Common)-> Windows NT Diagnostics
and i go to the Enviconment page.
This page displays CLASSPATH, but i am unable to modify it.

it is my understanding the NT ignores autoexec.bat, but in desperatiion, i tried putting "set CLASSPATH = yadda yadda yadda" in autoexec.bat, and restarted, then check the classpath as described above, but to no avail.

what can i do?

0
Comment
Question by:mickeydog
  • 6
  • 2
9 Comments
 
LVL 1

Accepted Solution

by:
cph earned 50 total points
ID: 1178320
Start->Settings->Control Panel
Double-click on System
Click on the tab Environment
Create your classpath variable and the first textfield and its value in the one below click apply or OK.
Open a Dos window and it should be there.

Hope this helps,

CpH

0
 

Author Comment

by:mickeydog
ID: 1178321
in the DOS window, how do i check the value of classpath?
i tried the obvious (at least to me)
classpath
show classpath
display classpath

to no avail.

0
 

Author Comment

by:mickeydog
ID: 1178322
in the DOS window, how do i check the value of classpath?
i tried the obvious (at least to me)
classpath
show classpath
display classpath

to no avail.

0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:mickeydog
ID: 1178323
ah, the answer is just
set

however, the path is so long i cant see the end, which would be where my new classpath is.  i guess i can put it first in the list.

0
 

Author Comment

by:mickeydog
ID: 1178324
ok, so i can see it now, when i look at it thru the DOS window,
i see that it is set.
when i view it the way i originally did,
Start->Settings->Control Panel
    Double-click on System
    Click on the tab Environment
it is unchanged.

which is correct?

0
 

Author Comment

by:mickeydog
ID: 1178325
ok, so i can see it now, when i look at it thru the DOS window,
i see that it is set.
when i view it the way i originally did,
Start->Programs->Administrative Tools (Common)-> Windows NT Diagnostics
    and i go to the Enviconment page.
it is unchanged.

what is happening here?

also, can one so definitively that win NT does not use autoexec.bat?


0
 

Author Comment

by:mickeydog
ID: 1178326
never mind, i logged off and logged back on, it is all there.
if you can answer the autoexec.bat question, we can wrap this up!
0
 
LVL 1

Expert Comment

by:payn
ID: 1178327
The autoexec.bat file is completely ignored by default under NT. However, you can change this.

Every time NT starts a new VDM (Virtual DOS Machine), it can pass it a config file and a batch file. Normally you use config.nt and autoexec.nt, if anything, but by changing two or three registry settings you can make it use C:\config.sys and C:\autoexec.bat. I don't know the settings off the top of my head, but I can find them if you want.

This is generally a bad idea--the only reason you'd have C:\config.sys and C:\autoexec.bat is because you're dual-booting to DOS, Win3.1, Win95, etc., and it's most likely that you won't want to use the same config and autoexec under NT.

No matter where you autoexec is or what it's called, it's only going to affect whatever happens in a VDM. Remember, it's not loaded by NT at startup, it's loaded by the NTVDM when a VDM is started. Therefore, it won't affect any Win32 apps (including NT console apps).

By the way, did you change your setting in the top half of the control panel (all users) or the bottom half (current user)? Make sure you know the difference. If you made your change for all users, it can still be changed for an individual user.
0
 
LVL 1

Expert Comment

by:cph
ID: 1178328
I think payn answer your question on autoexec batch file pretty well :)
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question