Java install in a Jail

Status
Not open for further replies.

Todd Sefcik

Cadet
Joined
Jan 15, 2015
Messages
3
I have looked for the past 2 days on FreeBSD and FreeNAS on how to install Java in a jail on 9.3 stable. And, Have not found a JRE/JDK that works. Guides written for 9.1 and for minecraft and all the other flavors I can not get a complete 'make' to install Java.

My goal is to get Java installed in a Jail and then install 'openHAB' in that Jail. But, I am not well versed in 'make' installs in Linux to get past the last error.

And, I could be trying to do this the whole wrong way please let me know.

Hopefully, Someone can get me around this problem.
I am using this port as a base because it is the closest to installing Java: http://www.freshports.org/java/openjdk7

Code:
root@openHAB:/usr/ports/java/openjdk7 # cd /usr/ports/java/openjdk7/ && make install clean
===>  Patching for openjdk-7.65.17,1
===>   Converting DOS text files to UNIX text files
===>  Applying FreeBSD patches for openjdk-7.65.17,1
Ignoring previously applied (or reversed) patch.
4 out of 4 hunks ignored--saving rejects to jdk/src/share/classes/sun/applet/AppletPanel.java.rej
Ignoring previously applied (or reversed) patch.
4 out of 4 hunks ignored--saving rejects to jdk/src/share/classes/sun/applet/AppletViewerPanel.java.rej
=> Patch patch-icedtea-web failed to apply cleanly.
*** [do-patch] Error code 1

Stop in /usr/ports/java/openjdk7.
*** [install] Error code 1

Stop in /usr/ports/java/openjdk7.
root@openHAB:/usr/ports/java/openjdk7 #

root@openHAB:/usr/ports/java/openjdk7 # pkg install java/openjdk7
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 28 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        openjdk: 7.65.17,1
        libXtst: 1.2.2_2
        recordproto: 1.14.2
        libXi: 1.7.4,1
        xproto: 7.0.26
        libXfixes: 5.0.1_2
        libX11: 1.6.2_2,1
        libxcb: 1.10_2
        libXdmcp: 1.1.1_2
        libXau: 1.0.8_2
        libxml2: 2.9.1_1
        libpthread-stubs: 0.3_5
        kbproto: 1.0.6
        fixesproto: 5.0
        libXext: 1.3.2_2,1
        xextproto: 7.3.0
        inputproto: 2.3.1
        libXrender: 0.9.8_2
        renderproto: 0.11.1
        libXt: 1.1.4_2,1
        libSM: 1.2.2_2,1
        libICE: 1.0.9,1
        fontconfig: 2.11.0_3,1
        freetype2: 2.5.3_2
        java-zoneinfo: 2014.e
        dejavu: 2.34_4
        javavmwrapper: 2.5
        alsa-lib: 1.0.28

The process will require 189 MB more space.
56 MB to be downloaded.

Proceed with this action? [y/N]: y
pkg: http://pkg.FreeBSD.org/freebsd:9:x86:64/latest/All/openjdk-7.65.17,1.txz: Not Found



Thanks in advanced.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
My goal is to get Java installed in a Jail and then install 'openHAB' in that Jail. But, I am not well versed in 'make' installs in Linux to get past the last error.

Great. Because this isn't Linux. :)

Any reason you don't just use pkg-ng?
 
D

dlavigne

Guest
You did the correct commands for both the port and the package. It looks like there isn't a package at the moment, most likely because the port won't build (this happens occasionally). A couple of things to check:

- make sure you have the most recent version of the ports tree (in case the build has been fixed) by running portsnap fetch update
- before retrying the build, make sure the build env is clean (rm -Rf work within the port's directory)
- if it still fails, see if you have any better luck with v8 (/usr/ports/java/openjdk8/)
 

dschoorisse

Cadet
Joined
Nov 5, 2014
Messages
4
There seems to be a working package again. I just successfully installed OpenJDK with the pkg command.

Code:
//Install java
#pkg install java/openjdk7

//Test Java
#java -version


Edit: I'm trying to build an OpenHAB installation in a FreeBSD jail on top of FreeNAS too. I have installed openHab with these commands, maybe it's helpful for you or anyone reading this thread. I used curl because wget isn't installed in the jail by default, and curl is.

Code:
# curl -OL https://github.com/openhab/openhab/releases/download/v1.6.2/distribution-1.6.2-runtime.zip
# unzip -d openhab distribution-1.6.2-runtime.zip

//Launch OpenHAB
#openhab/start.sh 
 
Last edited:

centex99

Dabbler
Joined
Jul 29, 2012
Messages
45
So to the two of you running openhab in freenas... I got the jail setup (used the freebsd vs linux, seems to run ok...
How do you get the serial port to work... when I plug my z-wave adapter in, it seems to come up as ttyU0... however, when I try to set that as the adapter, it complains that the port doesn't exist.

Thanks!
 

n3mmr

Explorer
Joined
Jan 7, 2015
Messages
82
Can java/openjdk7 coexist with openjdk8 inside a single Jail in FreeBSD/FreeNAS??

And if so, how do you switch??
 
Status
Not open for further replies.
Top