.\" Copyright (c) 2003-2012
.\" Distributed Systems Software.  All rights reserved.
.\" See the file LICENSE for redistribution information.
.\" $Id: copyright-nr 2564 2012-03-02 00:17:08Z brachman $
'\" t
.\"     Title: dacs.java
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 08/23/2020
.\"    Manual: DACS Miscellaneous Information Manual
.\"    Source: DACS 1.4.40
.\"  Language: English
.\"
.TH "DACS\&.JAVA" "7" "08/23/2020" "DACS 1.4.40" "DACS Miscellaneous Information"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
dacs.java \- \fBDACS\fR Java support
.SH "DESCRIPTION"
.PP
This document describes support for Java provided by
\fBDACS\fR\&.
.PP
To enable Java support,
\fBDACS\fR
must be configured using the
\fB\-\-enable\-java\fR
flag\&. It may also be necessary to specify the location of the Java commands and include files\&. See
\m[blue]\fBdacs\&.install(7)\fR\m[]\&\s-2\u[1]\d\s+2\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
Java support is currently very limited and should be considered experimental\&. It is currently only possible to call
\m[blue]\fBdacsauth(1)\fR\m[]\&\s-2\u[2]\d\s+2
and
\m[blue]\fBdacscheck(1)\fR\m[]\&\s-2\u[3]\d\s+2
using the Java Native Interface (JNI) provided\&. The command line arguments to both of these commands are exactly as documented in their manual pages\&. Each argument is passed as a
\fBString\fR\&.
.PP
The code is not thread\-safe and is probably not suitable for being called many times within a particular process due to assumptions it makes about dynamic memory allocation\&.
.PP
There are no immediate plans to improve or extend Java support\&. Using the existing capability to build the JNI layer, however, it should not be difficult for an experienced Java programmer to build upon the example Java code provided\&.
.sp .5v
.RE
.PP
With Java support enabled, building
\fBDACS\fR
will copy the JNI shared library and a
\&.jar
file to the library directory (default:
/usr/local/dacs/lib), and the JNI include files to the include directory (default:
/usr/local/dacs/include)\&.
.PP
The
tools/java/jni
distribution directory contains a simple script called
\fBjavarun\fR
that demonstrates how to run
\fBdacsauth\fR
or
\fBdacscheck\fR
as a Java application\&. For example, to validate the Unix password for user
\fIsomebody\fR, run (as
root):
.sp
.if n \{\
.RS 4
.\}
.nf
\&./javarun dacsauth \-m unix suff \-user \fIsomebody\fR \-prompt
.fi
.if n \{\
.RE
.\}
.sp
.SH "DIAGNOSTICS"
.PP
The return codes are as documented in the command\*(Aqs manual page\&.
.SH "AUTHOR"
.PP
Distributed Systems Software (\m[blue]\fBwww\&.dss\&.ca\fR\m[]\&\s-2\u[4]\d\s+2)
.SH "COPYING"
.PP
Copyright \(co 2003\-2012 Distributed Systems Software\&. See the
\m[blue]\fBLICENSE\fR\m[]\&\s-2\u[5]\d\s+2
file that accompanies the distribution for licensing information\&.
.SH "NOTES"
.IP " 1." 4
dacs.install(7)
.RS 4
\%http://dacs.dss.ca/man/dacs.install.7.html
.RE
.IP " 2." 4
dacsauth(1)
.RS 4
\%http://dacs.dss.ca/man/dacsauth.1.html
.RE
.IP " 3." 4
dacscheck(1)
.RS 4
\%http://dacs.dss.ca/man/dacscheck.1.html
.RE
.IP " 4." 4
www.dss.ca
.RS 4
\%http://www.dss.ca
.RE
.IP " 5." 4
LICENSE
.RS 4
\%http://dacs.dss.ca/man/../misc/LICENSE
.RE
