Questions tagged [jvm]

The Java Virtual Machine (JVM) enables a set of computer software programs and data structures to use a virtual machine model for the execution of other computer programs and scripts. Use this tag for questions dealing with tools provided by a JVM or how it works in a specific scenario.

Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

JVM and heap size in a pod on kubernetes

I have a container that has been allocated 10Gi of memory in kubernetes. Its running a spring boot java 17 application - all default parameters. My understanding is that a certain portion of the ...
user1555190's user avatar
  • 2,947
0 votes
0 answers
23 views

How to directly read keyboard presses in Kotlin?

I need a way to read keyboard presses directly, without readln() in Kotlin. For example, I found this on the Kotlin docs: https://kotlinlang.org/api/latest/jvm/stdlib/org.w3c.dom.events/-keyboard-...
ValleyDragon888's user avatar
0 votes
0 answers
27 views

How does the jvm handle the java thread throws exception

public class Hello { static class T { static { int i = 1 / 0; } static void t() { System.out.println("hello world;"); } } ...
ght ggg's user avatar
  • 39
0 votes
1 answer
22 views

Why does Apache Spark executor cause OutOfMemoryError while writing something much less than the configured memory into a file?

I am trying to diagnose an OutOfMemoryError caused by Spark executor and hope someone might be able to help me here... Configuration I am running Spark (3.1.3) with local mode on my Windows machine. ...
Yao's user avatar
  • 1
-2 votes
0 answers
18 views

Is it possible to kill the JVM when an OOME occurs in a direct buffer? [closed]

I'm using lettuce, but if OME occurs in direct buffer, the data is twisted. If OOME occurs due to direct buffer, I want to kill JVM, is there a way? -XX:+ExitOnOutOfMemoryError is being used, but it ...
user3217223's user avatar
0 votes
0 answers
30 views

A fatal error has been detected by the Java Runtime Environment: Internal Error concurrentHashTable.inline.hpp:676

I have no idea what went wrong as I've programmed in Java 17. When I run a spring-boot project, it starts normally and then suddenly goes down and now I get this error: A fatal error has been detected ...
Anli Liu's user avatar
-1 votes
0 answers
33 views

Does Splitting Methods Too Much in Java Actually Cause Memory Overhead? [closed]

I have a question while studying Java programming. I've heard that splitting methods too much in Java can lead to memory overhead, and I'm wondering if this is true. From my understanding, if a method ...
yong _ta_Park's user avatar
0 votes
1 answer
34 views

Android studio - kotlin: Inconsistent JVM-target compatibility detected for tasks 'compileJava' (21) and 'compileKotlin' (1.8)

I'm doing a project in a course for multi module project and I walked into a problem. when trying to sync the gradle it throw me the error: Execution failed for task ':buildSrc:compileKotlin'. ...
Tal Yehuda's user avatar
0 votes
0 answers
21 views

Explicit Branch-prediction in JVM-based langauges?

Is there any way for JVM-based languages to indicate to the interpreter that a branch is cold or unlikely etc.? Specifically I mean some kind of branch attribute like the Linux Kernel's unlikely() and ...
doliphin's user avatar
  • 792
-3 votes
0 answers
38 views

Out of memory java.lang.OutOfMemoryError: Java heap space [closed]

I want to develop a mod using FORGE, but I am encountering an issue with insufficient heap memory during the project build. I tried modifying the virtual machine parameters file, but it doesn’t seem ...
rechard's user avatar
1 vote
2 answers
102 views

Why can variables in Kotlin be overridden, while in Java, they cannot?

In java, variables cannot be overridden but can only be hidden. Whereas in kotlin, we can override the variables. Though they both run on JVM, why is this difference? Is it because the variables in ...
MoeJoe's user avatar
  • 21
-1 votes
0 answers
41 views

CPU performance improvement after upgrading to spring-boot-2.7.10

We have recently upgrade the spring-boot-starter-parent from 2.1.1.RELEASE to 2.7.10 version and seeing 20% improvement in overall CPU utilisation by the service. Earlier at peak traffic 95 machines ...
tusharRawat's user avatar
0 votes
0 answers
56 views

How to ensure valid path object is returned in Java

I am going through the quickstart guide in the Akka Streams docs for Scala and in one of the examples they are using Akka Streams to write to a file. import java.nio.file.Paths import scala....
T-Braico's user avatar
0 votes
0 answers
42 views

Error while building project : app:checkDebugDuplicateClasses

My project is multimodule. When I'm building the project i'm having this error: Execution failed for task ':app:mergeExtDexDebugAndroidTest'. > Could not resolve all files for configuration ':app:...
zadgee's user avatar
  • 41
-1 votes
1 answer
29 views

Does the native executable that is created by graalvm compiler includes memory management and GC?

I have been exploring graalvm and couldnt find an answer for this. Since the native executable that is created by graalvm compiler can run on any VM without Graalvm or JVM, what takes care of the ...
sm0217's user avatar
  • 1
0 votes
0 answers
28 views

How to release java objects from memory using releaseJavaObject() function

I'm trying to control a calculator interface which based on Java Oracle. My problem is the memory leakage. Let me explain what is happening. With 2 class,JabApi and JabHelpers, I'm making an object of ...
DebrumJab's user avatar
0 votes
0 answers
137 views
+500

Increase in Eden Space and Old Gen peak values

After Java 17 upgrade, JVM heap memory started to increase. When we check the memory metrics, sizes of the Eden Space and the Old Generation fluctuating and peak values are increasing. There seems no ...
hellzone's user avatar
  • 5,001
0 votes
2 answers
65 views

Java bytecode not in .class file

I'm working on a personal project just for fun, a new programming languages (just because there are not enough). I m going to make it run on JVM but I need to store some metadata in the compiled file. ...
rain 183's user avatar
0 votes
0 answers
22 views

Error Starting up Camunda Zeebe 8.3.1 with docker-compose

After i have upgraded the CAMUNDA_PLATFORM_VERSION from 8.3.0-alpha3 to 8.3.1. There is error during startup as shown: zeebe | Picked up JAVA_TOOL_OPTIONS: -Xms512m -Xmx512m zeebe | [...
Akjun's user avatar
  • 401
0 votes
0 answers
17 views

Tomcat Jmx Inegration enabling on Datadog Agent

I am trying to add Tomcat-JMX Integration to the Datadog Agent, in order to achieve Remote Monitoring . I am following the docs https://docs.datadoghq.com/containers/guide/autodiscovery-with-jmx/?tab=...
KOVAM's user avatar
  • 1
0 votes
0 answers
13 views

multi times execute SQL 'desc dataBaseName.tableName' usage much memory

I want to query hundred thousands table's column meta data in hive;after executed ten thousands,the memory come to 7G from 3g;the simple query with multi times execute,usage so much memory,and it's ...
MY J's user avatar
  • 1
1 vote
1 answer
31 views

Cassandra down, but with no info in system.log

Cassandra suddenly crashed at 9:54, but with no info after 9:52 in system.log. cassandra-system.log Our Cassandra version is 3.11.10, and we run instaclustr/cassandra-exporter as a standalone server ...
daniel's user avatar
  • 11
0 votes
0 answers
26 views

I a having this problem maing dictionary attack wifi python from android how can i fix this

I got this error trying to connect wifi using wifidroid module . I can't understand what type of problem is this. Is it termux or python or any other. code GNU nano 7.2 mywifidict....
user22980990's user avatar
1 vote
0 answers
65 views

How does java.c determine which to call since there are three function implementations for different systems in Jdk8?

What puzzles me is how it determines which to call when entering the function JVMInit(as well as LoadJavaVM) in jdk/src/share/bin/java.c since there are three function implementations in different ...
HeGotIt's user avatar
  • 11
0 votes
0 answers
44 views

Threads hang on getCallerClass (Native method)

I encountered stucked threads in tomcat logs. We use java version 7. The last 2 lines of stacktrace: Aug 30, 2023 8:09:59 PM org.apache.catalina.valves.StuckThreadDetectionValve$MonitoredThread ...
Nurzamat's user avatar
-1 votes
0 answers
36 views

Class has been compiled by a more recent version of the Java Runtime [duplicate]

com/whatsapp/api/domain/webhook/WebHookEvent has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file ...
Otabek Eshpo'latov's user avatar
0 votes
0 answers
73 views

Why AtomicLong uses putLongVolatile to set its value?

Considering this statement from Java documentation: Reads and writes are atomic for all variables declared volatile (including long and double variables). Why does AtomicLong uses some native method ...
mykola's user avatar
  • 1,746
0 votes
0 answers
34 views

What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. - Flutter app

Trying to build a flutter app after some dependency upgrades. Getting this: hat went wrong: [ ] Execution failed for task ':app:compileDebugJavaWithJavac'. [ ] > error: invalid source ...
Boon's user avatar
  • 13
0 votes
0 answers
33 views

Cannot inline bytecode built with JVM target 17

I added kotlin code into the java project and using JVM VERSION_1_8 so getting this issue "Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 1.8. ...
Mirza Shafique's user avatar
0 votes
1 answer
48 views

What would be optimal thresholds for JVM Heap Memory alerts in DataDog?

I'm working on creating Datadog alerts to alert teams when their services are on a certain percentage of JVM Heap Memory. However, I have a hard time figuring out what thresholds would be somewhat ...
N3ur0's user avatar
  • 49
0 votes
0 answers
13 views

Recommend me ways to route my PDF file to another service

I am writing a backend code in kotlin/micronaut. The scenario which I am facing is that my backend will recieve a PDF file from client and I have to redirect that PDF file to another endpoint(This ...
Sheheryar Umair's user avatar
0 votes
1 answer
31 views

JVM: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1

This started happening after switching from kotlin 1.8.22 to 1.9.+ I am using the jvm plugin, not Android as in other questions plugins { kotlin("jvm") version "1.9.20" Errors ...
tonisives's user avatar
  • 2,082
0 votes
0 answers
41 views

AFL++ Patch out of range

Good day, I did everything as provided here https://blog.quarkslab.com/android-greybox-fuzzing-with-afl-frida-mode.html I was able to run fuzzer, but it works really slow and constantly spam errors, ...
Boom's user avatar
  • 35
0 votes
1 answer
89 views

Does Compiling Java to Native Code with -Xcomp Always Enhance Performance?

In an Oracle post, it's mentioned that C2 compiles hotspots into efficient native code, storing it in the code cache. A previous discussion pointed out that using -Xcomp compiles all code into native ...
Xavier Z.'s user avatar
  • 179
0 votes
1 answer
34 views

how to find default stack size in java

i have to find the default stack size of Zulu SA-linux64 and unable to find any info regarding this . We are not using -xss but i want to know the default stack size of this jvm . How can we check ...
Ankita Sharma's user avatar
0 votes
0 answers
64 views

Calling JNI_CreateJavaVM just hangs

Just trying debug what wrong with harness code, which was compiled with command: ┌──(kali㉿kali)-[~/…/experimment/research/PoCs/android-afl-qemu] └─$ export CC=/home/kali/Android/Sdk/ndk/22.1.7171670/...
Boom's user avatar
  • 35
0 votes
0 answers
101 views

Does JMM guarantees that volatile overwrites with the same value will be eventually visible?

JMM have guarantees that when thread A writes to volatile variable V all other (non-volatile) writes become visible to thread B after it reads that V value. Does that guarantee holds in presence of ...
user3489275's user avatar
0 votes
1 answer
44 views

Why isn't RSS reduced when System.gc() for parallel, but for G1 is?

I'm using Java 17. I have a container with 2GB and run the following Java program: import java.util.*; public class Main{ public static Map<byte[], byte[]> m = new HashMap<>(); ...
Some Name's user avatar
  • 8,772
0 votes
0 answers
41 views

Minimum heap size in JVM (-Xms) [duplicate]

Despite setting the minimum heap size to 0 and observing successful program execution, the question arises: With the JVM's dynamic resizing capabilities, is there a compelling need for a minimum heap ...
JOTHIPRAKASH's user avatar
0 votes
0 answers
80 views

JVM stuck for seconds to hours

I see that my applications (running on a Linux VM) seem to freeze for minutes up to hours! In that time it is not responsive, even VisualVM loses the connection during that time. And also to jstack ...
BF_PI's user avatar
  • 1
0 votes
0 answers
34 views

Memory usage of Micro Docker containers

I have several Payara Micro Docker services in a stack, with some services having more than one replica. Their containers are of images that extent Payara Micro's image. It's pretty basic: FROM ...
John Manko's user avatar
  • 1,849
0 votes
0 answers
63 views

How do I determine the currently available JVM heap size?

I can use freeMemory() to get unallocated heap size, but the actual available memory is usually larger if my program needs more space because of the uncollected garbage. I wonder if there's a way to ...
William's user avatar
  • 151
0 votes
0 answers
79 views

Excessive Max Memory in Non-Heap for Java 17 App on Kubernetes Pod

I have a Kubernetes Pod running a Java 17 application in a container. The Pod is configured with 2GB requested and limited memory. For the Java 17 app, I've set the flag -XX:MaxRAMPercentage=50, and ...
Eugen Gerb's user avatar
8 votes
3 answers
316 views

Will sending `kill -11` to java process raises a NullPointerException?

For example, the HotSpot JVM implement null-pointer detection by catching SIGSEGV signal. So if we manually generate a SIGSEGV from external, will that also be recognized as NullPointerException in ...
choxsword's user avatar
  • 3,207
1 vote
1 answer
92 views

Understanding Prometheus JVM metrics

I am interested in tracking two metrics within JVM - Number of GCs per minute and Time Spent in GC per minute. I have metrics jvm_gc_collection_seconds.count and jvm_gc_collection_seconds.sum ...
Ashwin's user avatar
  • 12.9k
0 votes
0 answers
42 views

OpenTelemetry with Mesmer on Scala project: traces are not exported

I'm trying to use OpenTelemetry on my Scala 2.13 project (microservices backend application with Play Framework, and Akka, ZIO and gRPC). I'm using opentelemetry-java with Mesmer extension. I'm ...
brkaisin's user avatar
0 votes
0 answers
97 views

Can the JVM poll for asynchronous exceptions just before entering a try-block?

Recently I read about JLS 11.1.3. Asynchronous Exceptions. I was wondering if there are any specifications about where polling for asynchronous exceptions (and throwing them) can or cannot happen. ...
stonar96's user avatar
  • 1,399
0 votes
0 answers
86 views

Android Studio error: Cause: androidx/room/RoomProcessor has been compiled by a more recent version of the Java Runtime (class file version 61.0)

Cause: androidx/room/RoomProcessor has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to ...
tmschaaf's user avatar
0 votes
0 answers
36 views

How to detect auto-boxing and auto-unboxing in Kotlin?

I'm working on a fairly low-level Kotlin JVM library that deals a lot with Bytes and ByteArrays. As I'm dealing with large volumes of data, keeping performance of individual operations high is ...
Martin Häusler's user avatar
-2 votes
1 answer
71 views

Ternary operator in java - not understandin from compiler and jvm perspective

Do i understand correctly this byte b =40; Compiler-type checking whether value belong to within range of datatype(byte) Ok, then JVM allocates memory and keep the value? If i unerstand correct, my ...
Boris Hartiník's user avatar

1
2 3 4 5
246