Please help me - project in Java...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nadiatjie
    New Member
    • Sep 2008
    • 4

    Please help me - project in Java...

    I am still in school and studying java, I am kind of new to it(I have been working in Delphi for 2 years and only recently started working with java...) as well and really need help with a project. For my last term I need to write a program that allows the user to play the game mastermind.
    I have a few problems that I can't seem to figure out...

    firstly I have an error and I don't know what it means:
    java.lang.NoCla ssDefFoundError : toets
    Caused by: java.lang.Class NotFoundExcepti on: toets

    secondly I don't know how to save data on the computer after it has been entered, say if I used a JOptionPane and this person entered their name and played a game and won, how and where can I save this information so that it will still be found the next time they log on?

    Please Help me !!!
    Last edited by Nadiatjie; Sep 30 '08, 09:53 AM. Reason: Spelling mistake
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    NoClassDefFound means that that named .class file could not be found in the class path that was used to run that program. Make sure that that .class file exists first (e.g make sure that .java file for it is successfully compiled first) or if the .class exists then make sure you include its path in the classpath argument of your program.

    For the second question, data can be stored in various ways. The most common approaches are files (.txt , .dat, .xml, e.t.c) and databases.

    Comment

    • Nadiatjie
      New Member
      • Sep 2008
      • 4

      #3
      Thank you very much for replying.

      Where exactly is the classpath argument of the program?

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by Nadiatjie
        Thank you very much for replying.

        Where exactly is the classpath argument of the program?
        What you always wanted to know about PATH and classpath

        Comment

        • Nadiatjie
          New Member
          • Sep 2008
          • 4

          #5
          Thank you very very much, you are saving my life!

          Comment

          Working...