Unix Domain Sockets in Java 7 and newer (AF_UNIX), AF_TIPC, AF_VSOCK, and more
APACHE-2.0 License
Users of junixsocket are strongly advised to upgrade to version 2.10.1 or newer (changelog)
junixsocket is a Java/JNI library that allows the use of Unix Domain Sockets (AF_UNIX sockets), and other address/protocol families (such as AF_TIPC, AF_VSOCK, and AF_SYSTEM), from Java.
java.net.Socket
, java.net.SocketChannel
, etc.)*
(Tested up to Java 24; basic support for Java 7 was dropped in version 2.5.0 and reintroduced in version 2.8.0).
org.newsclub.net.unix.demo
)org.newsclub.net.unix.demo.rmi
and org.newsclub.net.unix.demo.rmi.services
)org.newsclub.net.mysql.demo
)org.newsclub.net.unix.demo.jdbc
)org.newsclub.net.unix.demo.mina
)org.newsclub.net.unix.demo.nanohttpd
)org.newsclub.net.unix.demo.netty
)org.newsclub.net.unix.demo.okhttp
)org.newsclub.net.unix.demo.ssl
)junixsocket is released under the Apache 2.0 License.
Commercial support is available through Kohlschütter Search Intelligence.
To verify that the software works as expected on your platform, you can run the junixsocket-selftest program, which is located in the "junixsocket-dist" distribution package, and also released on GitHub.
java -jar junixsocket-selftest-VERSION-jar-with-dependencies.jar
(with VERSION being the corresponding junixsocket version).
To include the core junixsocket functionality in your project, add the following Maven dependency
NOTE Since version 2.4.0,
junixsocket-core
is POM-only (that's why you need to specify<type>pom</type>
)
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-core</artifactId>
<version>2.10.1</version>
<type>pom</type>
</dependency>
While you should definitely pin your dependency to a specific version, you are very much encouraged to keep updating to the most recent version. Check back frequently.
For more, optional packages (RMI, MySQL, Jetty, TIPC, VSOCK, server, Darwin, SSL, GraalVM, etc.) and Gradle instructions see here
When you're testing a -SNAPSHOT
version, make sure that the Sonatype snapshot repository is
enabled in your POM:
<repositories>
<repository>
<id>sonatype.snapshots</id>
<name>Sonatype snapshot repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
To update to the latest SNAPSHOT (which is currently not being built for every commit), run the following command from within your own project:
mvn -U dependency:resolve
or (for Gradle)
./gradlew refreshVersions