[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Need help with school project urgently  XML
Forum Index » New to Java
Author Message
Nadiatjie

Newbie

Joined: 09/30/2008 03:56:39
Messages: 1
Offline

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.NoClassDefFoundError: toets
Caused by: java.lang.ClassNotFoundException: 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 !!!
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Nadiatjie wrote:
firstly I have an error and I don't know what it means:
java.lang.NoClassDefFoundError: toets
Caused by: java.lang.ClassNotFoundException: toets

It would help to know a bit more about your environment. Are you getting this error when you're running you program or before it even starts? This error means that Java can't find a class that it is looking for. This can vary from when it first starts up to while it is running.

Nadiatjie wrote:
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?


The data should probably be saved to a file. You can save the data with something likelike:



and read it back with something like:



Create a file at a known place, for example in the users home directory (retrieved from System.getProperty( "user.home" )) So your file name might be:



This gets the home directory of the user, a string that is the "file separator" which would be "/" on Unix based O/S's and "\" on Windows, and appends a file name.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
 
Forum Index » New to Java
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle