How to install JDK 1.5 in Lion?
I need it to compile Android 2.2. I followed the instruction mentioned in this site, but still couldn't get it to show on Java Preferences.
installing jdk 1.5
I made small script that can automate the install without requiring you to install any other software. This jdk install part of the script is based on works from this blog: http://www.s-seven.net/zend_5x_lion
Download the leopard java5 update : http://support.apple.com/kb/DL1359
In the same folder download the script : https://gist.github.com/1163008
In a terminal make it executable : chmod +x the_script.sh
Run the script as root (using sudo) : sudo the_script.sh
If everything ran without a hitch the Java preference window should list the java 5 runtime
Original instructions in french (there's a translation button) : http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
EDIT : The script has been updated to work on Mountain Lion as well. The script can download the Java 5 update too.
Related
I download android open source project from Here
After downloaded, I used this command to clean UP etc...
$ make clobber
Then i got this problem
build/core/main.mk:42: ********************************************************************************
build/core/main.mk:43: * You are using version 4.1 of make.
build/core/main.mk:44: * Android can only be built by version 3.81.
build/core/main.mk:45: * see http://source.android.com/source/download.html
build/core/main.mk:46: ********************************************************************************
I got make 4.1 default from android open source project
I'm using ubuntu 18.04 LTS
Excepted solution
How to downgrade 4.1 to 3.81
I can't able to install 1.6 JDK
I know that hell of dependencies to build AOSP, I live on Arch Linux and working build may fail after a system update.
So now I'm using docker image with all deps preinstalled, without a need to upgrade system there, keeping my desktop Arch Linux independent.
Just some results after googling:
https://github.com/stucki/docker-lineageos (I used this one, but the next one may be a better choice)
https://github.com/jfloff/docker-lineageos
https://hub.docker.com/r/anthodingo/docker-lineageos/
Also you may be interested to know that there's a Linux distro dedicated to AOSP development: http://bbqlinux.org/
As in the requirement say you should use
Just download it from gnu.org. Here are the requirements for building AOSP
For your JDK you should run this:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
Don't forget to uninstall everything JDK, Make before you install the new ones.
I'm trying to install Android Studio IDE on multiple Windows and I'm having some problems with the parameters.
Since our deployment environment doesn't support the type of packages android studio uses, I did a simple batch file to install Android Studio silently:
cmd /c start /wait android-studio-bundle-141.1903250-windows.exe /NCRC /S /D=C:\Android\android-studio\1.41
Unfortunately, although the silent install works, the /D switch doesn't look like it's working and it installs itself by default in program files.
I was able to reproduce your results with the latest version of the installer. So I have reported it
I'm trying to build different version AOSP and android in ubuntu 14.04. However, I need to switch between different versions of OpenJDK and JAVA SE JDK.
I know I can use update-alternative to deal with different installation. But, JAVA SE JDK doesn't appear in update-alternative. It's just the contents of a tar ball.
Could anyone suggest a better to deal with different tools for building different targets?
By default when you build AOSP it will use your JAVA_HOME which is really frustrating when they are stuck on 1.6 and everyone else is using 1.7.
AOSP will look for an environment variable ANDROID_JAVA_HOME before it builds, so you can set this prior to building and have it point at a different location. This doesn't seem to work on all versions of Android, it definitely does not work on my Marshmallow build, but if it does work it might be more convenient for you.
Go and manually pick up the version of java you need from Oracle, and then find some convenient way to call export JAVA_HOME=/path/to/java/ . I always use 1.6 because I am not building master yet so I just put it into my .bashrc, but you could just put it in a build script.
You can add your JDK installation into update-alternative manually.
How you can achieve that:
download JDK you need, e.g. jdk-6u45-linux-x64.bin
extract it; for example, chmod +x jdk-6u45-linux-x64.bin && ./jdk-6u45-linux-x64.bin
move it in the place you want; personally I prefer /opt, so sudo mv jdk1.6.0_45 /opt
you can skip this step, but I'd recommend using symbolic links sudo ln -fs /opt/jdk1.6.0_45 /opt/jdk1.6
add manually this version sudo update-alternatives --install /usr/bin/java java /opt/jdk1.6/bin/java 1
Note: I'm using symbolic links there.
Then you can always change current JDK with
sudo update-alternatives --config java.
And then you can check current version of Java being used in the system.
>java - version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
More information you can find in manual page of update-alternatives.
I had the same issue to switch between JDK version which is not coming in update-alternative. I already had JDK 7 and I want to switch to KDK 6. I had downloaded JDK 6 as .bin and installed. But it is not shown in update-alternative. At last I found the solution which is worked for me.
I installed update-java-0.5b which will open GUI which is useful to switch between JDK version.
wget http://webupd8.googlecode.com/files/update-java-0.5b
chmod +x update-java-0.5b
sudo ./update-java-0.5b
Hope it will help!!
I am running openSUSE 12.2 64-bit trying to compile an app in Necessitas alpha 4.1. It's a basic app and the code is likely not the issue. Through the course of tracing the issue I made sure to have all dependencies and tools.jar, which can apparently cause similar errors. When compiling I get:
Packaging Error: Command '/usr/bin/ant clean debug' failed.Exit code: 1
File not found:
No file is actually listed. I copy/pasted this line from Projects->Build Steps->qmake:
/home/mark/Software/necessitas/Android/Qt/482/armeabi-v7a/bin/qmake /home/mark/Dev/qt/myProject/myProject.pro -r -spec android-g++ CONFIG+=debug CONFIG+=declarative_debug
Then I pasted in a terminal window and the result is:
sh: /home/mark/necessitas/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: No such file or directory
This is obviously incorrect as my path is ~/Software/necessitas not ~/necessitas. I have checked through every tab of Tools->Options but see nowhere that references the incorrect folder. Any clue where this is supposed to go?
I had this exact error last night. However I noticed that the Google documentation specifically said java-6-openjdk. So I installed the older JDK using synaptic and then ran:
sudo update-alternatives --config java
I selected the version 6 and re-ran the process. Which completed successfully.
(To be fair I was using Qt 5.1 beta 1 and freshly downloaded NDK and SDK's, ant was 1.8.1 from the repositories)
Were you able to resolve your problem in the mean time ?
This has to do with the Java environment variables, more precisely with JAVA_HOME.
Did you install OpenJDK right before you tried to launch your app ?
I am not certain where OpenJDK installs in OpenSUSE, but on my ArchLinux the variable had to be set to :
JAVA_HOME=/usr/lib/jvm/java-7-openjdk
in order for QtCreator to compile the project properly.
In my case, I had Oracle's JDK installed, so right after installing OpenJDK, loging out and reloging updated my environment variables as wished.
There is also a similar post to yours:
How to build my HelloWorld Android application with Necessitas (qt port)?
And you'll find a good necessitas starter video here :
http://youtu.be/suPeZ7XC1xk
When I try to install the android SDK it fails to install.
My OS is Windows XP
I just downloaded and installed Java JDK 1.6
Java -version from the command line returns:
https://stackoverflow.com/questions/ask
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
My environment vars have:
JAVA_HOME=c:\progra~1\java\jdk1.6.0_11
I downloaded android-sdk-r04-windows.zip
I unziped it in V:\AndroidInstall\
When I go to the
V:\androindinstall\android-sdk-windows>
and type "SDK Install.exe" nothing happens...
If I go this from graph
When I do this from a graphical file viewer I get a quick flash that looks like a command line window and nothing....
When I try to run
android list targets
from the tool directory I get:
Error: Error parsing the sdk.
Error: V:\androindinstall\android-sdk-windows\platforms is missing.
Error: Unable to parse SDK content.
So the basic install setup is not happening.
Additional clues:
I have a G1 and Android 1.0 was running on this machine. (Almost a year ago)
I've updated my G1 to 1.6 so I thought I'd update my SDK before starting new development.
When I tried to upgrade it tried and then died as the "directory was in use"
So I cleaned out all the android directories, rebooted and redownloaded everythign from scratch.
Now it won't run at all.
I've clearly got something in an unhappy state, but I've cleaned up all the directories and no remanants seem to be running I've rebooted....
I've missed somethign I just can't figure out what.
Paul
You should manually create 2 more directories under your root sdk dir 'android-sdk-windows':
platforms
add-ons
and than start SDK Setup.exe from the root directory or try to open it from Eclipse
'Window' -> 'Android SDK and AVD manager'
Run the SDK setup
Wait for the error message
Disable anti virus
Install this unlocker program http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
Run the unlocker program
select the tools directory to unlock it
select yes in the installer.
This is what worked for me.
http://code.google.com/p/android/issues/detail?id=4410#c41
The directories "platforms" and "add-ons" need to be manually installed in the android SDK directory (parallel to "tool"). This is only necessary in a new installation.
I had the same problem, adding the directory add-ons got rid of the error when eclipse is first open but I still couldn't download packages from the sdk manager.
What solved this problem for me (in windows 8) is running eclipse as administrator.
I got this error from my Jenkins CI.
It was because the Jenkins user did not have permissions on the android-sdk-linux folder.
(not the best solution but fixed it with):
sudo chmod -R 777 /usr/bin/android-sdk-linux