Could not find or load main class

后端 未结 16 1184
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 20:27

I have Windows 7, installed jdk1.7.0 and its supporting jre7.
My problem is compilation part works perfectly, but while running the Java program I get this error saying:

16条回答
  •  时光取名叫无心
    2020-11-27 20:42

    Here is my working env path variables after much troubleshooting

    CLASSPATH

    .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;C:\Program Files (x86)\Java\jdk1.6.0_27\bin

    PATH <---sometimes this PATH fills up with too many paths and you can't add a path(which was my case!)

    bunchofpaths;C:\Program Files (x86)\Java\jdk1.6.0_27\bin

    Additionally, when you try to use the cmd to execute the file...make sure your in the local directory as the file your trying to execute (which you did.)

    Just a little checklist for people that have this problem still.

提交回复
热议问题