java applications and stdin

Duss Pirmin pirmin.duss at gapfruit.com
Mon Oct 21 11:01:20 CEST 2019


Hello Genodians

I'm trying to use the stdin file descriptor in a java application to
pass data through a terminal to the application.

When the application tries to read from the file descriptor, I get the
following error message:
[init -> init -> java] Error: no plugin found for read(0)

If is start a libc component instead of java, there is no error message
and the component can read from stdio.


In the <start> node of the java application I have the following
<config> node:

<config ld_verbose="no">
	<arg value="/bin/java" />
	<!--
	<arg value="-XX:+NeverActAsServerClassMachine"/>
	<arg value="-XX:+UnlockDiagnosticVMOptions"/>
	<arg value="-XX:-ImplicitNullChecks"/>
	<arg value="-XX:+CITime"/>
	-->
	<arg value="-Xint"/>
	<arg value="-jar"/>
	<arg value="app.jar"/>
	<libc stdin="/dev/terminal" stdout="/dev/terminal" stderr="/dev/log"
rtc="/dev/rtc"/>
	<vfs rtc="/dev/rtc">
		<dir name="dev">
			<log/><null/><inline name="rtc">2000-01-01 00:00</inline>
			<terminal label="terminal"/>
		</dir>
		<dir name="bin">
			<rom name="java"/>
		</dir>
		<dir name="lib">
			<rom name="java.lib.so"/>
			<inline name="jvm.cfg">-server KNOWN
-client IGNORE
			</inline>
			<dir name="server">
				<rom name="jvm.lib.so"/>
			</dir>
		</dir>
		<dir name="modules">
			<tar name="classes.tar"/>
		</dir>
		<tar name="app.tar"/>
		<rom name="zip.lib.so"/>
		<rom name="nio.lib.so"/>
		<rom name="net.lib.so"/>
	</vfs>
</config>

Can anybody help me getting this to work?


Best regards, Pirmin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.genode.org/pipermail/users/attachments/20191021/9b54d57b/attachment.sig>


More information about the users mailing list