Jump to content

Zane49er

Members
  • Posts

    76
  • Joined

  • Last visited

1 Follower

Converted

  • Gender
    Male
  • Location
    V. Fortress

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Zane49er's Achievements

Stone Miner

Stone Miner (3/8)

3

Reputation

  1. Yes, thank you. Everything seems to be working.
  2. "Team" doesn't seem to even be an option, and thanks for the suggestion, but sorry, I'm going to take that as a last resort.
  3. Ok, it's sort of working now... it has stupid git repository reminders EVERYWHERE, but it runs... Do you know how to remove those? as well as being annoying, they obstruct the error reminders.
  4. I agree that the "Oxygen" update is stupid. I wish I could go back, but there is zero back-compatibility so I'd have to reset everything... I'll try that then.
  5. Yes... though it isn't out of the question that the repository was improperly configured...
  6. It says that "either they already exist in this workspace or their project description file is corrupt."
  7. Alright, those worked, but it still shows as empty.
  8. It seems that I'll have to install or find JDK... Thought I did that already, but apparently not...
  9. Nope, the build failed and the window closed before I could see why.
  10. I think this might actually be the problem - it was downloaded to a profile that doesn't exist on the new computer. I'll move it somewhere sensible.
  11. Sorry for yet another newbie question, but... I just replaced my computer, and can't figure out how to re-add my code from the repository to my new eclipse install. The code probably isn't necessary, but it's here: https://github.com/zane49er2/VMC I have already tried downloading it and selecting the main folder as a workspace, but that showed an empty workspace with no projects.
  12. Thanks. I'm surprised I didn't notice that. The first slash was the cause of the crash, removing it gives the exact result I want: String resourceName = "assets/vmc/BookPages/" + pageID + ".json"; BufferedReader pageScan = new BufferedReader(new InputStreamReader(getClass().getClassLoader ().getResourceAsStream(resourceName), "UTF-8")); JsonObject pageData = new Gson().fromJson(pageScan, JsonObject.class); pageName = pageData.get("name").getAsString();
  13. String resourceName = "/assets/vmc/BookPages/" + pageID + ".json"; BufferedReader pageScan = new BufferedReader(new InputStreamReader(getClass().getClassLoader ().getResourceAsStream(resourceName), "UTF-8")); String pageString = ""; while(pageScan.ready()){ pageString += pageScan.readLine(); } JsonObject pageData = new Gson().fromJson(ResourceManager.getString(pageString), JsonObject.class); pageName = pageData.get("name").getAsString(); I guess I should explain why I'm doing this. Before attempting to make this .json file into a string, I was reading a plain text file and reading each line into a variable in an object in an array. The text files obviously started to get really ugly, so I wanted to format it as JSON, which is exactly the format that I was emulating with the arrays. GSON made this mostly easy except that it needs a string for an input. Is there a way I can get this JSON document into a string, or am I missing something that would make this much easier? The code above causes nullpointerexception crash from the inputStreamReader on the second line, which was previously working fine.
  14. I'm having a hard time understanding what this is doing. What is HardLib and why are you getting its runtime class? How do you go from byte array to something usable? I see the toString method there, but also on the bufferedReader.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.