Skip to content

Commit 4ce2835

Browse files
authored
Merge pull request #122 from jasonsoooz/patch-1
Mention possibility of running java in README
2 parents 5d41d41 + d42a2a9 commit 4ce2835

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ documentation whether it can be achieved by using libfaketime directly.
7070
intercept by removing the -DPTHREAD_SINGLETHREADED_TIME from the Makefile and
7171
rebuilding libfaketimeMT.so.1
7272

73-
* Java-/JVM-based applications and others with a complex run-time environment
74-
are known to not, or not reliably, work with libfaketime.
73+
* Java-/JVM-based applications work but you need to pass in an extra argument
74+
(DONT_FAKE_MONOTONIC). See usage basics below for details. Without this
75+
argument the java command usually hangs.
7576

7677
* libfaketime will eventually be bypassed by applications that dynamically load
7778
system libraries, such as librt, explicitly themselves instead of relying on
@@ -139,6 +140,12 @@ Tue Nov 23 12:01:05 CEST 2016
139140
user@host> LD_PRELOAD=/usr/local/lib/libfaketime.so.1 FAKETIME="-15d" date
140141
Mon Nov 8 12:01:12 CEST 2016
141142

143+
user@host> LD_PRELOAD=/usr/local/lib/libfaketime.so.1 FAKETIME="-15d"
144+
DONT_FAKE_MONOTONIC=1 java -version
145+
java version "1.8.0_111"
146+
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
147+
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
148+
142149
The basic way of running any command/program with libfaketime enabled is to
143150
make sure the environment variable LD_PRELOAD contains the path and
144151
filename of the libfaketime library. This can either be done by setting it once

0 commit comments

Comments
 (0)