Newest 'jvm' Questions - Stack Overflow

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.

0
votes
0answers
11 views

Why do I have to set targetCompatibility to JavaVersion.VERSION_1_8 if my JVM is 1.8

Hello in order to compile with a library im using they request that we set these settings. But im confused because my machine is running JVM 1.8 and I seen other people mention that gradle uses the ...
0
votes
0answers
15 views

How build JDK to be able to expand macros in gdb?

I'm building JDK12 fastdebug and faced the problem about listing the function source code with gdb. Output produced by e.g. list main is shown with macros left unexpanded. Here is how it looks like (...
-4
votes
1answer
32 views

What are the real-life examples of JVM and where they are used, in perspective of Industry? [on hold]

I'm assigned to summarize and talk on JVM, as I need a real-life scenario from developers to end or strong example of its usage in industry and why it is preferred. I've tried videos, blogs, and ...
-1
votes
1answer
44 views

How is Class Verification implemented in the JVM? [on hold]

Reading through the JVM specification ( https://docs.oracle.com/javase/specs/jvms/se12/jvms12.pdf ) pages 190 to 310 are dedicated to the verification of Class Files and are primarily specified using ...
-1
votes
0answers
50 views

How to solve the jni native code crash problem?

My application crashed in jni native code, the stack in core file is: warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffc6d478000 Core was generated by `java -jar -...
0
votes
0answers
16 views

How to disable NTLM proxy auth in Java?

I am trying to run Spring app with Feign http client inside. App is behind proxy. I set following JVM parameters: -Djdk.http.auth.tunneling.disabledSchemes="NTLM" -Dhttps.proxySet=true -Dhttps....
0
votes
0answers
28 views

Kafka Stream memory management (Ktable, RocksDb)

Hi I do not seem to be able to correcly scale my pod for a Kafka stream application (running on java 11 jre) and keep on having OOMKilled containers. kafka stream topology The job consists in an ...
1
vote
1answer
18 views

Impossible to start server after hard closing Eclipse (tomcat server already started)

I work on huge repositories linked to my java project (running on Eclipse) and sometimes (when I do text search usually), my Eclipse stops working. If I "hard close" it in that state and if I have my ...
1
vote
1answer
43 views

JVM high virtual memory on SUSe 12 vs SuSe 11

Running this simple Java program on our SLES12 systems reserves 4GB of virtual memory: class Test { public static void main(String[] args) throws Exception { Thread.sleep(100000); } } ...
0
votes
0answers
31 views

JVM crash on Tesseract.getWords API invocation running with ubuntu docker image

I am trying to extract words from image using tess4j. When I invoke getWords API then JVM crashes in some case. Following are the versions for relevant packages/software Java version: 11 Tomcat ...
0
votes
0answers
37 views

Java runtime parameters in custom directory

I have a java installed in C:\MyFolder\Test\bin\jvm and in the windows console I can successfully check the version by doing C:\MyFolder\Test\bin\jvm\bin\java.exe -version. My question is, how can I ...
0
votes
1answer
36 views

Loading different integrations from properties file

I am working on a project for finals at my Uni, and I am having a particular problem. I am testing how certain Website works in localhost using TestNG and Selenium. Now, I have different integrations, ...
-2
votes
1answer
57 views

Why JVM doesn't optimize simple callback (in Scala)?

I'm creating Scala method to add elements into a ArrayBuffer. I'm thinking about 2 approaches: def addToArrayBuffer(b: ArrayBuffer[Int]) def addToArrayBuffer(cb: Int => Unit) The first approach ...
-1
votes
2answers
37 views

Why do we need to call 'monitorexit' instruction twice when we use 'synchronized' keyword?

According to JVM Specification, paragraph 3.14 Synchronization, JVM call monitorexit instruction twice. I wonder why JVM need such behavior? Why do we call this instruction 2 times, but not 3 or 4 ...
0
votes
0answers
23 views

Java configuration cache for repeated unit and batch testing called from sererate JVM instances?

Scenario: Each time I run a Java batch job for testing all the configuration and bootstrap applications need to load. This includes logging, hibernate type registration, global properties etc. This ...
2
votes
0answers
48 views

What causes grails application to create more threads in some deployments

Not 100% sure how to ask this. Skip to last paragraph for the actual question, the rest is background information. We are running grails 3.3.2 and moving our applications from deploying in tomcat to ...
0
votes
2answers
19 views

how to run kotlin class file and specify one or more library jar files?

I am looking for a way to run the standard class file as produced by Intellij for hello world, using a gradle build with kotlin-stdlib-1.3.11 as the only dependency. I know I could make a jar file ...
0
votes
0answers
39 views

Java CMS - Young Generation GC takes longer and longer

We have an application running on OpenJDK8 that has a high allocation rate (about 80 MB/sec) over the course of the whole day. We noticed that the overall young generation gc times directly ...
0
votes
0answers
34 views

JVM 8 Thread stack size

Based on java 8 core dump, i am seeing the below output for each thread thread: 29 - stack range: 0x7f135570b000-0x7f135c373000, size: 111008 kB java 8 thread stack size on 64bit VM is 1028 Kb, how ...
1
vote
2answers
66 views

Alien method in java concurrency is hard to understand

I'm reading book "Seven Concurrency Models in Seven Weeks", and there is a description about alien method in chapter 2. class Downloader extends Thread { private InputStream in; private ...
0
votes
0answers
53 views

How can I see hot classes and methods for a SE and a spring app via JMC

I want to see hot classes/methods (how many they created and their size for classes and how many they invoked/execution time for methods) via JMC (Java mission control). For a start I did a se and a ...
0
votes
1answer
33 views

-XX:HeapDumpPath option in jvm config not working

-XX:HeapDumpPath not working when kill -3. java -server -Xms4G -Xmx4G -XX:+UseG1GC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:{GC_PATH} -XX:+...
3
votes
0answers
117 views

What causes GC to attempt to free more native bytes than the ones registered as allocated (java.lang.Error: Cleaner terminated abnormally)

Lately our Android app has been closing without reporting any crash. After looking into the system dump logs we pinpointed a common log that always appeared when this situation occurred. ...
-1
votes
1answer
52 views

Why GC doesn't run within the same method

I'm playing with gc and found interesting situation when gc(I use parallel gc) isn't involved This is my code public static void main(String[] args) { System.out.println(Runtime.getRuntime()....
-3
votes
0answers
51 views

OutOfMemoryError: Java heap space - threads [duplicate]

I'm trying to execute threads to call a store procedure in instances. But after some minuts I receive this error: java.lang.OutOfMemoryError: Java heap space I tried parameter -Xmx1024m and ...
0
votes
0answers
22 views

Machine hangs when running multi-threaded code (selenium parallel tests) [closed]

I am running selenium-java automation tests using maven. Test has been designed so that no of threads can be configured,which in turns decide no of tests in parallel.When I run for threads upto 10 , ...
2
votes
1answer
52 views

Java ClassFile additional byte?

I read about Java ClassFile and I have tried to understand every byte in it. Basically everything is clear besides one thing... Just after the method definition (Code attribute) there is SourceFile ...
0
votes
0answers
22 views

JVM heap not growing to match -Xmx argument but getting OutOfMemoryError

I'm currently stress testing a software, and I've come across a weird issue. The Hotspot JVM I'm using to run a server application doesn't seem to grow it's heap space correctly. I've set -Xmx768m ...
0
votes
1answer
55 views

Why arguments of methods in java accept copy of references' address? [duplicate]

So this is a question about jvm design, since basically java is pass by value, and what is actually pass into method is object's reference address copy, then why we do that instead of passing the ...
0
votes
0answers
49 views

How does the default character set get initialized in the JVM on Linux

When I run a java application on "Linux CentOS 7" Charset.defaultCharset() is returning "US-ASCII". If I pass the JVM argument -Dfile.encoding="UTF-8" I am able to change the character set to UTF-8. ...
0
votes
2answers
25 views

Python JVM Flask [duplicate]

I created a simple API using Flask, in some methods I need to use jvm like this: @app.route('/inference', methods=['POST']) def inference(): jvm.start() #do somethings jvm....
-2
votes
0answers
57 views

java 12 Shenandoah: A Low-Pause-Time Garbage Collector

I have a web application with currently using G1 garbage collector and below Heap Memory args: -Xms10G -Xmx25G My team is eager to test out the experimental java 12 Shenandoah: A Low-Pause-Time ...
0
votes
0answers
61 views

Java - JVM Garbage Collectors in Java8

I have a basic SpringBoot 2.1.5.RELEASE app. Using Spring Initializer, JPA, embedded Tomcat. In terms of the Java Garbage Collection I guess that the option B of the service is better than the option ...
0
votes
1answer
43 views

jni function calls some libc function which gdb does not know about

I have a simple JNI function which I use to read data from file into byte[] from C code UnixUtil.unsafeReadToByteArray which is implemented as: JNIEXPORT jlong JNICALL ...
0
votes
0answers
39 views

How does java(jdk, jre) update notifications work, do I need to use installer to get java update notifications

How does Java updates work? In other words how does java know I have older version of java and updates to my jdk or jre is available to download? If I extract jdk instead of using installer where ...
1
vote
1answer
22 views

Jprofiler do not detach on application crash

I use java application with spring boot in docker. Recently application start to consume more than 100% of CPU. As we run it on AWS, the docker supervisor kills the container in few moments. I setup ...
-2
votes
1answer
46 views

What exactly happens when you use server-side compilation in Java?

This article describes -server and -client vaguely. Alot of articles cover it generally but I'm curious what is really being done at the JVM code level.
0
votes
0answers
20 views

How to set Jenkins to use system's Date, Time, Number, and Currency formats?

I'm running some date time format verification test in Jenkins. I want to use Sweden date, time ,number and currency formats. Although I change the OS date, time, number and currency formats to Sweden ...
1
vote
1answer
85 views

Measuring performance of java.io.InputStream

I have a file 5GB in size which I want to read by chunks, say 2MB. Using java.io.InputStream works fine. So I measured this thing as follows: static final byte[] buffer = new byte[2 * 1024 * 1024]; ...
2
votes
1answer
46 views

Why does not SetByteArrayRegion corrupt memory?

The SetByteArrayRegion function is implemented as JNI_ENTRY(void, \ jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start, \ jsize len, const ElementType *buf)) ...
0
votes
0answers
44 views

How to uniquely identify static variables in GETSTATIC and PUTSTATIC commands in BasicInterpreter

I'm trying to perform some data flow analysis using ASM, but I need to be able to uniquely identify which static variable is being referenced in a GETSTATIC or PUTSTATIC instruction. In the JVM ...
2
votes
2answers
44 views

Kotlin - Can't create two constructors with different List types parameters

I was trying to create the following class: class MyClass { var foos: List<Foo> = listOf() constructor(foos: List<Foo>) { this.foos = foos } constructor(bars: ...
0
votes
0answers
19 views

google-cloud -firestore not working in 32bit jvm

There's an issue with the grpc-netty-shaded.jar which is used in firebase samples to make a quick start. This netty.jar is built for 64bit only and there's no support for 32bit. is there any options ...
0
votes
1answer
44 views

Maven sure fire started to fail suddenly

I have a Jenkins job that last Friday was working, and since yesterday started to fail. This is my setup Maven 3.3.9 Oracle JDK 1.8 u144 <plugin> <groupId>org.apache.maven.plugins<...
2
votes
0answers
29 views

Perf dynamic tracing Failed to add events

I'm trying to learn how to use perf dynamic tracing on my java application running some JNI-based shared library written in C. The library is installed by path /opt/myapp/lib/libmyapp.so and then is ...
0
votes
0answers
17 views

google cloud firestore not working in 32bit JVM because of grpc-netty-shaded-1.19.0.jar

in 32bit jvm google firestore is not working/failed connect by throwing below exception java.lang.IllegalArgumentException: Failed to load any of the given libraries: [...
0
votes
0answers
23 views

Decipher Java java.lang.VerifyError: Bad type on operand stack

I'm working on a project to generate JVM byte code using ASM library. When I have done something wrong and bytecode verification fails, JVM print this descriptive error message which contain a section ...
0
votes
0answers
41 views

Coroutine Kotlin

I am trying to understand coroutines on Kotlin and I have some questions regarding to that topic. These Jobs are created from foreach loop inside ScheduledService that retrieves tasks and every task ...
1
vote
0answers
37 views

How to manage Java Spring applications autoscaling in Kubernetes PROPERLY?

I'm trying to set up autoscaling in Kubernetes (hosted in Google Kubernetes Engine) for my Java Spring application. I have faced two problems: Spring application uses a lot of cpu at the start (...
1
vote
1answer
29 views

How to pass arguments to sbt in a jenkinsfile

I am trying to launch a clean assembly step with sbt into a jenkinsfile. I use the following step: sh "${tool name: 'sbt-0.13.13', type: 'org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation'}/...