LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-13-2014, 06:55 PM   #1
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351

Rep: Reputation: 30
Question Any location of SlackBuild for jdk6?


Hello

Does anyone has/knows where from I can fetch a SlackBuild for installing JDK6? slackbuilds.org and official tree contains slackbuild for JDK7, and as far as I know it cannot be converted into SlackBuild by manually specifying VERSION variable during slackbuild run(different original packages formats, etc). I am new in my current Java project and would not risk using newer versions in order to not break anything.

Thanks.
 
Old 09-13-2014, 07:09 PM   #2
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
I thought the Slackbuild was version-agnostic so to say. It doesn't mention any version on it.
http://slackware.mirrors.tds.net/pub....1/extra/java/
 
Old 09-13-2014, 07:17 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,303
Blog Entries: 24

Rep: Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258
Use the one from an older Slackware such as Slackware 12.1 which was at JDK 6u6. It appears that Slackware 13.37 was the last versioned JDK included with Slackware at 6u25.

I too thought it was version agnostic, but not really sure if the Oracle acquisition changed anything.

Last edited by astrogeek; 09-13-2014 at 07:23 PM.
 
Old 09-14-2014, 11:40 AM   #4
irgunII
Member
 
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 383

Rep: Reputation: 72
I've been using every latest JDK update that comes out using the regular slackbuild for it and substituting in the JDK build number. Right now I have JDK 8u5 (correction, I got sloppy and missed something maybe, but I *now* have the latest, which is 8u20). You have to pay attention to the version *AND* the DVER of the tarball you downloaded.

Here's the jdk.Slackbuild I have for it:

Code:
#!/bin/sh

# Modified for SlackBuilds.org by David Somero

# Based off of java.Slackbuild
# Copyright 2008, 2009, 2010, 2011, 2012  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PRGNAM=jdk
VERSION=${VERSION:-8u5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

DVER=1.8.0_05

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm echo "Unsupported arch" exit 1;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-jdk
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "x86_64" ]; then
  LIB_ARCH=amd64
  LIBDIRSUFFIX="64"
  SRC_ARCH="x64"
else
  LIB_ARCH=i386
  LIBDIRSUFFIX=""
  SRC_ARCH="i586"
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
mkdir -p usr/lib${LIBDIRSUFFIX}
cd usr/lib${LIBDIRSUFFIX}
tar xvf $CWD/$PRGNAM-$VERSION-linux-$SRC_ARCH.tar.gz
chown -R root.root $PKG
find $PKG \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \; -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;

mkdir -p $PKG/etc/profile.d
for file in $(ls $CWD/profile.d/${PRGNAM}*) ; do
  cat $file | sed -e "s#lib/java#lib${LIBDIRSUFFIX}/java#" \
    > $PKG/etc/profile.d/$(basename $file)
done
chmod 755 $PKG/etc/profile.d/*

( cd $PKG/usr/lib${LIBDIRSUFFIX}
  mv ${PRGNAM}${DVER} java
  ln -sf java ${PRGNAM}${DVER}
)

if [ ${EXPLOIT_ME:-"no"} = "YES" ] ;then 
  mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
  cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
  ln -sf /usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/libnpjp2.so libnpjp2.so
else
  echo "
        The February 2013 Critical Patch Update for Java SE addressed 50
        security vulnerabilities, 44 of which affected the use of Java
        as a plug-in for Web browers.

            !! THE MOZILLA PLUGIN IS NO LONGER ACTIVATED BY DEFAULT !! 
       "
  sleep 5
fi

cd $PKG/usr/lib${LIBDIRSUFFIX}
    ln -sf ./java/jre/lib/${LIB_ARCH}/server/libjvm.so .

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat << EOF > $PKG/install/doinst.sh
# Clean up a potential upgrade mess caused by changing the
# installation directory to /usr/lib${LIBDIRSUFFIX}/java/:
if [ -L usr/lib${LIBDIRSUFFIX}/java ]; then
  rm -rf usr/lib${LIBDIRSUFFIX}/java
  mkdir -p usr/lib${LIBDIRSUFFIX}/java/man
  mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/server
  mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/client
  mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/javaws
  mkdir -p usr/lib${LIBDIRSUFFIX}/java/jre/bin
  mkdir -p usr/lib${LIBDIRSUFFIX}/java/bin
  mkdir -p usr/lib${LIBDIRSUFFIX}/mozilla/plugins
fi
if [ -L ControlPanel ]; then
  rm -f ControlPanel
fi
if [ -L ja ]; then
  rm -f ja
fi
if [ -L javaws ]; then
  rm -f javaws
fi
if [ -L libjsig.so ]; then
  rm -f libjsig.so
fi
# End cleanup.

if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

if [ -x /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi

if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
  fi
fi

EOF

# Install the desktop/mime files:
mkdir -p $PKG/usr/share/{applications,icons,mime}
cp -a $PKG/usr/lib${LIBDIRSUFFIX}/java/jre/lib/desktop/applications/* \
  $PKG/usr/share/applications/
cp -a $PKG/usr/lib${LIBDIRSUFFIX}/java/jre/lib/desktop/icons/hicolor \
  $PKG/usr/share/icons/
cp -a $PKG/usr/lib${LIBDIRSUFFIX}/java/jre/lib/desktop/mime/packages \
  $PKG/usr/share/mime/

# Java may not expect compressed manpages, so don't compress them.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  $PKG/usr/lib${LIBDIRSUFFIX}/java/THIRDPARTYLICENSEREADME.txt \
  $PKG/usr/lib${LIBDIRSUFFIX}/java/LICENSE \
  $PKG/usr/lib${LIBDIRSUFFIX}/java/COPYRIGHT \
  $PKG/usr/lib${LIBDIRSUFFIX}/java/README.html \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

Last edited by irgunII; 09-14-2014 at 11:53 AM.
 
Old 09-15-2014, 04:34 AM   #5
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 414

Rep: Reputation: 32
Question to irgunII - what is the DVER value for the jdk-8u20-linux-i586.tar.gz tarball ?

I'm trying to build this version.
 
Old 09-15-2014, 06:54 AM   #6
irgunII
Member
 
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 383

Rep: Reputation: 72
Depending on what file manager you use (I use krusader exclusively) you can click once on the downloaded tarball and it will show you the files/directories that are in it. In this case it's one directory and whatever it's titled will be the DVER. The 8u20 tarball is now DVER=1.8.0_20
Attached Thumbnails
Click image for larger version

Name:	result from clicking on jdk tarball in krusader.jpg
Views:	16
Size:	61.3 KB
ID:	16445  
 
Old 09-15-2014, 07:17 AM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
If you're really looking for older versions of JDK they're available at http://www.oracle.com/technetwork/ja...ve-139210.html. Note, though, the warnings:
Quote:
The Oracle Java Archive offers self-service download access to some of our historical Java releases.

WARNING: These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production.
You may need to set up an Oracle account (it's free) to acquire these versions.

All that said, there really isn't a good reason to not use Java 7 (or perhaps even 8). If you have an existing Java 6 installation (the Slackware package), you can use the SlackBuild provided with, say, Slackware 14.1 to "compile" JDK 7 (you don't actually compile it, the SlackBuild just creates an installable package for you).

Older versions of Slackware are available at http://ftp.osuosl.org/pub/slackware/ and the extra directory; e.g., JDK 6 is available in that directory in the Slackware 13.37 directory. If you've lost your installed version source, you can recover from OSUOSL just to cover your bases (or select from a European mirror site rather than OSUOSL).

I have a couple of Java packages that have been upgraded from JDK 6 to JDK 7 without problems (yours may vary of course). I always install JDK rather than JRE because I need the compiler for some things. JRE is installed with JDK so if you just install JDK you won't have any problems of a missing JRE because it's there.

The SlackBuilds that come with Slackware -- that Java ones in the /extra directory in particular -- have never given me any problems keeping Java up to date though different versions. Nowadays you need to download from Oracle (because they no longer allow a distribution to bundle Java) but Slackware provides you with the tools you need (the SlackBuild) to keep everything up to date (and you simply execute the SlackBuild then upgradepkg). Too, with Slackware packages, you can remove a package and install another one in it's place and if that doesn't work simply remove the new and reinstall the older.

I will note that I have had problems with OpenJava: why, I do not know and I have just stuck with Oracle for my (rather limited) Java needs.

Hope this helps some.
 
  


Reply

Tags
jdk6, slackbuild


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Directory location of a slackbuild installpkg ash_zz_00 Slackware 6 02-04-2010 09:28 PM
Installing JDK6 ratcateme Linux - Software 3 11-19-2008 03:59 AM
Problem with jdk6 koolKing123 Linux - Software 5 03-21-2008 04:36 PM
Uninstalling jdk6 valdezr1 Fedora 6 03-24-2007 11:06 PM
Installing JDK6? GSMD Debian 2 01-11-2007 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration