0
votes

I have multiple problems with Intellij 12 on my Mac.

  1. If I create a project with in a directroy containg norwegian characters, the IDE is not able to find the project directory and will not even start the compile process

  2. If I have a Java Class with an international character, the compiler throws this out

    13.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain Fårekjøtt Exception in thread "main" java.lang.ClassNotFoundException: F��rekj��tt at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:188) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)

    Process finished with exit code 1

What is the correct way to go about fixing this?

1
Probably not what you want to hear, but the safest approach is not to use java classes with international characters in them.vikingsteve
Well, so much for Domain Drives design then :)Glenn Bech
@vikingsteve I guess this is a typical example of how it is valuable to follow a problem to the end, in stead of just giving up and taking the shortcut. I really want the Java Classes to be in the domain language. Now I can do that.Glenn Bech
Nice one! Glad u figured it out.vikingsteve

1 Answers

0
votes

Mac SDK 1.7_40 has a fix for a known bug causing this problem. If you add the Oracle SDK 1.7_40 to IDEA, it compiles.

From Jetbrains support;

You are trying to compile with Oracle JDK 1.7 on Mac which has known problems with encoding on this system. Please use the default Apple JDK to avoid this problem or convert your files to UTF-8. I've verified that compilation with Apple JDK 1.6 works without problems: https://www.dropbox.com/s/4rga4d0zphksvvd/Screenshot%202013-10-04%2020.20.44.png . Don't forget to remove the invalid -encoding option that you have added to Preferences | Compiler. If using JDK 1.6 is not an option, you can also try JDK 1.7.0_40 version from Oracle which may (or may not) have a fix for this problem.