Solved

setting classpath in windows NT

Posted on 1998-11-20
9
725 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

743 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

12 Experts available now in Live!

Get 1:1 Help Now