Return to site

Jvm For Mac Yosemite

broken image


I am unable to start my Android Studio for Android development on Mac OS (10.10.1 – Yosemite)

A free upgrade every Mac user should download. From new Continuity features to smaller, useful tweaks across core apps, Mac OS X Yosemite is a must download for Mac users.

Answers:

Open the application package for Android Studio in finder, and edit the Info.plist file. Change the key JVMversion. Put 1.6+ instead of 1.6*. That worked for me!.

Cheers!

Edited:

While this was necessary in older versions of Android Studio, this is no longer recommended. See the official statement

'Please note: Do not edit Info.plist to pick a different version. That will break not only the application signature, but also future patch updates to your installation.'

Antonio Jose's answer is the correct one.

Thanks aried3r!

Answers:

Just install this guy here

and you should be good.

Answers:
[Update] This is fixed in Android Studio 1.1
https://issuetracker.google.com/issues/37015035

In the next version of Android Studio, if no java 6 is found but 7 (or greater) is found then it will use that instead. We still recommend running studio with Java 6 due to improved font rendering, but there is no work around needed if, for example, only java 8 is found.

[End Update]

From Android Studio 1.0 RC3 Notes

As of RC 3, we have a better mechanism for customizing properties for the launchers on all three platforms. You should not edit any files in the IDE installation directory. Instead, you can customize the attributes by creating your own .properties or .vmoptions files in the following directories. (This has been possible on some platforms before, but it required you to copy and change the entire contents of the files. With the latest changes these properties are now additive instead such that you can set just the attributes you care about, and the rest will use the defaults from the IDE installation).

However there is no explanation about what options are.

After searching a little I found this
Adjusting VM Options for Android Studio on Mac
IntelliJ IDEA 14.0.0 Web Help/File IDEA.Properties

However no luck with that.

Fortunately I was able to resolve it on Yosemite using environment variables as said in the 1.0 RC3 Release Notes.

You can also place use environment variables to point to specific override files elsewhere:
STUDIO_VM_OPTIONS, which vmoptions file to use
STUDIO_PROPERTIES, which property file to use
STUDIO_JDK, which JDK to run studio with

This was a little tricky because Android Studio is not a command line application so I had to use a AppleScript command to set the environment variable when login. More info here

This is my launchctl command for the command line.

And this my AppleScript (remember to save it as an Application)

About launchctl, see here

Answers:

Note that this last variable allows you to for example run Android Studio with Java 7 on OSX (which normally picks Java 6 from the version specified in Info.plist):

$ export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk

$ open /Applications/Android Studio.app

Worked for me

Answers:

Change this key in the Info.plist

I changed from

to

and it worked fine now.

Edited:
Per the official statement as mentioned above by hasternet and aried3r, the solution by Antonio Jose is correct.

Thanks!

Answers:

As a novice user it took me a while to understand how to fix this in a correct way. After searching and understating many answers on SO I came out with the Following steps that you need to follow to fix the issue.

Please Note:

Although the simplest solution is to update the Info.plist of android studio . But it is not recommended and not the correct way to fix it .

Official statement- 'Please note: Do not edit Info.plist to pick a different version. That will break not only the application signature, but also future patch updates to your installation.'

First Solution : If you run your Android Studio from command line, you can add these two lines into your .bash_profile

From next time whenever you open your terminal your studio will start automatically.

Second Solution: If you want to run Android Studio from UI(by click on Icon) follow below steps:

  1. Open script editor on mac(one can find it in spotlight)
  2. Copy past the below line

    do shell script 'launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk'

Note :- Change the jdk version according to your version. To check which version you are using open terminal and run the following command

3.Now save (⌘+s) as File format: Application. Finally open System Settings → Users & Groups → Login Items and add your new application that you have just created.

  1. Log-off and login again or you can run that application manually as well.

woolaaaa…Its done.

References :

Answers:

I am using Mac OS X 10.10 also. And to fix this problem.

Jvm For Mac Yosemite Download

  1. Open Android Studio application package content (by right click on Android Studio icon in Application folder)
  2. Open file Infor.plist
  3. Search and replace:

replaced by:

That's it!

Answers:

On Mac OS X Yosemite just install:

Java SE Development Kit 8

and

Java Version 8 Update 25

It's all, work for me!

Answers:
  1. Install newest JDK (8u102 current)
  2. Set envirionment variable STUDIO_JDK (java_home outputs the Java home dir and sed strips two folders to get the jdk dir)

    launchctl setenv STUDIO_JDK `/usr/libexec/java_home -version 1.8 | sed 's//Contents/Home//g'`

  3. Launch Android Studio like you would normally

Set STUDIO_JDK on every reboot

The above steps only works for the current session. Here is how to create a plist file in /Library/LaunchDaemons that runs the above command on every boot:

Found out about the plist trick thanks to http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-mac-os-x-launchd-plist/

Answers:

On Android Tools Project Site, there is a great explanation Mac OSX JDK Selection. It fixed my problem. In summary:

Android Studio requires two different JDKs:

  • The version of Java that the IDE itself runs with.
  • The version of the JDK that it uses to get the Java compiler from

These two can be (and usually are) the same, but you can configure
them individually. And on OSX in particular, they will often be
different.

and for Yosemite (Mac OSX 10.10) Issues:

First, please make sure that you have the latest version of Java 6
installed; in some cases that has fixed the problems:
http://support.apple.com/kb/DL1572

If not, try running a recent version of Java 7 or Java 8 instead by
setting STUDIO_JDK as described above. That is reported to have fixed
the other problems (though you will get the font rendering shown for
Java 8 above.)

Answers:

Java was uninstalled when I updated to OS X El Capitan.

See screenshot of terminal before and after I reinstalled Java.

To reinstall Java I followed this link that was provided in the Android Studio dialog box.

Android Studio ran again after the Java installation was reinstalled.

Answers:

Edit the android studio's Info.plist file in the package so that it uses 1.7 or whatever JVMVersion you have installed. Changing the JVMVersion to 1.6+ instead of 1.6* as hasternet answered above should work too.

The above works but is not recommended see RC3 Release Notes

As of RC 3, we have a better mechanism for customizing properties for
the launchers on all three platforms. You should not edit any files in
the IDE installation directory
. Instead, you can customize the
attributes by creating your own .properties or .vmoptions files in the
following directories. (This has been possible on some platforms
before, but it required you to copy and change the entire contents of
the files. With the latest changes these properties are now additive
instead such that you can set just the attributes you care about, and
the rest will use the defaults from the IDE installation).

see Android Studio failed to load JVM on Mac OSX (Mavericks)

Answers:

I have same problem and fixed with this way:

You should install Java from Official Apple page.

Answers:

This one work for me, very simple, just export the environmentable var. but make sure u have the valid JVM first though.

Answers:

On Mac OS X Yosemite just install:

Java SE Development Kit 8

and

Java Version 8 Update 25

It's all, work for me too! like gehev said , so simple !

Answers:

You can implement the STUDIO_JDK solution using your user's launch agents. This involves creating one plist file in your LaunchAgents directory, located at ~/Library/LaunchAgents

Create a new file, ~/Library/LaunchAgents/UNIQUE_KEY.plist, where UNIQUE_KEY is just an identifier. I use com.username.androidstudio.

Copy the following text into your new plist file and modify it according the instructions below.

You will need to make two modifications:

  1. Change UNIQUE_KEY to match your filename (without the .plist extension).
  2. Verify your JDK path is correct and change if necessary. I'm using 7u71 in this example.

This is the same underlying solution as Antonio Jose's answer. It sets the STUDIO_JDK environment variable based on the Android Studio version 1.0 RC3 release notes. This solution uses the LaunchAgents directory rather than AppleScript to set the environment variable. As such it is mostly a difference in how your order and organize your system and environment variables.

Answers:

Do not edit the plist. These instructions worked for me the first time I installed Android Studio a few months ago as well as just today. (1/21/2015)

All you need to do is a few simple things, although they aren't really listed on Google's website.

  1. First you need Java installed. this is not the JDK, it is seperate. You can get that from this link. If you don't have this it will probably throw an error saying something like 'no JVM installed.'
  2. Second you need the Java JDK, I got JDK 7 from this link. Make sure to choose the Mac OS X link under the Java SE Development Kit 7u75 heading. If you don't have this it will probably throw an error saying something like 'no JDK installed.'
  3. If you haven't already installed Android Studio, do that. But I'm sure you've already done that by now.
Answers:

As @Gerard suggested, I summerise my original comment (https://stackoverflow.com/a/27370525/763459) as an Answer, hope it can help others who are annoyed by this issue.

There's a way without running the AppleScript:
edit .bash_profile (if this file doesn't exist, please create a new one , as @Gerard suggested, you can to use source .bash_profile for the first time).

  • Install the legacy Java (may be neccessary) http://support.apple.com/kb/DL1572

  • Put export STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk

  • Then quit terminal (or any text editors you're using to edit this file), run the Android Studio and viola

Tested with OSX 10.10 and Android 1.0.1

Answers:

Android Studio will read settings from the file ~/Library/Preferences/AndroidStudio/idea.properties. I created this file and in it have the path to my jdk :

STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk

No editing of the Info.plist necessary!

Answers:

'On Mac OS, run Android Studio with Java Runtime Environment (JRE) 6 for optimized font rendering. You can then configure your project to use Java Development Kit (JDK) 6 or JDK 7.'

This was listed in http://developer.android.com/sdk/index.html under the system requirements for Mac OS X.

Once you install Java 6 (not the JDK) from Apple as per Alonso C. Licks, you should be able to open Android Studio and reconfigure as you wish without having to mess around in the terminal, info.plist file, or other libraries.

Answers:

I have downloaded Intellij Idea. When I try to install Intellij, a pop-up appeared that my Mac is missing with Java RE, do you want to download it? After I downloaded missing package using Intellij, I could open Android Studio.

Answers:

I resolved this issue by changing the JVM version in the Info.plist file to 1.7*

Answers:
Questions:

i'm dealing with the same problem and i get it worked.

it is probably that your jdk version is not right.

now i installed jdk1.8 and it is ok now.

Answers:

For those who were having trouble creating a script that launched on startup, as an alternative you can add this .plist to your LaunchAgents folder. This may be a more appropriate way of adding environment variables to the system since Yosemite decided to do away with launchd.conf. This should also work across user accounts due to the nature of the LaunchAgents folder, but I haven't tested that.

To do this, create a .plist file with the following name and path:

and the contents:

Then change file properties by running the following commands in Terminal:

Jvm For Mac Yosemite 10

Notes:

Jvm For Mac Yosemite National Park

1) You may need to change ‘jdk1.8.0_25.jdk' to match the version that you have on your computer.

2) I tried to use 'jdk1.8.*.jdk' to try and account for varying Java * versions, but when I opened Android Studio I got the no JVM error even though if you run 'echo $STUDIO_JDK' it returns the correct path. Perhaps someone has some insight as to how to fix that issue.

Answers:

Try downloading the Java from Apple Support Page: http://support.apple.com/kb/DL1572 if that doesn't work for you or fails to load (very common issue), just follow this link to download and install the Java version you need:

That's it.

Answers:

I had previously uninstall Java 6 and install Java 7, Android Studio was working okay, then I upgraded Android Studio and I had the issue everyone is having. Today, I uninstalled Java 7 and installed Java 8 from Oracle. Then I uninstall Android Studio and installed the latest. Everything is working for me now

Answers:

I was able to get it to work by editing the info.plist changing 16* to 16+. Tried using the recommended method but that failed.

Tags: android

Because programmers can't get enough caffeine

  • Which Java You Got?
  • Different Javas
  • Install Jenv to manage multiple Versions of Java
  • Update Java

There are several ways to install Java.This is a deep dive into the various editions to equip you to debug JVM installation issues.

Which Java You Got?

  1. Open a Terminal session.

  2. Shell scripts check if Java is available by:

    Alternately, the older form is:

    Either way, the response:

    PROTIP: File 'java' in the above path is a binary file.

  3. To see what Java VM you have already installed:

    PROTIP: -version is a non-standard parameter. Most other programs use either the -v flag or two-dash --version with the longer-form parameter name.

    A sample response:

  4. List which versions are installed on your machine:

    PROTIP: On Macs, all known JVM's are located at:
    /Library/Java/JavaVirtualMachines/

    NOTE: This directory is at the root for the whole machine, not a particular user's home folder.

    The response on my machine:

  5. PROTIP: The Java program looks for the $JAVA_HOME environment variable to obtain files:

    echo $JAVA_HOME

    Sample response:

    PROTIP: This command is my preferred way to see what a machine has becauseif you invoke java or javac, if it's not installed, MacOS prompts you to install the JDK. Clever. But don't do it if you want other version of Java.

    May 23, 2020  Open the App Store. Click the App Store search bar. Type in iZip, then tap Search. Enter your Apple ID password or Touch ID. Open your RAR file. IPhones don't have file managers, and thus, your RAR file will be in an email or app or a cloud storage app. You need to open the app in which the RAR file is stored and click on it. Jan 09, 2019  RAR Extractor Lite is a small size and simple app for opening RAR Files. It is compatible on all Mac computers with OS X 10.7 or later. With help of RAR Extractor Lite App, you can open RAR, ZIP, TAR, GZ, BZ2 and 7Z files. It also supports batch extracting operation. It means you can extract multiple RAR Files at a time. Jun 22, 2018  Rar Password Unlocker for Mac OS X. Not everyone using Windows computer, someone also using the Mac. This section is dedicated to Mac users only. Recovering the WinRar file's password from Mac is easy to process because of their best utilities. There are many invalid password unlocker available on App store but cRARK is the working program. Best rar app for macos. Jul 04, 2020  Things 3 is a brilliant MacOS to-do list and task management app. Thanks to a full redesign, Things is more useful than ever, connecting to your tasks and Calendar in a seamless interface.

    Java is used by Groovy, Grails, Spring Boot, and others.

  6. PROTIP: Developers use the JDK rather than the JRE (Runtime Environment) in order to get the javac compiler. See what version of the Java Compiler is installed:

    A sample response:

  7. Additional details are provided with this command:

    That's a capital -V.

    The response on my machine:

    Alternately:

    Apple Java

    PROTIP: The version that comes installed on Apple Macs is obsolete and thus does not have the latest security patches. But do NOT delete the default version.

    But if you did uninstall it, to re-install Java 6 for OS X 2014-001,it can be obtained fromhttps://support.apple.com/kb/DL1572?locale=en_US https://ixsumpimi1975.mystrikingly.com/blog/scan-network-for-devices-macos.

    Different Javas

    https://en.wikipedia.org/wiki/List_of_Java_virtual_machines lists all the known Java compilers.Several organizations work on OpenSDK specs from AdoptOpenJDK and certified for Java SE TCK compliance on x64 reference architecture systems

    • When Oracle acquired Sun, the jdk (Java Development Kit) was one of the products obtained. Versions are downloaded directly from Oracle from http://jdk.java.net.

    • https://adoptopenjdk.net/ has both 8, 11, and 13 running the tradition 'HotSpot' JVM and the more recent and faster 'OpenJ9' JVM. To install the latest (v13):

    • Azul Zuludownloads for macOS, from a company that also sells Java optimization products. Its zulu8.30.0.1-jdk8.0.172-macosx_x64 from zip April 18, 2018 is 179.2 MB expanded
    • IBM OpenJDK with Eclipse OpenJ9

    Latest Version of Oracle Java

  8. PROTIP: Hold off downloading the java .dmg installer fileas described athttps://java.com/en/download/help/mac_install.xml

    WARNING: Oracle installs an annoying Ask Toolbar, without asking.

    Oracles docs on installing the JDK:
    https://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html

  9. Use an internet browser to
    http://www.oracle.com/technetwork/java/javase/downloads/index.html

  10. Click the 'Download' button for the JDK (not the JRE).

    NOTE: Downloads of the JDK contains the JRE.

Install Jenv to manage multiple Versions of Java

PROTIP: If you're a developer, you'll likely need to manage different versions of Java needed by different apps. Much like NPM for Node and rbenv for Ruby.

http://hanxue-it.blogspot.com/2014/05/installing-java-8-managing-multiple.html?q=java
describes the steps.

  1. Install Jenv by specifying the location URL: https://raw.githubusercontent.com/entrypass/jenv/homebrew/homebrew/jenv.rb

    brew install jenv

    The response:

  2. To see if jenv can run, list its version and commands:

    jenv

    The response is like this (at time of writing Oct 15, 2018):

  3. See where it was installed:

    which jenv

    My response:

    Bus routes for el capitan high school merced ca. The Merced Union High School District Board of Trustees prohibits unlawful discrimination, harassment, intimidation or bullying against any protected group as identified under Education Code 200 and 220 and Government Code 11135, including actual or perceived sex, sexual orientation, immigration status, gender, ethnic group identification, race or ethnicity, ancestry, national origin.

    NOTE: The file jenv is a binary executable.

  4. Use Homebrew's directories rather than ~/.jenv add to the bottom of your bash_profile file:

    export JENV_ROOT=/usr/local/var/jenv

  5. To enable shims and autocompletion add to the botton of your bash_profile file:

    Jenv for several Java versions

  6. Get info:

    Sample response:

  7. List installers available for use by jenv:

    The response:

    If you don't see any, you need to first download a JVM installer containing folders bin, lib, jre, include, bundle, db, man.

    The path to a particular version is constructed by adding '/Contents/Home' to the end of the path.

  8. The point of jenv is to add additional versions, such as back version JDK 7.

    The response:

  9. Add JDK 8:

    http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u162-macosx-x64.dmg

    https://ixsumpimi1975.mystrikingly.com/blog/is-quickbooks-for-mac-2015-compatible-with-mojave. Go to on Intuit's site. This is much simpler if you're already in Sierra. If the version of QuickBooks showing isn't QB 2015 for Mac, click the Change button and select it.Click the Download button.

    The response:

    The above provide a handle for jenv provide other apps to use.

  10. List the Java versions jenv knows about:

    jenv versions

    The response if none if brew cask was not installed:

  11. To configure global version for all apps to use:

    Example response:

Jvm For Mac Yosemite National Park

Open JDK

Mac Yosemite Torrent

Open JDK is the open-sourced implementation of the JRE spec, athttp://openjdk.java.net

But some say it is not ready for 'prime time' on MacOS because its installation is a dirty affair from 2013 when going from v6 to v7:

  • https://wiki.openjdk.java.net/display/MacOSXPort/Mac+OS+X+Port+Project+Status

Jvm For Mac Yosemite 2017

Open JDK's install page at http://openjdk.java.net/install/shows apt-get (for Debian, Ubuntu) andyum (for Red Hat, CentOS, Oracle Linus, Fedora).

  • http://blog.shelan.org/2015/03/how-to-build-open-jdk-9-on-mac-osx.htmlon Yosemite

  • http://hanxue-it.blogspot.com/2014/05/installing-java-8-managing-multiple.html

For macOS, this page recommends using Make to compile from source.

  1. Download source using Mercurial to a new folder 'openjdk9':

    hg clone http://hg.openjdk.java.net/jdk9/jdk9 openjdk9cd ./openjdk9

    Note JDK 9 is under active development.

    http://hg.openjdk.java.net/jdk8/jdk8 work stopped at 2014-03-04.

  2. Install XQuartz for X Window System that runs on Macs:

    brew install Caskroom/cask/xquartz
    brew cask list

    NOTE: Downloaded /Library/Caches/Homebrew/xquartz-2.7.9.dmg was 7.9K

    xquartz staged at ‘/opt/homebrew-cask/Caskroom/xquartz/2.7.9' (73M)

  3. cd to the .tar.gz directory containing the configure file for Make to use.
  4. XQuartz fixes an error in this command:

    bash ./configure

  5. Install apple-gcc42 the Apple C compiler.

    Mihail recommends:

  6. Install ccache (compiler cache):

    brew install ccache

  7. Make a symlink /usr/bin/gcc -> /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 (same for g++)

Test JDK Build

https://mihail.stoynov.com/2015/01/29/building-openjdk-9-on-a-osx-or-any-linux/ shows JDK 9 install using ccache, mercurial (hg), jtreg 'testing harness', and Webrev to diff code

Jvm for mac yosemite download

Update Java

https://java.com/en/download/help/mac_java_update.xml

NOTE: Others include cheatsheet, google-chrome, google-drive, google-hangouts, dropbox, etc.listed in Sourabh Bajaj's venerableMac OSX Setup Guide, developed and distributed as aGitBook.

Maven (mvn)

  1. Install using Homebrew:

  2. See its metadata and what java version Maven is based on:

    If it's installed, the sample response:

    PROTIP: Many have switched to using Gradle instead of Maven or Ant.

Mac Yosemite Review

Kotlin

Kotlin is a language that makes use of the JVM.Invented by JetBrains (IntelliJ).

Social

Top Java Blogs/bloggers to follow on Twitter:

More on macOS

This is one of a series about macOS (previously Mac OSX):

Please enable JavaScript to view the comments powered by Disqus.function google_search(){ window.location = 'http://www.google.com/search?q=site:+' + encodeURIComponent(document.getElementById('q').value);}



broken image