From nobody Tue Oct 12 09:48:06 2021 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 29C7F12DB678 for ; Tue, 12 Oct 2021 09:48:18 +0000 (UTC) (envelope-from list-freebsd-questions@jyborn.se) Received: from mailgate.leissner.se (mailgate.leissner.se [IPv6:2a02:920:3035::210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mailgate.leissner.se", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HT9p904PYz4SDv for ; Tue, 12 Oct 2021 09:48:16 +0000 (UTC) (envelope-from list-freebsd-questions@jyborn.se) Received: from mailgate.leissner.se (localhost [127.0.0.1]) by mailgate.leissner.se (8.16.1/8.16.1) with ESMTPS id 19C9m79R086273 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 12 Oct 2021 11:48:07 +0200 (CEST) (envelope-from list-freebsd-questions@jyborn.se) Received: (from uucp@localhost) by mailgate.leissner.se (8.16.1/8.16.1/Submit) id 19C9m76a086272 for ; Tue, 12 Oct 2021 11:48:07 +0200 (CEST) (envelope-from list-freebsd-questions@jyborn.se) Received: from pol.leissner.se(192.71.29.17), claiming to be "pol-server.leissner.se" via SMTP by mailgate.leissner.se, id smtpdjHHRaj; Tue Oct 12 11:48:06 2021 Received: from pol-server.leissner.se (localhost [127.0.0.1]) by pol-server.leissner.se (8.16.1/8.16.1) with ESMTP id 19C9m6rM028686 for ; Tue, 12 Oct 2021 11:48:06 +0200 (CEST) (envelope-from list-freebsd-questions@jyborn.se) Received: (from pol@localhost) by pol-server.leissner.se (8.16.1/8.16.1/Submit) id 19C9m6kY028685 for questions@freebsd.org; Tue, 12 Oct 2021 11:48:06 +0200 (CEST) (envelope-from list-freebsd-questions@jyborn.se) X-Authentication-Warning: pol-server.leissner.se: pol set sender to list-freebsd-questions@jyborn.se using -f Date: Tue, 12 Oct 2021 11:48:06 +0200 From: list-freebsd-questions@jyborn.se To: questions@freebsd.org Subject: Is there a way to get direct execution of java jar files in FreeBSD? Message-ID: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 4HT9p904PYz4SDv X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=jyborn.se; spf=pass (mx1.freebsd.org: domain of list-freebsd-questions@jyborn.se designates 2a02:920:3035::210 as permitted sender) smtp.mailfrom=list-freebsd-questions@jyborn.se X-Spamd-Result: default: False [-2.76 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a02:920:3035::210]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; NEURAL_HAM_SHORT(-0.96)[-0.963]; DMARC_POLICY_ALLOW(-0.50)[jyborn.se,none]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12597, ipnet:2a02:920:3000::/36, country:SE]; SUBJECT_ENDS_QUESTION(1.00)[] X-ThisMailContainsUnwantedMimeParts: N I want to start a java jar file from inetd in FreeBSD 12. It seems I need to do this with the command java -jar xxx.jar, since I can't find a way to get direct execution of jar files. The java -jar method works fine, but the problem is that xxx.jar needs to know the IP address of the connecting client, and it should get that via the function System.inheritedChannel(), but it doesn't. Could it be that the java -jar start method in inetd doesn't transfer the client socket to xxx.jar? Anyway, that's why I wonder if there is a way to start xxx.jar without java -jar. Thanks! Peter