1. Play on the ImDeity Minecraft Multiplayer server -- Goto the "Multiplayer" section of Minecraft and type "mc.imdeity.com" to join!
    Dismiss Notice

Comments on Profile Post by Majora_Unmasked

  1. KILL3RTACO
    KILL3RTACO
    Well, first off, I suggest using the java.io package for that instead. java.nio is specific to Java 7. What are you trying to accomplish?
    May 26, 2014
  2. Majora_Unmasked
    Majora_Unmasked
    It's for a mod installer I'm making. What this part does is, it checks if the file is already there, and if not it copies it from the downloaded folder into the .minecraft
    May 26, 2014
  3. KILL3RTACO
    KILL3RTACO
    java.io.File has .exists() and .createNewFile() methods. Are the files you're copying text files? Or are they Binary as well?
    May 27, 2014
  4. Majora_Unmasked
    Majora_Unmasked
    They would copy any type of file, mostly image and sound files though
    May 27, 2014
  5. KILL3RTACO
    KILL3RTACO
    May 27, 2014
  6. KILL3RTACO
    KILL3RTACO
    It's simply reading from one place and writing it somewhere else. Modify as needed of course
    May 27, 2014
  7. Majora_Unmasked
    Majora_Unmasked
    Thank you!
    May 27, 2014
  8. Majora_Unmasked
    Majora_Unmasked
    Now it's giving me a FileNotFoundException xD Even though the initial file is in the same directory as the project
    May 29, 2014
  9. KILL3RTACO
    KILL3RTACO
    By project do you mean the Eclipse project?
    May 29, 2014
  10. Majora_Unmasked
    Majora_Unmasked
    That is correct
    May 29, 2014
  11. KILL3RTACO
    KILL3RTACO
    Try checking the value of System.getProperty("user.dir")

    That should display the current directory of the jar, or in this case the project folder
    May 29, 2014
  12. Majora_Unmasked
    Majora_Unmasked
    So should I set that to the jar directory? I'm confused lol

    Would it be something like

    System.getProperty("user.dir") = "helloworld.png"; ?
    May 30, 2014
  13. KILL3RTACO
    KILL3RTACO
    No, system properties are already set. Print the value of that property to console to see what it is. Hopefully it's the absolute path of your project folder.
    May 30, 2014
  14. Majora_Unmasked
    Majora_Unmasked
    Oh so I'm just using it to check? Alright
    May 30, 2014