[Q] java jre/jdk 1.5 on ubuntu 11.04 - Android

ok guys i have a little issue lol i've spent the last 2 days trying to build a froyo rom from source! I foolowed this guide exactly as it says to do (http://source.android.com/source/initializing.html) and when i get to the part of building the rom and to run 'make j4' (making the code i assume) it says that i do not have the correct version of java, says i have 1.6.0_20 and the correct version is 1.5..... so i spent all night trying to figure out how to get the 1.5 version, so my question is how do i get the correct version of java properly installed so i can finish the build? I have already pulled the rom from source so i have the neccessary files, but ubuntu wont let me build it without the proper java installed lol can someone please help??

First remove the current java - i assume with the command:
sudo apt-get --purge remove sun-java6-jdk
Then get the older java as follows:
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
if you ever want to make a gingerbread ROM then you will have to get the newer java back

Related

Need Help Installing Android SDK in linux

O.k. I've tried the Linux forums ad so now I thought I would try here. I'm trying to install the Android SDK in Linux Mint 11 but I don't have the 32-bit libraries installed. Does anyone know how to install these libraries and the SDK? After that I think I can handle it from there.
Any help would be greatly appreciated.
http://developer.android.com/sdk/installing.html
For your 32-bit libs, see the Troubleshooting section.
I think that linux Mint is a ubuntu derivative, so the info is on here:
http://developer.android.com/sdk/installing.html
http://source.android.com/source/initializing.html
Here's the summary for the command line freaks (assuming that linux mint also uses apt-get/ubuntu packages- I haven't had the pleasure of installing linux mint (yet) so I can't say fo' sho')
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" (natty might work here too)
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk ia32-libs
download the linux sdk and untar - "tar xf android-sdk_...blah...blah...just hit tab for the command line completion....tgz"
Then cd into the android_sdk/tools folder and type "./android update sdk --no-ui"
then kick back and watch the magic happen. It will then download all the images files for every version of android from cupcake to the T2000. It might take a few hours, depending on your download speed.

[Q] sun-java6-jdk Ubuntu 11.10

It appears sun-java6-jdk has been removed from the Canonical repository. I added "http://archive.canonical.com/ lucid partner" to my sources, but the package is not there. Are there any alternative ways to install it?
There are quite plenty of ways actually:
1. Install from some ppa:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
2. Download bin package from oracle site, but that's not ubuntu-way.
3. This one i like the most: create your own packages
http://www.techytalk.info/latest-oracle-sun-java-jdk-and-jre-6-on-ubuntu-operating-systems/
and in any case, don't forget to
Code:
sudo update-alternatives --config java
inflim said:
There are quite plenty of ways actually:
1. Install from some ppa:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
2. Download bin package from oracle site, but that's not ubuntu-way.
3. This one i like the most: create your own packages
http://www.techytalk.info/latest-oracle-sun-java-jdk-and-jre-6-on-ubuntu-operating-systems/
and in any case, don't forget to
Code:
sudo update-alternatives --config java
Click to expand...
Click to collapse
It worked, Thank You!
No problem! Google rules

[Tutorial] Install Sun Java JDK 6 on Ubuntu 12.04 LTS

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Installing Java JDK 6​
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
trevd said:
For good measure we can also install the oracle-java7-jdk using the apt-repository provide by www.webupd8.org
Code:
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main"
sudo apt-get update
sudo apt-get install sun-java5-jdk sun-java6-jdk oracle-java7-installer
Click to expand...
Click to collapse
Test Java: [highlight]java -version[/highlight]
Credits to:
Google
Android Source
trevd
Thx but it dosent work T^T
htchoi5609 said:
Thx but it dosent work T^T
Click to expand...
Click to collapse
I Think this was covered back in may with this [GUIDE] Simple Java6 installation on Precise/Mint-Maya/Ubuntu 12.04 LTS
Nothing against the OP, Credits for attempting the spread the knowledge but that ubuntu help page is just plain doing it wrong when it comes to oracle! :laugh: Unfortunately the entire internet ( yes, I searched it all ) seems to use it as a reference so there's well over 9000 guides that seem to use that script retrieval method. It's simply not required
Just use the google way and pull both jdk-5 and jdk-6 from ubuntu's own archived apt-repos, it's never let me down yet! For good measure we can also install the oracle-java7-jdk using the apt-repository provide by www.webupd8.org
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main"
sudo apt-get update
sudo apt-get install sun-java5-jdk sun-java6-jdk oracle-java7-installer
all the java under the sun ( microsystems ) and 1 under oracle
I'm getting this error when trying to update...
Code:
[email protected]:~$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
[email protected]:~$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
[email protected]:~$
can anyone help please. thanks in advance.
Looks like you've got another program thats locking the access to the sources. this normally you normally get this error if you forget to add sudo. Are you running automatic background updates or have you got a package manager open or the sources dialog?
Might be worth giving it the old "switch it on and off" again routine then try again
Sent from my Nexus 7 using xda premium
jonah1234 said:
I'm getting this error when trying to update...
Code:
[email protected]:~$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
[email protected]:~$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
[email protected]:~$
can anyone help please. thanks in advance.
Click to expand...
Click to collapse
Try these commands:
Code:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
Ok now the sudo apt-get update worked but i'm getting another error...
Code:
[email protected]:~$ sudo apt-get install sun-java6-jdkReading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
[email protected]:~$
jonah1234 said:
Ok now the sudo apt-get update worked but i'm getting another error...
Code:
[email protected]:~$ sudo apt-get install sun-java6-jdkReading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
[email protected]:~$
Click to expand...
Click to collapse
Have you added the repos?
Peteragent5 said:
Have you added the repos?
Click to expand...
Click to collapse
Yessir. It works up until it's time to install.
Sent from my Sense 5 Droid DNA
i think this code doesnt work and we dont need, because this is for ubuntu hardy and lucid, not for precise pangolin.
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
another tutorial,open terminal and type :
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
:good:
flowish said:
i think this code doesnt work and we dont need, because this is for ubuntu hardy and lucid, not for precise pangolin.
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
:good:
Click to expand...
Click to collapse
Nah, Apt doesn't work like that, and using these archive repositories works on any version and any ubuntu based distro, well anywhere you've got apt installed really. although some distro don't come with add-apt-repository which is a python helper script, in which case you can manually add following the lines to /etc/apt/sources.list.
Code:
deb http://old-releases.ubuntu.com/ubuntu hardy main multiverse
deb-src http://old-releases.ubuntu.com/ubuntu hardy main multiverse
deb http://old-releases.ubuntu.com/ubuntu hardy-updates main multiverse
deb-src http://old-releases.ubuntu.com/ubuntu hardy-updates main multiverse
deb http://archive.canonical.com/ lucid partner
deb-src http://archive.canonical.com/ lucid partner
The "version" labels are irrelevant to the installation and are used to help apt resolve the directory on the web server where the Packages list is located, hardy's multiverse one is here http://archive.ubuntu.com/ubuntu/ubuntu/dists/hardy/multiverse/binary-amd64/ for example. this is what "apt-get update" is doing
The reason for all three repository being needed is, java6 in the lucid repository has a dependency on a package found in the hardy repos, the upshot of adding all three is the option of installing java5 as well, just in case you get an urge to build any version of android that is pre gingerbread
All that being said using webupd8team ppa repository is fine. anything beats messing around with some daft installation script and an overly complicated multi-step process which seems to have been a previously banded about as the installation method.
Here's a console dump for both Ubuntu 12.04 and lubuntu 12.10. This is what you should be seeing if everything is working correctly.
Thanks
OMG Thank you SOOO Much!!! I have been searching and searching for something like this! My thanks are given to you!
Thank you so much Peteragent5 and trevd! I spent ages banging my head against the wall with this! Now I can hopefully get on with some fun stuff instead of wasting time setting up my environment.
Well, I always do it manually. In case you want to know:
Go to http://www.oracle.com/technetwork/j...ownloads-javase6-419409.html#jdk-6u45-oth-JPR anddownload the x64 bin file. You need to login to oracle for this.
Once that is done follow the steps:
Code:
chmod a+x jdk-6u45-linux-x64.bin
sudo mkdir /usr/lib/jvm
sudo mv jdk-6u45-linux-x64.bin /usr/lib/jvm/
cd /usr/lib/jvm
sudo ./jdk-6u37-linux-i586.bin
sudo update-alternatives --config java
sudo update-alternatives --config javac
java -version
This usually works. But in case you don't see your version while running
java -version
Just set path in your .bashrc
change archive.ubuntu.com to old-releases.ubuntu.com
jonah1234 said:
Ok now the sudo apt-get update worked but i'm getting another error...
Code:
[email protected]:~$ sudo apt-get install sun-java6-jdkReading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
[email protected]:~$
Click to expand...
Click to collapse
Hi,
Hardy does not exist anymore into archive.ubuntu.com
replace archive.ubuntu.com by old-releases.ubuntu.com
sorry I can paste the code, i have no right at this moment
To prevent spam on the XDA forums, ALL new users prevented from posting outside links in their messages. After approximately 10 posts, you will be able to post outside links. Thank you for understanding!
Click to expand...
Click to collapse
fish83

Problem installing SDK

I've put about 8 hours into this now.
I'm trying to install the Ubuntu Touch SDK as per instructions on this page. http://developer.ubuntu.com/get-started/gomobile/ I'm at step 2, and I'm trying to do the "Create a currency converter phone app. But I don't have the "applications" selection in Qt's new project. What am I missing?
Here's what I did.
Code:
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install ubuntu-sdk notepad-qml
But QTcreator wouldn't start properly. I found out that i needed to also install libbotan* by reading some forums.
Code:
sudo apt-get install libbotan*
So now QTcreator starts and I'm ready to create a new project, but I'm missing the ability to create a new "application> Qt Quick UI" because I don't have the "application" option.
This is a fresh install of 64 bit Ubuntu 12.10 with just my video editing, and java development software added.
AdamOutler said:
I'm trying to install the Ubuntu Touch SDK as per instructions on this page. http://developer.ubuntu.com/get-started/gomobile/ I'm at step 2, and I'm trying to do the "Create a currency converter phone app. But I don't have the "applications" selection in Qt's new project. What am I missing?
Here's what I did.
Code:
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install ubuntu-sdk notepad-qml
But QTcreator wouldn't start properly. I found out that i needed to also install libbotan* by reading some forums.
Code:
sudo apt-get install libbotan*
So now QTcreator starts and I'm ready to create a new project, but I'm missing the ability to create a new "application> Qt Quick UI" because I don't have the "application" option.
This is a fresh install of 64 bit Ubuntu 12.10 with just my video editing, and java development software added.
Click to expand...
Click to collapse
dim319 in this thread
http://forum.xda-developers.com/showthread.php?t=2161369&page=2
figured out how to build c++ programs and posted a link to his tutorial here
https://www.googledrive.com/host/0B5kDhuHYYcvwWDZpS0puZXhnZkk/ubuntu-sdk-dev-en.html
Maybe that will help?
That's not helpful or relevant. I'm trying to set up the SDK properly, not compile an app. That comes way later... I have to BUILD the app first and the options are not showing up to even create a new app properly.
Fixed with
Code:
sudo apt-get remove qtcreator
sudo apt-get purge qtcreator
sudo apt-get install qtcreator
Was having the same problem. Thanks Adam.
Sent from my Galaxy Nexus using Tapatalk 2
AdamOutler said:
Fixed with
Code:
sudo apt-get purge qtcreator
Click to expand...
Click to collapse
Thanks for this Adam... Good info sir...

[Q] Installing Whosthere

I've tried to install Whosthere through ADB by adding the following PPA's to my device:
Code:
sudo apt-add-repository ppa:m-gehre:ppa
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
Then I run: sudo apt-get install whosthere. But I still says the package can't be found. I know the project is discontinued but I should still be able to download it right?
Sources:
https://launchpad.net/whosthere
https://github.com/mgehre/whosthere
EDIT: Do I know to build the packages myself and push them through QTCreator?
Zenety said:
I've tried to install Whosthere through ADB by adding the following PPA's to my device:
Code:
sudo apt-add-repository ppa:m-gehre:ppa
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
Then I run: sudo apt-get install whosthere. But I still says the package can't be found. I know the project is discontinued but I should still be able to download it right?
Sources:
https://launchpad.net/whosthere
https://github.com/mgehre/whosthere
EDIT: Do I know to build the packages myself and push them through QTCreator?
Click to expand...
Click to collapse
I hope we can see improvements soon in this app, really needed!
Zenety said:
I've tried to install Whosthere through ADB by adding the following PPA's to my device:
Code:
sudo apt-add-repository ppa:m-gehre:ppa
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
Then I run: sudo apt-get install whosthere. But I still says the package can't be found. I know the project is discontinued but I should still be able to download it right?
Sources:
https://launchpad.net/whosthere
https://github.com/mgehre/whosthere
EDIT: Do I know to build the packages myself and push them through QTCreator?
Click to expand...
Click to collapse
It looks like the developer has only created packages for Precise, Quantal and Raring. The latest Ubuntu Touch images are using Saucy. You can either 1) manually download and install the Raring .deb files, 2) change "saucy" to "raring" in the add-apt-repository added to /etc/apt/sources.list.d/, or 3) ask the developer to copy the packages in the PPA to Saucy.
I have the same problem installing on Ubuntu Desktop. What can I do?
GuiltMachine said:
I have the same problem installing on Ubuntu Desktop. What can I do?
Click to expand...
Click to collapse
The last time I spoke to the developer, whosthere wasn't working due to changes in WhatsApp's authentication protocol/token/something-or-other, and he wasn't actively developing it anymore. The best thing you can do is to contact WhatsApp yourself and let them know how much you'd like to see an Ubuntu Touch client.
mhall119 said:
The last time I spoke to the developer, whosthere wasn't working due to changes in WhatsApp's authentication protocol/token/something-or-other, and he wasn't actively developing it anymore. The best thing you can do is to contact WhatsApp yourself and let them know how much you'd like to see an Ubuntu Touch client.
Click to expand...
Click to collapse
Wow, that would be really hard to get it. I mean, Ubuntu is still in "alpha", you cant show all Ubuntu Touch experiencie to Whataspp people. I supposed that till Ubuntu Touch is not fully completed they dont answer witch an afirmative decision.

Categories

Resources