# JKD16 Installation



## fred974 (Jul 26, 2012)

Hello Everyone,

I'm just wondering if anybody ever managed to installed Java 1.6 on FreeBSD 9 Release?

I have tried everything and keep failling... see my previous trhead

http://forums.freebsd.org/showthread.php?t=33176

If anyone has a tutorial or a guide I'll gladly welcome it to try.

Thank you all

Fred


----------



## plamaiziere (Jul 26, 2012)

fred974 said:
			
		

> Hello Everyone,
> 
> I'm just wondering if anybody ever managed to installed Java 1.6 on FreeBSD 9 Release?
> I have tried everything and keep failling... see my previous trhead
> ...



Yes I use jdk16 and openjdk16. That should work. I don't know where is your problem (looks like your ports are seriously broken but it's hard to say...)

Basically:

To build java you need java, if you don't have it installed, install the port java/diablo-jdk16. follow the instruction (you have to download the package manually). The port will install (I guess) the misc/compat7x port (because the package is built for FreeBSD 7)

mount /proc and /dev/fd as suggested. Then you can build the jdk16 via the port java/jdk16.

That should work.

Regards


----------



## fred974 (Jul 30, 2012)

Thank you plamaiziere,

I'll keep the post updated


----------



## fred974 (Jul 30, 2012)

From what I can see, there are no error messages but *java -version* return nothing...

Have I missed a step?


```
freebsd# pwd
/usr/ports/java/diablo-jdk16
freebsd# make install clean
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for diablo-jdk-1.6.0.07.02_19
===>  Extracting for diablo-jdk-1.6.0.07.02_19
=> SHA256 Checksum OK for diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2.
===>  Patching for diablo-jdk-1.6.0.07.02_19
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             i.pc - found
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             p.pc - found
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             t.pc - found
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             tst.pc - found
===>   diablo-jdk-1.6.0.07.02_19 depends on shared library: z.4 - not found
===>    Verifying install for z.4 in /usr/ports/misc/compat7x
===>  License check disabled, port has not defined LICENSE
=> compat7x-i386-7.3.703000.201008.tar.bz2 doesn't seem to exist in /usr/ports/d                                                                             istfiles/.
=> Attempting to fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/g                                                                             arga/compat/compat7x-i386-7.3.703000.201008.tar.bz2
compat7x-i386-7.3.703000.201008.tar.bz2       100% of 3226 kB  876 kBps
===>  Extracting for compat7x-i386-7.3.703000.201008_1
=> SHA256 Checksum OK for compat7x-i386-7.3.703000.201008.tar.bz2.
===>  Patching for compat7x-i386-7.3.703000.201008_1
===>  Configuring for compat7x-i386-7.3.703000.201008_1
===>  Installing for compat7x-i386-7.3.703000.201008_1
===>   Generating temporary packing list
===>  Checking if misc/compat7x already installed
(cd /usr/ports/misc/compat7x/work/compat7x-i386-7.3.703000.201008/lib && install                                                                               -o root -g wheel -m 444 *.so.* /usr/local/lib/compat)
(cd /usr/local/lib/compat && /bin/ln -sf /lib/libthr.so.3 libkse.so.3)
*******************************************************************************
*                                                                             *
* Do not forget to add COMPAT_FREEBSD7 into                                   *
* your kernel configuration (enabled by default).                             *
*                                                                             *
* To configure and recompile your kernel see:                                 *
* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *
*                                                                             *
*******************************************************************************
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib/compat
===>   Installing ldconfig configuration file
===>   Registering installation for compat7x-i386-7.3.703000.201008_1
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/compat/libssh.so.4
/usr/local/lib/compat/libroken.so.9
/usr/local/lib/compat/libftpio.so.7
/usr/local/lib/compat/libwrap.so.5
/usr/local/lib/compat/libsmb.so.3
/usr/local/lib/compat/libkrb5.so.9
/usr/local/lib/compat/libfetch.so.5
/usr/local/lib/compat/liblwres.so.30
/usr/local/lib/compat/libcrypto.so.5
/usr/local/lib/compat/libmilter.so.4
/usr/local/lib/compat/libnetgraph.so.3
/usr/local/lib/compat/libradius.so.3

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
===>   Returning to build of diablo-jdk-1.6.0.07.02_19
===>  Configuring for diablo-jdk-1.6.0.07.02_19
===>  Installing for diablo-jdk-1.6.0.07.02_19
===>   diablo-jdk-1.6.0.07.02_19 depends on executable: javavm - not found
===>    Verifying install for javavm in /usr/ports/java/javavmwrapper
===>  License check disabled, port has not defined LICENSE
===>  Extracting for javavmwrapper-2.3.5
===>  Patching for javavmwrapper-2.3.5
===>  Configuring for javavmwrapper-2.3.5
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%JAVALIBDIR%%|/usr/local/sha                                                                             re/java/classes|;'  /usr/ports/java/javavmwrapper/src/classpath.sh >/usr/ports/j                                                                             ava/javavmwrapper/work/classpath.sh
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%JAVALIBDIR%%|/usr/local/sha                                                                             re/java/classes|;'  /usr/ports/java/javavmwrapper/src/javavmwrapper.sh >/usr/por                                                                             ts/java/javavmwrapper/work/javavmwrapper.sh
/usr/bin/sed -e 's|%%LOCALBASE%%|/usr/local|;'  /usr/ports/java/javavmwrapper/fi                                                                             les/pkg-install.in > /usr/ports/java/javavmwrapper/work/pkg-install
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%LOCALBASE%%|/usr/local|;'                                                                               -e 's|%%PORTSDIR%%|/usr/ports|;'  /usr/ports/java/javavmwrapper/src/checkvms.1 >                                                                              /usr/ports/java/javavmwrapper/work/checkvms.1
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%LOCALBASE%%|/usr/local|;'                                                                               -e 's|%%PORTSDIR%%|/usr/ports|;'  /usr/ports/java/javavmwrapper/src/javavm.1 > /                                                                             usr/ports/java/javavmwrapper/work/javavm.1
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%LOCALBASE%%|/usr/local|;'                                                                               -e 's|%%PORTSDIR%%|/usr/ports|;'  /usr/ports/java/javavmwrapper/src/manvm.1 > /u                                                                             sr/ports/java/javavmwrapper/work/manvm.1
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%LOCALBASE%%|/usr/local|;'                                                                               -e 's|%%PORTSDIR%%|/usr/ports|;'  /usr/ports/java/javavmwrapper/src/registervm.1                                                                              > /usr/ports/java/javavmwrapper/work/registervm.1
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%LOCALBASE%%|/usr/local|;'                                                                               -e 's|%%PORTSDIR%%|/usr/ports|;'  /usr/ports/java/javavmwrapper/src/javavm_opts.                                                                             conf.5 > /usr/ports/java/javavmwrapper/work/javavm_opts.conf.5
/usr/bin/sed -e 's|%%PREFIX%%|/usr/local|;'  -e 's|%%LOCALBASE%%|/usr/local|;'                                                                               -e 's|%%PORTSDIR%%|/usr/ports|;'  /usr/ports/java/javavmwrapper/src/javavms.5 >                                                                              /usr/ports/java/javavmwrapper/work/javavms.5
```


----------



## fred974 (Jul 30, 2012)

```
===>  Installing for javavmwrapper-2.3.5
===>   Generating temporary packing list
===>  Checking if java/javavmwrapper already installed
install  -o root -g wheel -m 555 /usr/ports/java/javavmwrapper/work/classpath.sh                                                                              /usr/local/bin/classpath
install  -o root -g wheel -m 555 /usr/ports/java/javavmwrapper/work/javavmwrappe                                                                             r.sh /usr/local/bin/javavm
/bin/ln -sf /usr/local/bin/javavm /usr/local/bin/registervm
/bin/ln -sf /usr/local/bin/javavm /usr/local/bin/unregistervm
/bin/ln -sf /usr/local/bin/javavm /usr/local/bin/checkvms
/bin/ln -sf /usr/local/bin/javavm /usr/local/bin/manvm
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/work/checkvms.1 /                                                                             usr/local/man/man1
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/work/javavm.1 /us                                                                             r/local/man/man1
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/work/manvm.1 /usr                                                                             /local/man/man1
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/work/registervm.1                                                                              /usr/local/man/man1
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/work/registervm.1                                                                               /usr/local/man/man1/unregistervm.1
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/work/javavm_opts.                                                                             conf.5 /usr/local/man/man5
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/work/javavms.5 /u                                                                             sr/local/man/man5
install  -o root -g wheel -m 444 /usr/ports/java/javavmwrapper/files/javavm_opts                                                                             .conf.dist  /usr/local/etc/javavm_opts.conf.dist
/usr/bin/env PKG_PREFIX=/usr/local /bin/sh /usr/ports/java/javavmwrapper/work/pk                                                                             g-install javavmwrapper-2.3.5  POST-INSTALL
===>   Compressing manual pages for javavmwrapper-2.3.5
===>   Registering installation for javavmwrapper-2.3.5
===>   Returning to build of diablo-jdk-1.6.0.07.02_19
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/share/java/zi - not                                                                              found
===>    Verifying install for /usr/local/share/java/zi in /usr/ports/java/java-z                                                                             oneinfo
===>  License check disabled, port has not defined LICENSE
===>  Extracting for java-zoneinfo-2012.c
=> SHA256 Checksum OK for javazi-2012c.tar.gz.
===>  Patching for java-zoneinfo-2012.c
===>  Configuring for java-zoneinfo-2012.c
===>  Installing for java-zoneinfo-2012.c
===>   Generating temporary packing list
===>  Checking if java/java-zoneinfo already installed
/bin/mkdir -p /usr/local/share/java/zi
(cd /usr/ports/java/java-zoneinfo/work/zi && /bin/sh -c '(/usr/bin/find -d $0 $2                                                                              | /usr/bin/cpio -dumpl $1 >/dev/null  2>&1) &&  /usr/sbin/chown -R root:wheel $                                                                             1 &&  /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; &&  /usr/bin/find                                                                              -d $0 $2 -type f -exec chmod 444 $1/{} \;' -- \* /usr/local/share/java/zi/)
===>   Registering installation for java-zoneinfo-2012.c
===>   Returning to build of diablo-jdk-1.6.0.07.02_19
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             i.pc - found
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             p.pc - found
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             t.pc - found
===>   diablo-jdk-1.6.0.07.02_19 depends on file: /usr/local/libdata/pkgconfig/x                                                                             tst.pc - found
Updating time zones...done
===>   Generating temporary packing list
===>  Checking if java/diablo-jdk16 already installed
/bin/mkdir -p "/usr/local/diablo-jdk1.6.0"
cd "/usr/ports/java/diablo-jdk16/work/diablo-jdk1.6.0_07" && /usr/bin/find .  |                                                                              /usr/bin/cpio -pdmu -R root:wheel "/usr/local/diablo-jdk1.6.0"
308079 blocks
install  -o root -g wheel -m 444 /usr/ports/java/diablo-jdk16/files/cacerts  /us                                                                             r/local/diablo-jdk1.6.0/jre/lib/security/cacerts
# Register the VM
"/usr/local/bin/registervm"  "/usr/local/diablo-jdk1.6.0/bin/java # DiabloCaffe1                                                                             .6.0"
# Install the shared archives and plugin
/usr/bin/env PKG_PREFIX="/usr/local" /bin/sh /usr/ports/java/diablo-jdk16/work/p                                                                             kg-install diablo-jdk-1.6.0.07.02_19 POST-INSTALL
===>   Registering installation for diablo-jdk-1.6.0.07.02_19
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/diablo-jdk1.6.0/jre/lib/i386/native_threads/libhpi.so
/usr/local/diablo-jdk1.6.0/jre/lib/i386/client/libjvm.so
/usr/local/diablo-jdk1.6.0/jre/lib/i386/libnio.so
/usr/local/diablo-jdk1.6.0/bin/javaws
/usr/local/diablo-jdk1.6.0/jre/lib/i386/libdt_socket.so
/usr/local/diablo-jdk1.6.0/jre/lib/i386/libnet.so
/usr/local/diablo-jdk1.6.0/jre/lib/i386/server/libjvm.so
/usr/local/diablo-jdk1.6.0/jre/bin/javaws

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.FreeBSDFoundation.org/downloads/java.shtml
===>  Cleaning for compat7x-i386-7.3.703000.201008_1
===>  Cleaning for javavmwrapper-2.3.5
===>  Cleaning for java-zoneinfo-2012.c
===>  Cleaning for diablo-jdk-1.6.0.07.02_19
freebsd#
freebsd# java -version
java: Command not found.
freebsd#
```


----------



## pkubaj (Jul 30, 2012)

Try 
`$ /usr/local/diablo-jdk1.6.0/bin/java -version`


----------



## fred974 (Jul 30, 2012)

Yeaaa!

I have java finally installed.. does the version look correct to you guys?

```
freebsd# /usr/local/diablo-jdk1.6.0/bin/java -version
java version "1.6.0_07"
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
freebsd#
```


----------



## OH (Jul 30, 2012)

fred974 said:
			
		

> Yeaaa!
> 
> I have java finally installed.. does the version look correct to you guys?



Like plamaiziere [post=185116]wrote[/post], you should now procede to building and installing java/openjdk6


----------



## fred974 (Jul 30, 2012)

Thank you OH, I didn't realised that i missed a step.

Thank you


----------



## fred974 (Jul 31, 2012)

I get the following when installing java/jdk16
any idea why?

Sorry but I'm in the early days in learning freebsd



```
/: write failed, filesystem is full
org/omg/DynamicAny/_DynArrayStub.java: Write to restore size failed
org/omg/DynamicAny/DynArrayHelper.java: Write to restore size failed
org/omg/DynamicAny/DynArray.java: Write to restore size failed
org/omg/DynamicAny/DynArrayOperations.java: Write to restore size failed
org/omg/DynamicAny/DynValueCommon.java: Write to restore size failed
org/omg/DynamicAny/DynValueCommonOperations.java: Write to restore size failed
org/omg/DynamicAny/_DynValueStub.java: Write to restore size failed
org/omg/DynamicAny/DynValueHelper.java: Write to restore size failed
org/omg/DynamicAny/DynValue.java: Write to restore size failed
org/omg/DynamicAny/DynValueOperations.java: Write to restore size failed
org/omg/DynamicAny/DynValueBox.java: Write to restore size failed
org/omg/DynamicAny/DynValueBoxOperations.java: Write to restore size failed
org/omg/DynamicAny/_DynAnyFactoryStub.java: Write to restore size failed
org/omg/DynamicAny/DynAnyFactoryHelper.java: Write to restore size failed
org/omg/DynamicAny/DynAnyFactory.java: Write to restore size failed
org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java: Write t                                                                             o restore size failed
org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java: Write to rest                                                                             ore size failed
org/omg/DynamicAny/DynAnyFactoryOperations.java: Write to restore size failed
tar: (Empty error message)
tar: Error exit delayed from previous errors.
gmake[3]: *** [initial-image-jdk] Error 1
gmake[3]: Leaving directory `/usr/ports/java/jdk16/work/j2se/make'
gmake[2]: *** [j2se-build] Error 2
gmake[2]: Leaving directory `/usr/ports/java/jdk16/work/control/make'
gmake[1]: *** [generic_debug_build] Error 2
gmake[1]: Leaving directory `/usr/ports/java/jdk16/work/control/make'
gmake: *** [debug_build] Error 2
*** Error code 2

Stop in /usr/ports/java/jdk16.
*** Error code 1

Stop in /usr/ports/java/jdk16.
```


----------



## OH (Jul 31, 2012)

```
/: write failed, filesystem is full
```
This means you're out of HD space on partition /.

A list of partitions and how much space you have on each one (in human readable format):
`$ df -h`


----------



## wblock@ (Jul 31, 2012)

```
/: write failed, filesystem is full
```

Out of disk space.  Make some room by deleting files.  distfiles for ports that have already been installed are one possibility.


----------



## fred974 (Jul 31, 2012)

cool thank you guys.
I'll be away for a few days but i'll get back on my progress...
Thank you for your support

Fred


----------

