5

Does anybody recognize this problem?

I upgraded my Mac from OSX 10.7 to 10.9. Now eclipse is suddenly complaining that several of my projects cannot find AppleScriptEngine.jar, which is supposed to be in my java extensions folder. I never heard of this jar file and never do anything with apple script. Also, I cannot even find much on this jar file on the net.

I am running Eclipse Kepler and jdk 1.7.55

Roman C
  • 49,761
  • 33
  • 66
  • 176
gcr
  • 61
  • 1
  • 2
  • This is a different IDE, but similar issue (Java issue after 10.9 upgrade) so it might provide some useful information: http://stackoverflow.com/questions/20075717/having-issues-with-android-studio-project-after-os-x-10-9-upgrade-error-with-ca, Specifically, "The problem seems to be a bad install of Java 1.6. When you upgrade to Mavericks, you normally have to reinstall Java 1.6 as it's not bundled with the OS as it was in previous OS X releases." (replace with your Java version) – Brandon Buck Apr 16 '14 at 16:53

6 Answers6

2

I come up with the same problem when I upgrade to El Capitan and Eclipse says "The container 'JRE System Library [JavaSE-1.7]' references non existing library '/System/Library/Java/Extensions/AppleScriptEngine.jar'".

And I fix it by simply following the steps here.

xxx_di
  • 31
  • 3
  • 1
    Can you include the steps in the answer itself? In case the link expires this answer would be of no value. – mbaxi Dec 14 '15 at 07:05
1

Mavericks doesn't come with Java 6 installed by default. Try opening terminal and running java -version. If Java 6 isn't installed, you should be given the option to install it.

If that doesn't work or you are still seeing that error, try installing this Java package (http://support.apple.com/kb/DL1572) and then reinstall Eclipse.

Roman C
  • 49,761
  • 33
  • 66
  • 176
JAL
  • 41,701
  • 23
  • 172
  • 300
  • @RomanC how exactly does this link not help? Did you even visit the link? It takes you to the Mac Java installer. – JAL Oct 26 '15 at 13:20
1

Faced similar issue, just go to Eclipse Menu -> Preferences -> Java -> Installed JREs.. and select one of the installed JRE's. For me I selected the Java8.

If no JRE is listed there, you can download and add the the JRE. But you should always find pre-existing JREs since they are not deleted as part of OSX upgrade.

0

I followed two steps to fix this.

1) edit the file /Users/path_to_eclipse/Eclipse.app/Contents/Info.plist

Make sure that the uncommented lines that look like this point to a correct jvm install.

<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>

Remove any uncommented lines that point to random locations.

On my machine OSX 10.9.2 + JDK 1.7 u55 it points to

/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home

2) Make sure that the file

/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Info.plist

has the jvm capabilities set as

<key>JVMCapabilities</key>
            <array>
                    <string>JNI</string>
                    <string>BundledApp</string>
                    <string>WebStart</string>
                    <string>Applets</string>
                    <string>CommandLine</string>
            </array>

Hope this helps!

JVXR
  • 1,294
  • 1
  • 11
  • 20
0

It seems that the 1.7 JVM no longer ships with the applescript extension. If you don't need this, it is easy to remove:

  1. Go to Preferences/Java/Installed JREs
  2. Edit the JRE that is giving you the error (probably JDK1.7.0_55 or similar)
    1. Eclipse showed red errors for half a dozen extension in the list for me
  3. Click 'Restore Default' to remove the missing extensions.
  4. Clean your workspace to force recompiling
Quantum7
  • 3,165
  • 3
  • 34
  • 45
0

After a lot of research and multiple other posts in StackOverflow, I found a solution for it:

This happens when you upgrade your Mac OS. In my situation, I have updated from OS X 10.11 El Capitan to MacOS 10.12 Sierra

Steps:

  1. In Eclipse - Open preferences and navigate to Java>Installed JREs
  2. If you’ve added a custom JRE setup (like I did) you’ll receive an error notification that this -> Installed JRE location no longer exists. JRE will be removed... Just click on OK.
  3. Select Execution Environments on the left navigator outline. There you can select the default JRE settings. (I have selected JavaSE-1.8)
  4. Confirm the selection with OK.

If you’re still seeing errors or can’t compile your projects JRE is probably unbound. Remove the library definition from your build path. After that select Add Library and select JRE System Library and then select the workspace default JRE.

Hope this helps.

zx485
  • 28,498
  • 28
  • 50
  • 59
Learner
  • 157
  • 1
  • 4
  • 13