Part Three – Configuring Ubuntu to use your newly installed Java JRE and SDK
There are a lot of technical steps in this part, and I figured them out mostly through heavy internet searching, piecing together information from other blogs, and trial and error. The main issues were caused by every site expecting you to already have some key components installed before trying to get this working. So when I tried to follow their guides they never worked. That is why we are here now, using a fresh and clean Ubuntu installation.

  1. cd /opt/java && sudo ln -s /opt/java/jdk1.6.0_21 /opt/java/jdk-linked && sudo ln -s /opt/java/jre1.6.0_24 /opt/java/jre-linked – this moves back to the /opt/java directory and creates a link to the jdk folder that we can use to reference to later, that way if we ever install a newer version of java all you have to do is remove the links and create new ones, not have to go through this whole process again! you can test by typing cd jdk-linked && ls – and you will see the contents of /opt/java/jdk1.6.0_21 (don’t forget you can use [tab])
  2. sudo update-alternatives –install “/usr/bin/java” java “/opt/java/jre-linked/bin/java” 10 && sudo update-alternatives –set java /opt/java/jre-linked/bin/java – this updates Ubuntu so it can find your new jre and makes it the default jre to be used by the system (again future proofed because we used the linked location)
    • if you want to, we can setup java for Firefox too
    • mkdir ~/.mozilla/plugins/ && ln -s /opt/java/jre-linked/lib/i386/libnpjp2.so ~/.mozilla/plugins
  3. cd && vi .profile
    • [ctrl+f]
    • [o]
    • EXPORT JAVA_HOME=/opt/java/jdk-linked
    • [enter]
    • EXPORT PATH=$PATH:$JAVA_HOME:$JAVA_HOME/bin
    • [esc]
    • :wq!
  4. now we need to repeat the next set of instruction with the following items placed in [java] (everytime you see [java] put one of the following until you have done these steps for each of the following), I have noted after each one if you need a jre or jdk, or both lines for it, if both, replace the 10 with a 5 on the jdk (this will add both the jre and the jdk alternatives to the list making the jre ones the default). Or, just use this script. (remember to look at the script first to make sure it does what I said, and to set it as executable! cat java-update|more && chmod +x java-update then execute it with sudo ./java-update)
    • java – jre/jdk
    • jar – jdk
    • jarsigner – jdk
    • javac – jdk
    • javadoc – jdk
    • javah – jdk
    • native2ascii – jdk
    • rmic – jdk
    • rmid – jre/jdk
    • rmiregistry – jre/jdk
    • serialver – jdk
    1. sudo update-alternatives –install “/usr/bin/[java]” [java] “/opt/java/jre-linked/bin/[java]” 10
    2. sudo update-alternatives –set [java] /opt/java/jre-linked/bin/[java]
  5. mkdir ~/source-build && cd ~/sourcebuild && sudo apt-get install debhelper gcj-4.4-base gcj-jdk m4 debiandoc-sgml python-docutils cdbs – moving on, we need to install some things before the adding Titanium to the system, this group (plus their dependencies, you don’t want to know what I went through to get this list exactly correct, it took a couple of months the first time I worked on getting this installed) takes up 823MB and took me 16 minutes to download and 2.5 minutes to install. as an fyi, I figured these out by not having them installed the first time around and spent weeks trying to figure each part out, because these files are not what causes the failed instal, linux will pull the dependencies for you when you install something, but there are dependencies of dependencies of dependencies… and somewhere down that line linux fails to grab the final set! So you need to install them in this order, I then spent another week or 2 finding out that those in particular have to be installed before the next set or the next set fails to install!
  6. sudo rm /var/lib/apt/lists/* && sudo apt-get update – this will resolve an issue with the sources of the next step
  7. sudo apt-get install llvm-gcc-4.5 && sudo apt-get build-dep llvm-gcc-4.5 && sudo apt-get -b source python-defaults ruby-defaults && sudo apt-get update && sudo apt-get dselect-upgrade && sudo apt-get autoremove – this set downloads the source files for each of these and builds them specifically for your system and then cleans itself up, this did not prompt me for the additional storage space until it got to the apt-get dselect upgrade step (some 48kb) but the build process took about 20 to 45 seconds on my machine.
  8. sudo apt-get install ispell – I have found a few other things that are necessary for titanium to work
  9. restart your development VM
  10. mount your shared drives and take a new snapshot after the system comes back up, called pre Android SDK, and comments “OS, java jre&jdk, and compilers installed”

maybe you don’t really need all of this, but I don’t want to find out while I am writing my Android app that I missed a step, as then you won’t be able to re-use the snapshots in case of an emergency (also called a mistake!). One other note, if you noticed I made a new directory and used it for the source builds, this is because at least the python source build requires several chown commands to run and if you try to execute them on a VM share mount it will fail and you cannot complete the build. Congratulations! I know this was a tough part to do, and I’ll have to check it over sometime in the future to recreate the entire process step by step and make sure it all works again (never know where there might be a typo!). Next time we meet it will be to install the Android SDK and Titanium. After that we will build a short crappy Android app to test everything and then make an .iso Live CD of the whole VM! The final file was pretty big, I’m not sure if a Live DVD would cover it all! I’ll test this idea and add it to the final post if it works. I will be heading out of town for a couple of days so don’t expect anything before monday!

  1. part one
  2. part two
  3. part four

again, after I finish this series up, I’ll add in resource links

Part Two – installing the Java SDK

Let just get right into it! open up your terminal session and lets continue!

  1. mkdir -p ~/android/environment/system – this will make both the environment and system folders with one command (I love -p!)
  2. sudo mount -a && cd ~/Downloads && ls – make sure everything that should be there is actually there
  3. wget http://javadl.sun.com/webapps/download/AutoDL?Bundleid=47143 – 32-bit Linux java
  4. open the default firefox web browser (should be an icon at the top next to the System pull-down menu), http://java.sun.com/javase/downloads/widget/jdk6.jsp – note, now that oracle owns sun, this link may change!
    1. click the big download button
    2. select linux as your operating system and click continue
    3. then download the file that does NOT say rpm, by clicking on it
    4. choose save – this will automatically put the file in your Downloads folder (which is mapped to your host computer, so if you have to start over, you won’t have to download it again
  5. sudo mkdir /opt/java && sudo cp ./AutoDL?Bundleid=47143 /opt/java/sun-java6-jre.bin && sudo cp ./jdk-6u21-linux-i586.bin /opt/java/ – remember to use [tab] after typing Auto or jdk so you can use this even if the version gets updated
  6. cd /opt/java && sudo ./sun-java6-jre && sudo ./jre-6u21-linux-i586.bin – again remember to use [tab], during the install you’ll have to press [enter] when the jdk is almost done to exit out (it will open a firefox window asking you to register, you can just close it)
  7. sudo apt-get install galternatives
  8. sudo rm /opt/java/*.bin – this will remove almost 200MB from your VM HDD
  9. and restart the VM again
  10. after the VM comes back up mount your shares again and take a second snapshot, we’ll name this one Java jre & jdk installed, in the comments note that you have also added galternatives

We will finish up part two here, the next section is where a little mistake will have you reverting to this last snapshot, so you will be happy we made it (I did not make the second snapshot the first time through and while all the way at the end of part three I had to revert back to the end of part one and redo this section again).

  1. part one
  2. part three
  3. part four
Tagged with:
 

just want to get this started as I hope it will motivate me to finish it, since I have done a LOT of things on my computer since my last post, and obviously I have posted none of it.

So, I got a little impatient about not having my PC functioning, so I I installed Fedora 12 x64 on the rest of my FreeBSD boot drive and I have about 80% of the things on my list done and working.  I’ll reference them by numbers here, and you can go read what they were by clicking on “my list” above.  I am still hoping to get FreeBSD as my host OS; however everything is working right now with Fedora (except that stupid wireless NIC), although I am still having my “system reached critical temp” error from ACPI, yet the system resource monitor I have running shows a nice pleasant 30C CONSTANT temp.  maybe this summer I’ll pickup a liquid CPU cooler… I already have 5 exhaust fans and 2 intake fans, 2 x 240mm exhaust and a 160mm or 180mm intake, I think I have air flow covered.  (talked to a friend who is more into the details of technical issues, a network engineer, and he says that an inactive CPU, like when the system shutsdown, can drop 40F in about 7-10 seconds so it might be why I cannot catch it reporting a high temp in the BIOS) The BIOS does not report any temps reaching above 45C ever, so I have no idea why this is happening, I do run widgets reporting the internal temp, but have never seen it change!!!) .  most of the time when it shuts there is/has been high CPU/disk IO usage (all 4 cores over 60% sustained, multiple long term large/multiple file movements across drives and/or multiple VMs running).  So it could be valid.

I have come up with a couple of things to try to resolve this issue (going with the cheapest first, even if it is not really going to help a CPU issue, it can’t hurt…)

  1. I could just upgrade some hardware and see if a different BIOS/MB manufacturer makes a difference.  I would love a lower watt CPU (or 6 core!), more L2/L3 cache, and USB 3.0 and SATA 6GB/s, since my current system bottleneck is the SATA 3GB/s HDDs.
  2. Switch to liquid cooling and installing a new thermal sensor with an external readout.
  3. buy cute little 5cfm coolling fans to place on my NorthBridge, SouthBridge, and onboard GPU passive cooling fins (cheapest option, not necessarily attacking the actual issue though)
  4. purchase a pretty new Video card and disable the onboard video (the chip is within an inch or two from the CPU, so there maybe some issue with residual heat from the GPU causing my overheating).

in order from cheapest to most expensive would be 3, 2, 4/1 (really close and might be a tie or within a $20-$30)

My List of things to get working, except this one is for Fedora.

1. VirtualBox is installed, working and I have multiple VMs up and running.

2. Install VMWare Workstation, I have downloaded the newest trial version and it is good for another 3 weeks, but have not gotten around to installing it.

3. Mounting my NTFS drives, all mounted, where I want them, even went through and deleted the Windows OS system folders from all but one.

4. SSH connections, I have started this and was working on it when I decided to start this post, should be done tomorrow.

5. I am posting this from Google Chrome on my Fedora 12 installation right now, so I’d say installed and working.  Java shows up in the plugins, although java.com cannot detect it in my browser.

6. Hulu works great in Firefox or Google Chrome, although is a bit spotty when I have VMs running, and the playback is laggy in Chrome…  So I am trying to get the Hulu Desktop app running.  will make a post after I get some work done on it and let you know how it goes.

7. So far everything is working great, going to try a couple of VM’ed games next week after I get the rest of this done.

8. Firefox is up, running, and is playing hulu; however it does not report Java as installed from the about:plugins page, even though it is and I followed all the steps to link the correct files to the correct places.  I believe this is the Firefox 3.6 doesn’t support Java issue though and not an issue on my part.

9. access NTFS drives remotely via ssh and a chrooted account with links to the mounts.  After I get my SSH working tomorrow I should be able to test this.  I was reading something online I no longer have open and may not have bookmarked that said that I can double mount drives (mount a drive to more than one, specifically 2, locations)

10. convert my NTFS drives to a more suitable linux FS, this again is a last thing item, to be done after everything else is working.

11. convert my drives from MBR to GPT, most likely to be done at the same time as the FS change.

12. GUI package manager for KDE, done, comes with Fedora.

13. eliminate all traces of Gnome from my computer… again, have to be last thing, once all is up and working.

14. build my first kernel, normally done immediately after install, I’ll do it last after EVERYTHING else (including the other things I said I would do last)

15. Wine is installed and works.  will try out some things that I have installed in VMs to see about dropping those VMs

16. install older apps, again part of a couple of other items, I will of course be installing older apps on older OS installation I have, and will try them in Wine as stated.

17. X.org port forwarding to Cygwin on a windows machine (laptop) something I might do in a week or two…

18. start regular backups… I’m getting there, I have the drive formated in ext3, I just have not started backing things up.

19. Java, I think it works in Chrome, I was able to see the animated maps on the NOAA website, which most people use to test their Java. not working in Firefox 3.5.9.2

20. Flash, Hulu is working in Firefox and Chrome, so all good here.

21. Yakuake is fully functional and working.

22. Picasa 3.6 (I think) is installed and working great, except I don’t seem to be able to find the facial recognician system.

23. No idea on this one, can not find where I posted what it was, only that it was completed on BSD.

Unfinished items for Fedora: 2, 4, 9, 10, 11, 19?

apparently Open Office will not load, for an unknown reason, looking into it at this time.

this may get a bit repetitive with me re-listing everything, so instead I am just going to link to the first post that has the list of things to do… note I have added a couple of things at the bottom so the numbers now go past 20…

 

1. 75% in progress, troubleshooting and more testing needed.  I have gotten my user added the the “VirtualBox” user group, but I get this error when I try to execute VirtualBox from the command line ”VirtualBox: supR3HardenedExecDir: couldn’t read “”, errno=2 cchLink=-1“  I tried loading VirtualBox from KDE and it was loading for about 12 seconds then nothing happend, also it did not install a manual page.  I’ll have to do some forum surfing to figure this one out.  this exact error is referrenced in the FreeBSD handbook noting that it should only occur if you are using an older version on VirtualBox.

2. 0% not started.  no updates yet, holding off till I get some of these other tasks complete.

3. 100% complete.  everything is automounting at bootup and it is doing it where I want it to.

4. 100% complete.  I am working almost exclusively via ssh now and can connect to it remotely as tested via an Android cell phone ssh client (props to connectbot)

5. 10% in progress, researched only.  Chrome can be installed as a Debian, Ubuntu, openSUSE, or Fedora package, I just need to set my system up to handle RPMs and I might be able to get it to install, hopefully the newest version will work easier than last august when everyone was trying to hack the install to make it work, especially since every forum I went to never had a successful complete port available and there were no posts from 2010 and the maintainer of the hacked port is not doing updates anymore except those that match his specific system configuration.

6. duplicate issue.  going to delete this one, as #19 and #20 pretty much sum it up.

7. 30% in progress, trouble shooting and additional testing required.  as noteded else where VirtualBox is installed but not able to run, and I have not started on VMWare.

8. 100% complete.  Firefox 3.6.2 is installed and operational.

9. 90% in progress, trouble shooting and more testing needed.  self testing shows that a user is able to ssh in and access the drives, but is not able to ftp in and access the drives.  I used “sudo ln -s /mnt/<directory> /home/<user>/<directory>” I haven’t used links much and need to see if the -s (symbolic) is what is preventing the user from accessing the data via ftp.

10. 0% not started.  no updates yet, holding off till I get some of these other tasks complete.

11. 20% in progress, 1 out of 5 drives is currently running with GPT.  the new 1.5TB drive was setup with GPT when installed into the system.  the new 500GB drive (FreeBSD boot drive) is still MBR as the FreeBSD fdisk application did not have an option for setting the drive boot record to GPT, although I have found documentation on converting the FreeBSD boot drive to GPT.

12. 0% in progress, initial research turned up nothing useful.

13. -30% not started, situation worsening, additional packages labeled as “gnome-xxxx” or “xxxxx-gnome” have been added as dependencies during other package installations. 

14. 10% in progress, initial research has turned up useful information; however I am not currently in a possition to proceed.

15. 0% not started.  no updates yet, holding off till I get some of these other tasks complete.

16. 0% not started.  no updates yet, holding off till I get some of these other tasks complete, will require at least one of #’s 1, 2, 7, or 15 to be complete before work can begin.

17. 0% not started.  no updates yet, holding off till I get some of these other tasks complete, not a priority and very near the bottom of the list of things to do.

18. 40% in progress.  Still leaning towards rsync, but I have been researching into using dump and I think it will do what I want it to.

19. 60% in progress, I thought I had it installed, but when I went to the test if you have java installed page of www.java.com it failed to test my java installation (might need to add the plugin for firefox, will check); however the java download page only lists “Windows, Mac OS, and Linux” as OS choices, so I will have to do more research.

********update – I am making a java install page because this was such a pain in the rump to do.***********

20. 40% in progress, I thought I had it installed, but when I went to hulu it told me I need java 10.0.22, also amd.com told me I need the flash plugin installed; however again there is no FreeBSD listing on the download page as a supported OS, so I will have to do more research.

21. 100% complete.  (I know I added this one) get Yakuake working in KDE, well I did a “sudo pkg_add -r yakuake” and it started downloading, it has about 6 dependencies and those had about 150 dependencies, most of which I already had installed.  the problem I saw was it force downloaded KDE 3.5 and all of it’s dependencies, I hope that doesn’t screw anything up.  If I remember correctly from when KDE 4.0 first came out they specifically named the port KDE4 instead of just KDE so that there would not be conflicts on systems that had both versions installed.  after it finished I ran a “sudo pkgdb -F” it found a lot of stale dependencies and fixed them, one thing I noticed fly by was Firefox 3.0.## which tells me I need to check my Firefox and see if it is 3.0 or 3.6…

22. 10% researched only.  Get Picasa installed and working, this will be just like chrome and will require using RPM packages.

23. 100% complete.  as part of #5 and #22 (and because I always install this on FreeBSD, but it failed during initial OS installation for some reason) I am installing the linux compatibility/emulation pack.  I’ll do a brief post on this and link it here.

Tagged with:
 
14 visitors online now
3 guests, 11 bots, 0 members
Max visitors today: 23 at 12:30 pm PST
This month: 23 at 02-05-2012 05:37 am PST
This year: 29 at 01-11-2012 02:49 pm PST
All time: 1100 at 08-08-2011 08:11 pm PDT
View in: Mobile | Standard