title: Correct Info.plist settings to launch Java app in specific JVM
body: <p>I have a serious Problem while migrating a macos App from Java 6 to Java 8.
  Since it is deployed on mac, the program was using <code>com.apple.eawt.ApplicationAdapter</code> which is deprecated and replaced by <code>com.apple.eawt.XYHandler</code>.</p>
  
  <p>So far so good, I can launch my application from within Eclipse (which has the compiler compliance level set to 1.8, the JRE is set to Java SE 8).</p>
  
  <p>I have then a script which calls javac, puts the compiled jars into an .app bundle, writes an Info.plist and so on. The <code>Java JVMVersion</code> is set to <code>1.8+</code> .This also works, so far.</p>
  
  <p>When I try to launch the app, it tells no suitable version of Java 1.8+ is available</p>
  
  <blockquote>
    <p>[JavaAppLauncher] Requested [1.8+], launching in [(null)] instead.</p>
    
    <p>[JavaAppLauncher Error] unable to find a version of Java to launch</p>
  </blockquote>
  
  <p>I tried all possible options for the JVMVersion (1.8*, 1.8.0_181, 1.7+, 1.6+) and the last one is the only one which starts. Of course later it crashes 'cause Java6 doesn't implement the <code>XYHandler</code>but the <code>ApplicationAdapter</code>.</p>
  
  <p>If I launch the main class from command line it starts but it crashes afterwards because of this:</p>
  
  <blockquote>
    <p>dyld: Symbol not found: _CTFontCopyDefaultCascadeListForLanguages
      Referenced from: 
    /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/lib/libawt_lwawt.dylib Expected in: 
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices</p>
  </blockquote>
  
  <p>Which is weird, since my research on the topic tells that  _CTFontCopyDefaultCascadeListForLanguages should be available in Java8.</p>
  
  <p>By the way, the result of java -version is</p>
  
  <blockquote>
    <p>java version "1.8.0_181"</p>
    
    <p>Java(TM) SE Runtime Environment (build 1.8.0_181-b13)</p>
    
    <p>Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)</p>
  </blockquote>
  
  <p>and following jdks are installed</p>
  
  <blockquote>
    <p>1.8.0_181, x86_64:    "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home</p>
    
    <p>1.8.0_60, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home</p>
    
    <p>1.7.0_80, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home</p>
    
    <p>1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home</p>
    
    <p>1.6.0_65-b14-468, i386:   "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home</p>
  </blockquote>
  
  <p>So I guess the problem is in the way how the OS launches the app. What am I doing wrong?</p>