Skip to content
Advertisement

Tag: linux

How does java guarateee reserved memory

Checking for memory usage by stack using this command: I can see that reserved memory is different from committed. Reserved is about 1MB (default for stack). Committed in fact is physical reserved. I read that java save memory for stack while is not totally used. Running command like top I can see just committed usage. What does java/SO do in

Program to find from where the program is called

The requirement is very simple, I want to write a simple hello world program or anything so the program knows about its execution parent. For eg. Since I am from a Java background I will give a Java example. I want to write a jar that runs and outputs the following: Running from command line: but when running from myscript.sh:

Unable to get PATH to be set for all users

Trying to get OpenJDK 17 installed for Pufferpanel. User pi can do java -version fine however Pufferpanel gets bash: java: command not found My /etc/profile and /etc/profile.d/java.sh have these lines: In addition JAVA_HOME=”/usr/lib/jvm/jdk-17.0.1+12″ is set in /etc/environment Full permissions have been given for java.sh and the JAVA_HOME folder with chmod 777. The user pufferpanel now can run the script however

Installing jenkins on Linux Mint 20.2

I’ve Linux Mint 20.2 Cinnamon and I tried to install jenkins. Detailed steps for installation is as below: 1. Installing java – installed via apt I’ve also added JAVA_HOME in ~/.zshrc which gives: 2. Installing jenkins I’ve tried with different versions of java, yet the same error. What am I doing wrong? Related solutions that I tried, but failed: [1],

Why after that I quit a Spring Boot application in a Linux shell (by CTRL+Z) a process still listen on the 8080 port? (the port used by my application

I am working on a Spring Boot application running it on a Linux machine. It is a batch application containing Spring Boot Admin tool listening on the 8080 port. I have the following “problem”: I run it into my shell for the first time using this command: it correctly start and I can access to the Spring Boot Admin tool

JDK11 getFreeSpace and getTotalSpace from File is not matching df

I am seeing df -h giving output like below But if I do the same from java like below It is printing like below Can someone let me know why is this discrepancy in disk utilization? Environment Ubuntu 18.04 Java – Zulu OpenJDK 11.0.11 Answer As I also mentioned in the comments, the primary reason is that getFreeSpace seems to

Java SIGSEGV error when running from docker

I have no experience in Java and I can run my code successfully from the development. But only when I built the project and runs it from docker, I got an error like this. I have followed the error message to use ulimit -c unlimited by adding it in the docker command: docker run –ulimit core=-1 –env-file -t my_project but

Could not load FFI provider when using module-info.java

my Linux Java application uses bluetooth devices. I use this library in order to communicate with bluez stack : https://github.com/hypfvieh/bluez-dbus. It worked very well until I added module-info.java to my client code. Suddenly I got this error: Exception in thread “main” java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider at jnr.ffi@2.1.15/jnr.ffi.provider.InvalidRuntime.newLoadError(InvalidRuntime.java:101) at jnr.ffi@2.1.15/jnr.ffi.provider.InvalidRuntime.findType(InvalidRuntime.java:42) at jnr.ffi@2.1.15/jnr.ffi.Struct$NumberField.(Struct.java:872) at jnr.ffi@2.1.15/jnr.ffi.Struct$Unsigned16.(Struct.java:1240) at jnr.unixsocket@0.33/jnr.unixsocket.SockAddrUnix$DefaultSockAddrUnix.(SockAddrUnix.java:209) at jnr.unixsocket@0.33/jnr.unixsocket.SockAddrUnix.create(SockAddrUnix.java:174)

How to fix a java.lang.UnsatisfiedLinkError for JSSC? (Needs hard float?)

I have a Java application in a JAR that needs to communicate via serial using JSSC (On Ubuntu in a SOPine board). It is throwing the following java.lang.UnsatisfiedLinkError exception: TL;DR: Skip to the answer if you don’t want to read several day’s worth of troubleshooting. I exported my JAR file in Eclipse with the jssc.jar added to the project’s Java

Advertisement