Results 1 to 7 of 7
  1. #1
    Fish is offline Member
    Join Date
    Jun 2007
    Posts
    5
    Rep Power
    0

    Default Saving Variables

    Im curently writing a script for a few freinds and myself to keep track of our stats and i would like this file to save certain inputs as well as make a new file to make sure that there is a backup of old files. How would i do this?

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    10

    Default

    Hi,

    Check the following threads for solving your problem. Let us know if you cant solve it..

    How to create a file
    How to Rename a File
    How to Move a File to Another Directory

  3. #3
    Fish is offline Member
    Join Date
    Jun 2007
    Posts
    5
    Rep Power
    0

    Default : /

    I seem to have a problem and i think it is because im using netbeans but im not sure. Its most likely the reason since I commonly get errors when something should work fine. It is stating that "\" while creating the directory is an illegal escape character. Can anyone tell me what this means? Also cna anyone sugest a better IDE or way to program?

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    10

    Default

    Please paste the line this error is being generated. What is the path you used? Does it a valid path for your operating system (you can not put backlash inside double quotes (you need to write twice of them to escape itself))? Pasting full error/exception here may help us understand your problem too.

  5. #5
    Fish is offline Member
    Join Date
    Jun 2007
    Posts
    5
    Rep Power
    0

    Default

    "C:\java\game_Version_"+set1+".txt" is what i had, needed to be switched to "C:/java/game_Version_"+set1+".txt". sorry for the confusion

  6. #6
    Fish is offline Member
    Join Date
    Jun 2007
    Posts
    5
    Rep Power
    0

    Default

    ok i have put in the read file scripting which i got from the create a file link and its giving me a warning about
    Note: C:\Documents and Settings\Bill\Halfball 2007\src\halfball2007\Main.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    what is this? how do i recomplie with that as a flag? how do i recomplie with a -deprecated flag?

  7. #7
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    10

    Default

    That means that you are using a deprecated method call or a deprecated class. To see the details use following command while compiling:

    Java Code:
        javac -Xlint:deprecation YourMainClass.java
    instead of:

    Java Code:
        javac YourMainClass.java
    If you are using a specific IDE, you need to find the way to add compiler parameters for your java project. (e.g. for netbeans: right click on your project node and select properties).

Similar Threads

  1. Saving Blob through Hibernate
    By Ed in forum JDBC
    Replies: 2
    Last Post: 01-05-2009, 05:03 AM
  2. Saving data...?
    By easyRyder in forum New To Java
    Replies: 8
    Last Post: 07-15-2008, 03:14 AM
  3. Saving data in an XML file
    By Thez in forum New To Java
    Replies: 1
    Last Post: 12-08-2007, 09:24 PM
  4. saving variables to the harddrive
    By Talon876 in forum New To Java
    Replies: 1
    Last Post: 11-02-2007, 01:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •