0

Assignment requires that I use non-ASCII characters when naming main class:

public class SõnadeAnalüüs { public static void main(String[] args) {

//code

I use IntelliJ. When trying to run I get Error: Could not find or load main class SonadeAnaluus Caused by: java.lang.ClassNotFoundException: SonadeAnaluus.

If I replace ä and ü with a/u, everything works.

I have changed encoding to UTF-8 in every possible place.

Is there anything else I can try?

EDIT: How I use IntelliJ: 1. Start new Java Class, write code, run it using Run MyClass.main() (Ctrl+Shift+F10). Like I said, when not using umlauts, everything works.

EDIT2: I am quite new to programming and this community, so I apologize in advance if I do something wrong.

Thank you

11
  • Have you tried not doing that? I mean why not use ASCII. Commented Mar 5, 2019 at 20:54
  • 2
    Is the file name on disk binary identical to the class name? Commented Mar 5, 2019 at 20:56
  • This question might address the same issue. Commented Mar 5, 2019 at 20:59
  • It seems like a command-line/launcher issue. IntelliJ users might know right away but everyone should be able to help you if you edit your question with more details about how you are starting the program. Commented Mar 6, 2019 at 1:42
  • 1
    Please see blogs.jetbrains.com/idea/2013/03/…. Try adding -Dfile.encoding=UTF8 in Help | Edit Custom VM Options and in Compiler VM options in IntelliJ IDEA. Restart, rebuild. If the issue persists, please share the Minimal, Complete, and Verifiable example. Commented Mar 6, 2019 at 1:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.