Skip to content

Tag: java

Jlibfprint cross compilation

I’m trying to cross-compile the JNI Bridge Jlibfprint using buildroot. This is the source code. Here is the .mk file: Extract, Patch, Update, Configure, Autoreconfiguring, Patching libtool run without problem. Then it failed at Building stage with this: Then I added, these includes to the /JlibFprint_jn…

Parse command `watch` with `InputStream`

I have this command: How I can to parse output from this command? When I get InputStream of this Process, I get an empty line every time. — I used to restart the command via Java, creating a new thread and all over again. Now, I decided to implement it with the help of watch. Snippet of code: Answer A

How to get PID of java.lang.Process in linux by JAVA

I think out two method to resolve this question but they can’t reach the expectation . I use the ‘Process’ to exec “ps -ef” I can through this method to get all lines and I can filter them by my running command.But If I have many same command process.This isn’t work. I use …

Send Commands remotely from Windows to Linux through Java

I searched everywhere but can’t find a solution that works. I have a Linux Debian machine in my network, which is running as a Mqtt Broker. I want to write a java programm to send sub and pub commands to the broker from another computer (Windows). Is there a way to send Linux commands from a Windows Com…

linux ulimit with java does not work properly

I run code on linux ubuntu 17.10 this code returns “unlimited” but whenever I run command from terminal I get 1024. Why those numbers are different? Answer You get the same result if you run the same command from the command line: This is because -c only looks at the argument immediately following…