Jump to content

Recommended Posts

Posted

When I run the code in normal java, it works, but when I run with the minecraft forge, it puts an  "Â" character.

I put that code to the preInit event. I can print it to the chat or anything, that "Â" character will be visible.

I'm using minecraft forge 1.8.9 - 11.15.1.1722 (recommended 1.8.9) from the official minecraft forge website.

I can solve this by String.replaceAll("Â", "") but it's annoying, and I want to know why is this happen.

 

Sorry for bad english I'm hungarian.

 

 

code:

 

File config = new File("c:\\Users\\gutyina70\\Desktop\\MyJava\\Eclipse\\McMod AutoChat new Win 8\\run\\config\\AutoChat\\gigi\\messages.dat");
BufferedReader reader = new BufferedReader(new FileReader(config));
System.out.println("read from file: " + reader.readLine());
reader.close();
System.out.println("read from string: " + "§aTEST");

 

output in normal java:

 

read from file: §aTEST
read from string: §aTEST

 

output in java with forge:

 

[20:05:28] [Client thread/INFO] [STDOUT]: [com.gutyina70.autochat.AutoChat:preInit:31]: read from file: §aTEST
[20:05:28] [Client thread/INFO] [STDOUT]: [com.gutyina70.autochat.AutoChat:preInit:33]: read from string: §aTEST

 

Posted

The problem is MAYBE the normal java and the java with forge works with an other version of java, I don't know. Where can I see the java version in eclipse?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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