4
I’ve looked at several websites, several questions (including in stackoverflow itself) I did a lot of research and I couldn’t get this error out of Sublime Text 2 yet:
[Decode error - output not utf-8]
The Language In Question Is Java, I’ve tried using one . bat to compile and run java, already tried to put "encoding": "utf-8" in Javac.sublime-build, already tried to go in file->Save with Encoding->UTF-8. My JDK is right on variable PATH
, I have a variable called JAVA_HOME
with value (C: Program Files Java jre8 bin).
My Javac.sublime-build is currently as it is normally:
{
"cmd": ["javac", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
I changed the Javac.sublime-build:
{
"cmd": ["javac", "$file_name"], <- De "$file" para "$file_name"
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
Now he’s compiling it without any mistakes but when I put it:
{
"cmd": ["javac", "$file_name"],
"cmd": ["java", "$file_base_name"], <- Adicionei Está Linha
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
It gave error again [Decode error - output not utf-8]
Translating, for now I can only generate . class, but my purpose is to generate . class and run-Ló as well.
If you open it with another editor (e.g., Notepad++), you can see which encoding is?
– Victor Stafusa
@Victor I opened The Notepad++ and went on to format and it was "Encoding in UTF-8 (No GOOD)", but that’s the standard thing of the notepad++ or it’s really the encoding of the file ?
– axell-brendow
@Victor and also you want me to open what on Notepad++ ? Javac.sublime-build ? If it’s him, what I said above is right !!
– axell-brendow
There is no algorithm that precisely determines the encoding of the file (the reason is that imagine an empty file or with only a single letter 'a', how do you know if this is ASCII or UTF-8?). What these programs do is try to verify which encoding makes the most sense.
– Victor Stafusa
I don’t think Javac.sublime-build is the answer. Well friend, I’m sorry, but I have no idea how I can help you. Keep my +1 on your question, and good luck. If I have any ideas, I’ll come back here. :)
– Victor Stafusa
Blz, Thank you (:
– axell-brendow