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 new to java.Everytime I am seting the path=c:\jdk1.2.2\bin before compiling.But I am facing problems when I tried to do a swing program.I know that it has something to do with classpath.Can anyone help me by writing in detail how to do it.
Hi Chandana, You seem to be getting confused with terminology. Your title talks about ClassPath and your topic only mentions Path. There are 2 different paths in question here. The Path variable you have set seems correct. It is only used in compilation. If your code compiles (with or without errors) then your Path is correct. The ClassPath variable should at least be set to "." if you plan to run any program from the directory where it resides. If you are running WinNT: Goto MyComputer and right click, Choose properties (last menu item) Select the Environment Tab If no CLASSPATH variable exists: Type in CLASSPATH in the Variable textfield Type in .; in the Value textfield If a CLASSPATH does exist: Make sure it has a single dot(".") in it (between 2 semi-colons). Click Ok button on bottom of Window. You should now be able to go to the directory where your *.java file exists, compile it, and run it without any problems. Regards, Manfred.
Joined: Jun 14, 2001
I am using Win98 . Advice me on seting the class path in Win98.
Joined: Jan 09, 2001
Hi Chandana, I don't understand your problem. I am running under Win98 at home and I have never needed to do anything with the class path. You should only have to set it if you have many *.class files that are scattered all around your directories. When you write basic programs, don't place a package line in it. This will allow you to have all you *.class files in a single directory. Then you just have to CD to that directory and compile and run. If you are still having problems, you will have better luck explaining what your problem is so if can be fixed. Talking in generalities get us no where ... Regards, Manfred.