This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one 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.
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
posted
0
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.
chandana kotamraju
Greenhorn
Joined: Jun 14, 2001
Posts: 6
posted
0
I am using Win98 . Advice me on seting the class path in Win98.
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
posted
0
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.
Tina Parks
Ranch Hand
Joined: Jun 30, 2001
Posts: 35
posted
0
I had a different take on his question. I thought by his question that he is having trouble configuring his browser to run Swing. No?
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
I am moving this thread to the Beginners forum. Please continue the discussion there. regds. - satya
I think you can set your classpath variable in your autoexec.bat file. Once you reboot the system, all the environmental variables will be initialized appropriately.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.