Wednesday, February 9, 2011

How to get Java Working on Chrome OS

Now that you have root on your CR-48 I will be showing you how to get the Java plugin working on your Chrome browser.
First you want to grab the Java self extracting file for Linux from here. I did NOT use the RPM.
When this is downloaded you need to move this, since I do everything in a folder opt these are the commands to follow.

>mkdir /mnt/stateful_partition/opt
>mv /home/chronos/user/Downloads/jre-6u23-linux-i586.bin /mnt/stateful_partition/opt
>cd /mnt/stateful_partition/opt

now that it is in your folder make sure you can run it

>chmod a+x jre-6u23-linux-i586.bin
> ./jre-6u23-linux-i586.bin

if the above didn't run the file try
>sudo bash jre-6u23-linux-i586.bin
once the execution is done you can type
> ls
and you should have a jre1.6.0_23 directory and the bin file
if you want you can remove the bin file
>rm jre-6u23-linux-i586.bin

next you want to make a symbolic link to the /usr/bin folder so that java can run correctly, (note I do links weird so stick with me)

>cd /usr/bin
>ln -s /mnt/stateful_partition/opt/jre1.6.0_23/bin/java
>ln -s /mnt/stateful_partition/opt/jre1.6.0_23/bin/javaws

You can also link the control panel there if you want that would be
>ln -s /mnt/stateful_partition/opt/jre1.6.0_23/bin/ControlPanel
next you want to place the plugin for chrome into the chrome plugin folder for all of you remember that the libjavaplugin_oji.so is NOT the plugin you need for this you need the next generation plugin.

>cd /opt/google/chrome/plugins
>ln -s /mnt/stateful_partition/opt/jre1.6.0_23/lib/i386/libnpjp2.so

Now you have Java in your plugins. all you have to do is go into your settings in chrome then under the hood then disable individual plugins and it should be listed. You should be all good to go!

If something didn't work make sure to go to your directories where you made links and do the ls command if the link is highlighted red that means its bad you need to do rm and redo the link.

Next how to is Firefox on the CR-48 Chrome OS