This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am working on Win2000 Professional.I cud compile a simple java prg but was unable to run it.But the same worked on Win98!! What cud b the probable reasons?? I have set the path variable to point to the bin directory.Do i need to set the classpath?
Preety, You might want to take a look at this message thread because it might give you some clues for diagnosing your problem: j2sdk-1_4_0_01- windows-i586.exe = java version 1.3 and classpath question??? Janet
Preety, I deleted your post in the SJCD Forum, since it was in the wrong forum. I deleted it rather than moving it becaus I saw that you had posted a duplicate post here in the Java In Genereal Forum. Please do not post the same question in multiple forums. There is usually one forum that will fit your question specifically. Thanks In Windows 2000 there are environment variables like path to BIN, and also the "." so that it runs in the same directory as your compiled code. Windows 98 does not have environment variables like this. To say that you set path etc usually in your autoexec.bat, whereas in Windows 2000 there is a control panel for environment variables. Mark
Originally posted by Peter Gragert in a different thread: If you want to set your CLASSPATH 'forever' depending on wich version of winows you use you should set the 'environment'. Window NT or 2000: right click 'My computer' choose: properties and a 'tab page' Environment should be visible then look if there is already a CLASSPATH you may add more where a ";" (semicolon) is the seperator. Otherwise create it. In other version there should be something else (Winodws 95 in the autoecec.bat e.g.) [or] In a batch file e.g. (should work in a DOS window too) (one line command set CLASSPATH=.;g:\java\javaranch\JavaranchCommon.zip for example .
Also, I recommend surrounding classpath specifications with double-quotation marks. This helps resolves issues some systems have with spaces.