Skip to content

Commit c277510

Browse files
costingjuztas
authored andcommitted
Fix inclusion of .dll files and use default JDK on Ubuntu, if found (#2)
1 parent bd13ecb commit c277510

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

build_apmon.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
if ! [ -d lib ]; then
44
mkdir lib
55
fi
6-
6+
7+
if [ -d /usr/lib/jvm/default-java/include ]; then
8+
export JAVA_HOME=${JAVA_HOME:=/usr/lib/jvm/default-java}
9+
fi
10+
711
cd src/apmon/util
812
if ./compile.sh; then
913
mv libnativeapm.so ../../../lib
@@ -21,10 +25,10 @@ mkdir -p build/classes
2125

2226
cd src
2327

24-
find apmon -name \*.java | xargs javac -g -d ../build/classes
28+
find apmon -name \*.java | xargs javac -g -d ../build/classes
2529

26-
mkdir -p ../../build/classes/apmon/lisa_host/Windows
27-
cp apmon/lisa_host/Windows/*.dll ../../build/classes/apmon/lisa_host/Windows/
30+
mkdir -p ../build/classes/apmon/lisa_host/Windows
31+
cp apmon/lisa_host/Windows/*.dll ../build/classes/apmon/lisa_host/Windows/
2832

2933
cd ../build/classes
3034

0 commit comments

Comments
 (0)