×

Loading...

Topic

  • 工作学习 / IT杂谈 / Troubleshooting: who can offer the answer?
    本文发表在 rolia.net 枫下论坛This is a question from Jabber's former student in Maryland. I think it is a good topic to discuss about. See the enclosure.
    **********************************************
    Dear Dr. Lu,

    Can you please tell me what is wrong with my environment setting?
    I tested a java stand-alone application copied from 揟hinking in Java? I
    compiled the program 揚roperty?successfully under Windows 98, but failed to
    run it. When I used the command
    c:\javaprograms>java Property
    to run the program, it gave the following error message:
    Exception in thread 搈ain?java.lang.NoClassDefFoundError: Property

    The following is the environment I set in autoexec.bat
    SET PATH=%PATH%; C:\JDK1.2.1\BIN;C:\JDK1.2.1\LIB;
    SET CLASSPATH=C:\J2SDKEE1.2\LIB\J2EE.JAR;C:\JavaPrograms\packages;

    However, what surprised me is that I could run the same program under Windows
    95. The environment I set is :
    Set path=C:\jdk1.2.2\bin;C:\jdk1.2.2\lib;?path%?>
    I don抰 know why and can抰 figure out what is wrong. Should I have a java
    environment setting in Windows 98 different from Windows 95?

    Thank you very much.

    Sean更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • thinking in Java is not upated!
      • Thinking in Java has 2nd edition!
        Dear Guest,

        You might be a senior Java guy. For a Java novice, thinking in Java is a good book. In addition, this book has 2nd edition and it is not obsolete. For Java novices, it is no use to pursue the up-to-date Java API.

        I strongly recommend this book to new Java guys. By the way, if anybody wants to download 2nd edition, please visit www.bruceeckel.com.
    • Let me try .
      If I were this guy,I would unset the classpath environment variable first.Also If this class is in packages,you have to be very careful about the directory.
      I think the problem is the classpath environment variable.
      (SET CLASSPATH=C:\J2SDKEE1.2\LIB\J2EE.JAR;C:\JavaPrograms\packages; )
      • To fly_eagle
        Eagle, I think you have figured out the problem. Just one addendum. Usually,
        we add . in the CLASSPATH. In addition, we had better suppress last semicolon ;
        • Thanks,I see.