Skip to content
Advertisement

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_jni/src/Makefile.am And now it fails with: Answer I downloaded JDK for ARM 32 bits and

how to change springboot application start directory?

I run a springboot application as service on CENTOS7. The default start directory is “/”, now I want change to “/home/centos/fpcyproxy” where the configuration file is in. How to change it? logging file: content of the service configuration file: OS version: Java version: Answer If you are talking about homedir for application – try to set WorkingDirectory property: But if

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 the JNA to get PID This way

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 Computer? If yes,

can FileOutputStream.flush() guarantee that other processes can read the file content consistently?

I have a java process A that calls FileOutputStream.flush() to flush the content, and have another process B to read the file content. In most cases, the process B reads the content fine. However, sometimes B reports getting incorrect content. My question is, if the writer process crashes right after calling FileOutputStream.flush() before calling FileOutputStream.close(), can the java runtime guarantee

Kafka – Broker: Group coordinator not available

I have the following structure: Created topic with replication factor 3 and partitions 3 by kafka-topics shell script. And use group localConsumers. it works fine when leader is ok. Consumers’ log But if leader is down – I get the error in consumer (systemctl stop kafka): Node 3 is unavailable. ok Consumers’ log Consumer unable to connect until leader is

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 it, which is ulimit. The -n is

Advertisement