Jump to content
  • 0

What Java modules are required to run the PZ server?


dcwaters

Question

I want to experiment with running a Project Zomboid server in a Linux Docker container. I see there are a number of images available (this one looks like the most commonly-used and straight-forward), but I'd like to make my own with as little overhead as possible. Part of that involves shrinking a JDK using jlink to only include modules that are required. Removing all the other, nonessential, Java modules can cut the size of the included Java code by more than half.

 

So, which Java modules are required to run the vanilla PZ server?

 

From what I can tell from using jdeps, that list looks like:

 

  • java.base
  • java.datatransfer
  • java.desktop
  • java.logging
  • java.management
  • java.naming
  • java.security.jgss
  • java.sql
  • jdk.unsupported
  • jdk8internals

 

Is there anything I'm missing?

 

Additionally, jdeps raises some warnings about dependencies included with Project Zomboid:

 

steamapps\common\ProjectZomboid>jdeps -jdkinternals *.jar
guava-23.0.jar -> jdk.unsupported
   com.google.common.cache.Striped64                  -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.cache.Striped64$1                -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.cache.Striped64$Cell             -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$3 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.Striped64                   -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.Striped64$1                 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.Striped64$Cell              -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
javacord-2.0.17-shaded.jar -> jdk.unsupported
   com.google.common.cache.Striped64                  -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.cache.Striped64$1                -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.cache.Striped64$Cell             -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$3 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
lwjgl-debug.jar -> jdk8internals
lwjgl-debug.jar -> jdk.unsupported
   org.lwjgl.MacOSXSysImplementation                  -> com.apple.eio.FileManager                          JDK internal API (jdk8internals)
   org.lwjgl.MemoryUtilSun$AccessorReflectFast        -> sun.reflect.FieldAccessor                          JDK internal API (jdk8internals)
   org.lwjgl.MemoryUtilSun$AccessorUnsafe             -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
lwjgl.jar -> jdk8internals
lwjgl.jar -> jdk.unsupported
   org.lwjgl.MacOSXSysImplementation                  -> com.apple.eio.FileManager                          JDK internal API (jdk8internals)
   org.lwjgl.MemoryUtilSun$AccessorReflectFast        -> sun.reflect.FieldAccessor                          JDK internal API (jdk8internals)
   org.lwjgl.MemoryUtilSun$AccessorUnsafe             -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
lwjgl_util.jar -> java.desktop
lwjgl_util.jar -> jdk.unsupported
   org.lwjgl.util.WaveData                            -> com.sun.media.sound.WaveFileReader                 JDK internal API (java.desktop)
   org.lwjgl.util.mapped.CacheLineSize                -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   org.lwjgl.util.mapped.MappedHelper                 -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   org.lwjgl.util.mapped.MappedObjectTransformer      -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)
   org.lwjgl.util.mapped.MappedObjectUnsafe           -> sun.misc.Unsafe                                    JDK internal API (jdk.unsupported)

Warning: JDK internal APIs are unsupported and private to JDK implementation that are
subject to be removed or changed incompatibly and could break your application.
Please modify your code to eliminate dependence on any JDK internal APIs.
For the most recent update on JDK internal API replacements, please check:
https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool

JDK Internal API                         Suggested Replacement
----------------                         ---------------------
sun.misc.Unsafe                          See http://openjdk.java.net/jeps/260
sun.reflect.FieldAccessor                Removed. See http://openjdk.java.net/jeps/260

Since the Tech FAQ says to make sure Java is installed on Linux, should I have any concerns about which version of Java to install to satisfy these dependencies?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...