WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: firefox and openjdk-7-jre.tcz how to get the plugin  (Read 3818 times)

Offline aug

  • Jr. Member
  • **
  • Posts: 74
firefox and openjdk-7-jre.tcz how to get the plugin
« on: November 29, 2016, 10:50:04 AM »
Hi,
i have installed openjdk-7-jre.tcz (version 8 created problems with an app) and need the plugin for firefox but can't find the so-file. Where is it or which package i need to install too? Thanks.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: firefox and openjdk-7-jre.tcz how to get the plugin
« Reply #1 on: November 30, 2016, 04:50:29 AM »
It was removed in Java 7 IIRC.
The only barriers that can stop you are the ones you create yourself.

Offline aug

  • Jr. Member
  • **
  • Posts: 74
Re: firefox and openjdk-7-jre.tcz how to get the plugin
« Reply #2 on: December 01, 2016, 03:19:38 PM »
It was removed in Java 7 IIRC.

..but what can i do you have java apps runing in firefox? need it for vpn connection to the company network.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: firefox and openjdk-7-jre.tcz how to get the plugin
« Reply #3 on: December 01, 2016, 11:22:37 PM »
What vpn requires firefox with java?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: firefox and openjdk-7-jre.tcz how to get the plugin
« Reply #4 on: December 02, 2016, 04:53:14 AM »
Install Java 6? Or perhaps the binary Java 7 from Oracle still has it even if openjdk does not.
The only barriers that can stop you are the ones you create yourself.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: firefox and openjdk-7-jre.tcz how to get the plugin
« Reply #5 on: December 02, 2016, 06:01:56 PM »
Oracle's latest Java 8 still provides the Firefox Java plugin, no need to use an outdated version. There are already enough security risks, especially if used in a workplace. JRE8 was recently tested to install and work in dCore using the dCore-java-installer command, which creates a nice SCE extension and Firefox plugin:
http://wiki.tinycorelinux.net/dcore:dcore-java-installer_command

It probably wouldn't be too hard to manually create a TCZ instead, or modify the script, pasted below. Just manually download the JRE and follow steps from ~ cd "$UNPACKDIR" onward. Once created i think it was self-contained and didn't require any dependencies.

Oracle's JRE8 can be downloaded here:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
jre-8u112-linux-i586.tar.gz

The download contains the precious libnpjp2.so file, but if IIRC during dCore testing the entire JRE needed to be installed, maybe YMMV.

Of course this assumes you're okay using Oracle's software.

dCore-java-installer:
Code: [Select]
#/bin/sh
# (c) 2014 Jason Williams
# 2016 Java 8 update, help info, end of script notes, UI improvements and more by nitram
#  Based on script by:
#"---------------------------------------------------------------"
#"                Java Installation Script (0.2)"
#"              Created by Mars11 "http.//mars11.com/""
#"---------------------------------------------------------------"
> /tmp/select.ans
. /etc/init.d/tc-functions

if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
echo " "
echo "${YELLOW}dCore-java-installer - Create a JRE 8 SCE (Java Runtime Environment, eg."
echo "                       jre-8u92-linux-i586.sce).${NORMAL} Imports JRE only, not JDK"
echo "                       (Java Development Kit), may use option combinations."
echo " "
echo "If >1 web browser installed select from list, opens Oracle Java JRE 8 download"
echo "site, manually download file (eg. jre-8u92-linux-i586.tar.gz) to home"
echo "(eg. /home/tc/) or /tmp directory, then prompted to create the SCE."
echo " "
echo "Re-run this script and repeat the process when Java updates available"
echo "(eg. Firefox will flag Java plugin out of date)."
echo " "
echo "Oracle JRE 8 download site:"
echo "www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html"
echo " "
echo "Usage:"
echo "${YELLOW}"dCore-java-installer"${NORMAL}     Create a Java SCE."
echo "${YELLOW}"dCore-java-installer -b"${NORMAL}  Create a Java SCE, add SCE to sceboot.lst."
echo "${YELLOW}"dCore-java-installer -e"${NORMAL}  Create a Java SCE, search home and /tmp"
echo "                         directory for an already downloaded jre-8*.tar.gz file."
echo "${YELLOW}"dCore-java-installer -r"${NORMAL}  Create a Java SCE, create SCE in RAM."
echo " "
exit 1
fi

echo " "

while getopts rbe OPTION
do
case ${OPTION} in
r) RAM=TRUE
echo "Using the -r option."
sleep 1
;;
b) ONBOOT=TRUE
echo "Using the -b option."
sleep 1
;;
e) EXISTING=TRUE
echo "Using the -e option."
sleep 1
;;
*) exit 1 ;;
esac
done
shift `expr $OPTIND - 1`

NICE=`grep "^NICE=" /etc/sysconfig/sceconfig | cut -f2 -d=`
if [ -n "$NICE" ]; then
if [ "$NICE" -gt 19 ]; then
NICE=19
echo "Using nice level 19, 19 is the highest possible nice value."
elif [ 0 -gt "$NICE" ]; then
NICE=0
echo "Using nice level "$NICE", only root can use negative nice values."
else
echo "Using nice level "$NICE"."
fi
sleep 1
/bb/renice -n "$NICE" -p $$
fi

echo " "
echo "${YELLOW}dCore-java-installer:${NORMAL}" && sleep 3
echo " "
echo "*  This script imports Oracle's Java Runtime Environment 8." && sleep 3
if [ "$EXISTING" != TRUE ]; then
echo "*  Ensure Firefox, Iceweasel, Nautilus, Midori or Chromium are loaded,"
echo "   otherwise see dCore-java-installer --help regarding the -e option." && sleep 3
fi
echo " "
echo -n "Press Enter to proceed: "
read ANS
echo " "

if [ "$EXISTING" != "TRUE" ]; then

{ which firefox | grep -v ondemand ; which nautilus | grep -v ondemand ; which chromium | grep -v ondemand ; which iceweasel | grep -v ondemand ; which midori | grep -v ondemand; } | sort | uniq | select "Select a web browser to download Java (JRE 8):" "-"

read BROWSER < /tmp/select.ans
rm /tmp/select.ans

if [ "$BROWSER" == "q" ]; then
echo " "
echo "Load Firefox, Iceweasel, Nautilus, Midori or Chromium and re-run script,"
echo "otherwise download jre-8*.tar.gz to home or /tmp with another browser"
echo "and run 'dCore-java-installer -e' (see dCore-java-installer --help)."
echo " "
exit 1
fi

echo " "
echo "*  Opening Oracle Java JRE 8 download page with "$BROWSER"." && sleep 3
"$BROWSER" http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html > /dev/null 2>&1 &
echo "*  Manually download jre-8u**-linux-i586.tar.gz to home (eg. /home/tc) or /tmp." && sleep 3
echo " "
read -p 'When downloaded press Enter to import Java Runtime Environment: '
echo " "
fi

TCEDIR=/etc/sysconfig/tcedir

if [ "$RAM" == "TRUE" ]; then
UNPACKDIR=/tmp/oracle-java321
mkdir -p "$UNPACKDIR"
else
UNPACKDIR="$TCEDIR"/import/oracle-java321
mkdir -p "$UNPACKDIR"
fi

FILE=`find ~ -name "j??-8u??-linux-i586.tar.gz"`

if [ ! -f "$FILE" ]; then
FILE=`find /tmp -name "j??-8u??-linux-i586.tar.gz"`
fi

if [ ! -f "$FILE" ]; then
echo " "
echo "Java runtime or development release *.tar.gz file not found, exiting.."
exit 1
fi

FILENAME=`basename "$FILE"`
PKGNAME=`basename "$FILENAME" .tar.gz`
DIRNAME=`dirname "$FILE"`

echo "*  Using $FILE."
sleep 3
echo "*  Copying "$FILE" to:"
echo "   "$TCEDIR"/import/debs/"
sleep 3
cp "$FILE" "$TCEDIR"/import/debs/
echo "*  Creating Java extension:"
sleep 3
echo " "

sudo tar -xvf "$TCEDIR"/import/debs/"$FILENAME" -C "$UNPACKDIR"

cd "$UNPACKDIR"

if [ ! -d usr/lib/jvm/ ]; then
    sudo mkdir -p usr/lib/jvm
fi
if [ ! -d usr/bin ]; then
    sudo mkdir -p usr/bin
fi
if [ ! -d usr/share/applications ]; then
    sudo mkdir -p usr/share/applications
fi
if [ ! -d usr/share/pixmaps ]; then
    sudo mkdir -p usr/share/pixmaps
fi

sudo mv ./j??1.8.?_?? usr/lib/jvm/java1.8

if [ -f usr/lib/jvm/java1.8/bin/java ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/java usr/bin/java
fi
if [ -f usr/lib/jvm/java1.8/bin/javaws ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/javaws usr/bin/javaws
fi
if [ -f usr/lib/jvm/java1.8/bin/jcontrol ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/jcontrol usr/bin/jcontrol
fi
if [ -f usr/lib/jvm/java1.8/bin/jjs ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/jjs usr/bin/jjs
fi
if [ -f usr/lib/jvm/java1.8/bin/keytool ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/keytool usr/bin/keytool
fi
if [ -f usr/lib/jvm/java1.8/bin/orbd ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/orbd usr/bin/orbd
fi
if [ -f usr/lib/jvm/java1.8/bin/pack200 ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/pack200 usr/bin/pack200
fi
if [ -f usr/lib/jvm/java1.8/bin/policytool ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/policytool usr/bin/policytool
fi
if [ -f usr/lib/jvm/java1.8/bin/rmid ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/rmid usr/bin/rmid
fi
if [ -f usr/lib/jvm/java1.8/bin/rmiregistry ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/rmiregistry usr/bin/rmiregistry
fi
if [ -f usr/lib/jvm/java1.8/bin/servertool ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/servertool usr/bin/servertool
fi
if [ -f usr/lib/jvm/java1.8/bin/tnameserve ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/tnameserve usr/bin/tnameserve
fi
if [ -f usr/lib/jvm/java1.8/bin/unpack200 ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/unpack200 usr/bin/unpack200
fi
if [ -f usr/lib/jvm/java1.8/bin/ControlPanel ]; then
sudo ln -sf /usr/lib/jvm/java1.8/bin/ControlPanel usr/bin/ControlPanel
fi

sudo cp usr/lib/jvm/java1.8/plugin/desktop/sun_java.desktop usr/share/applications/"$PKGNAME".desktop
sudo cp usr/lib/jvm/java1.8/plugin/desktop/sun_java.png usr/share/pixmaps/"$PKGNAME".png

if [ ! -d usr/lib/mozilla/plugins/ ]; then
sudo mkdir -p usr/lib/mozilla/plugins/
fi

sudo ln -s /usr/lib/jvm/java1.8/lib/i386/libnpjp2.so usr/lib/mozilla/plugins/libnpjp2.so

cd ..

if [ -f "$TCEDIR"/sce/"$PKGNAME".sce ] && busybox mount | grep " /tmp/tcloop/"^$PKGNAME$" " > /dev/null 2>&1; then
mksquashfs oracle-java321 "$TCEDIR"/sce/update/"$PKGNAME".sce -noappend
cd "$TCEDIR"/sce/update/
md5sum "$PKGNAME".sce > "$PKGNAME".sce.md5.txt
sudo rm -r "$UNPACKDIR"
else
mksquashfs oracle-java321 "$TCEDIR"/sce/"$PKGNAME".sce -noappend
cd "$TCEDIR"/sce/
md5sum "$PKGNAME".sce > "$PKGNAME".sce.md5.txt
sudo rm -r "$UNPACKDIR"
fi

if [ "$ONBOOT" == "TRUE" ]; then
if ! grep -wq "^$PKGNAME$" "$TCEDIR"/sceboot.lst; then
echo "$PKGNAME" >> "$TCEDIR"/sceboot.lst
#echo "$PKGNAME entered in $TCEDIR/sceboot.lst."
fi
fi

echo " "
echo "${YELLOW}Imported "$PKGNAME".${NORMAL}" && sleep 3
echo " "
echo "Notes:"
echo " "
if [ "$ONBOOT" == "TRUE" ]; then
echo "*  $PKGNAME added to $TCEDIR/sceboot.lst."
fi
echo "*  Run sce-load $PKGNAME to load this extension."
echo "*  Manually remove "$FILE" as desired."
echo "*  If old version installed:"
echo "       * Remove old /etc/sysconfig/tcedir/sceboot.lst entry"
echo "       * Reboot system"
echo "*  Firefox Java plugin installed, restart browser to activate."
echo "*  Java plugin test:"
echo "       *  http://java.com/en/ -> Do i have Java?"
echo "       *  http://www.test-java.com/"
echo "*  Import and load bash to launch ControlPanel (or jcontrol)."
echo "*  Default security high so most web applets won't run, at own risk use"
echo "   ControlPanel to add Exception Sites and modify security settings."
echo "*  ControlPanel can also remove temporary files, enable debug console, etc."
echo "*  Re-run this script to install Java updates."
echo " "

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: firefox and openjdk-7-jre.tcz how to get the plugin
« Reply #6 on: December 02, 2016, 07:55:45 PM »
A java plugin may only be temporary and likely not required soon.  According to Mozilla, after March 2017 the only plugin allowed will be Flash, likely the latest v24+ currently in beta.
Firefox is likely getting a makeover, real soon.