Skip to content

Commit

Permalink
Bump to Java 9
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed Nov 20, 2018
1 parent 41c5c12 commit 4612949
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 36 deletions.
14 changes: 9 additions & 5 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
MOVE bin\* %LIBRARY_BIN%
MOVE include\* %LIBRARY_INC%
MOVE jre %LIBRARY_PREFIX%\jre
MOVE lib\* %LIBRARY_LIB%
MOVE src.zip %LIBRARY_PREFIX%\jre\src.zip
XCOPY bin\* %LIBRARY_BIN% /s /i /y
if errorlevel 1 exit 1

XCOPY include\* %LIBRARY_INC% /s /i /y
if errorlevel 1 exit 1

XCOPY lib\* %LIBRARY_LIB% /s /i /y
if errorlevel 1 exit 1


:: ensure that JAVA_HOME is set correctly
mkdir %PREFIX%\etc\conda\activate.d
Expand Down
26 changes: 10 additions & 16 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
#!/bin/bash -euo

chmod +x bin/*
chmod +x jre/bin/*
mv bin/* $PREFIX/bin/
ls -la $PREFIX/bin

mv include/* $PREFIX/include
if [ -e jre/lib/jspawnhelper ]; then
chmod +x jre/lib/jspawnhelper
if [ -e ./lib/jspawnhelper ]; then
chmod +x ./lib/jspawnhelper
fi

if [[ `uname` == "Linux" ]]
then
mv lib/amd64/jli/*.so lib
mv lib/amd64/*.so lib
rm -r lib/amd64
# libnio.so does not find this within jre/lib/amd64 subdirectory
cp jre/lib/amd64/libnet.so lib
mv lib/jli/*.so lib

# include dejavu fonts to allow java to work even on minimal cloud images where these fonts are missing
# (thanks to @chapmanb)
mkdir -p jre/lib/fonts
cd jre/lib/fonts
# Include dejavu fonts to allow java to work even on minimal cloud
# images where these fonts are missing (thanks to @chapmanb)
mkdir -p lib/fonts
cd lib/fonts
curl -L -O -C - http://sourceforge.net/projects/dejavu/files/dejavu/2.36/dejavu-fonts-ttf-2.36.tar.bz2
tar -xjvpf dejavu-fonts-ttf-2.36.tar.bz2
mv dejavu-fonts-ttf-*/ttf/* .
rm -rf dejavu-fonts-ttf-*
cd ../../../
cd ../../
fi

mv jre $PREFIX/
mv lib/* $PREFIX/lib
mv src.zip $PREFIX/jre/

# ensure that JAVA_HOME is set correctly
# Ensure that JAVA_HOME is set correctly
mkdir -p $PREFIX/etc/conda/activate.d
mkdir -p $PREFIX/etc/conda/deactivate.d
cp $RECIPE_DIR/scripts/activate.sh $PREFIX/etc/conda/activate.d/java_home.sh
Expand Down
14 changes: 7 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Based on recipes from birdhouse and anaconda channel.

{% set name = "openjdk" %}
{% set version = "8.0.144" %}
{% set zulu_build = "8.23.0.3" %}
{% set build_number = 2 %}
{% set sha256_linux = "7e6284739c0e5b7142bc7a9adc61ced70dc5bb26b130b582b18e809013bcb251" %}
{% set sha256_osx = "ff533364c9cbd3b271ab5328efe28e2dd6d7bae5b630098a5683f742ecf0709d" %}
{% set sha256_win = "f1d9d3341ef7c8c9baff3597953e99a6a7c64f8608ee62c03fdd7574b7655c02" %}
{% set version = "9.0.7" %}
{% set zulu_build = "9.0.7.1" %}
{% set build_number = 0 %}
{% set sha256_linux = "45f2dfbee93b91b1468cf81d843fc6d9a47fef1f831c0b7ceff4f1eb6e6851c8" %}
{% set sha256_osx = "4b1f8529ff3a8bebc974e2a22395cb27ad8750e386c8c4d1b0a1b16f89cfcf66" %}
{% set sha256_win = "75f76c53c6a1f12b1a571b86bd9708ab75adf582d689dddc94fdd77dcc0f3f5c" %}

package:
name: {{ name|lower }}
Expand All @@ -31,7 +31,6 @@ requirements:
build:
- curl


test:
files:
- test-jni # [not win]
Expand All @@ -55,3 +54,4 @@ extra:
- johanneskoester
- sodre
- mingwandroid
- hadim
1 change: 1 addition & 0 deletions recipe/run_test.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
IF NOT "%JAVA_HOME%" == "%PREFIX%\Library" exit 1

pushd test-nio
java -version
javac TestFilePaths.java
jar cfm TestFilePaths.jar manifest.mf TestFilePaths.class
java -jar TestFilePaths.jar TestFilePaths.java
Expand Down
9 changes: 1 addition & 8 deletions recipe/scripts/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ export JAVA_HOME_CONDA_BACKUP=${JAVA_HOME:-}
export JAVA_HOME=$CONDA_PREFIX

export JAVA_LD_LIBRARY_PATH_BACKUP=${JAVA_LD_LIBRARY_PATH:-}

os=$(uname -s | tr '[:upper:]' '[:lower:]')
if [[ $os == 'darwin' ]]; then
export JAVA_LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/server
else
export JAVA_LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server
fi

export JAVA_LD_LIBRARY_PATH=$JAVA_HOME/lib/server

0 comments on commit 4612949

Please sign in to comment.