Solved

setting classpath in windows NT

Posted on 1998-11-20
9
726 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now