Why monitoring CPU and Sample are not available on visualVM - visualvm

Since a few days VisualVM doesn't work very well.
I don't know why monitoring CPU and Sample are not avalables.
Thank you.
Jérôme
Version: 1.8.0_45 (Build 1380-140910); platform 20140910-unknown-revn
System: Windows 7 (6.1) Service Pack 1, amd64 64bit
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM (25.45-b02, mixed mode)
Vendor: Oracle Corporation, http://java.oracle.com/
Environment: Cp1252; fr_FR (visualvm)
User directory: C:\Users\Jerome\AppData\Roaming\VisualVM\8u40
Cache directory: C:\Users\Jerome\AppData\Local\VisualVM\Cache\8u40
Clusters:
C:\Program Files\Java\jdk1.8.0_45\lib\visualvm\platform
C:\Program Files\Java\jdk1.8.0_45\lib\visualvm\visualvm
C:\Program Files\Java\jdk1.8.0_45\lib\visualvm\profiler

I found this "not issue" ;)
It doesn't work because java app was running from eclipse and i didn't use jre (in eclipse) from jdk.
I modyfied this and it works.

Related

JVM Debugger Memory View for IntelliJ IDEA

I can't see the "Java Profiling" options in my IntelliJ (see screenshots) and I am not able to launch my Java Spring app with any profiler.
I'm on MAcOS Big Sur, running this version:
IntelliJ IDEA 2020.3.1 (Community Edition)
Build #IC-203.6682.168, built on December 29, 2020
Runtime version: 11.0.9.1+11-b1145.63 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: compiler.automake.allow.when.app.running=true, ide.balloon.shadow.size=0
Non-Bundled Plugins: com.mallowigi, Docker, GrepConsole, org.jetbrains.kotlin
Profiling tools are Ultimate only feature: https://www.jetbrains.com/help/idea/cpu-profiler.html

IntelliJ add Java 11

I need to add my installed Java 11 version to the project settings, because of this error (Error:java: invalid source release: 11).
When i go to project structure -> Project settings -> Project there it just shows Java 1.8.
When i try to add "java-11-openjdk-amd64" it fails with the reason "The selected directory points to a JRE, not a JDK.".
java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode)
The java application is available in the Java Runtime Environment (JRE). The fact that java is available in version 11 does not necessarily mean that the Java Development Kit (JDK) is also installed for version 11. However, IntelliJ needs the JDK which includes tools like the compiler javac.
In order to use Java 11 in IntelliJ, you need to install the Java 11 JDK.
For example on Ubuntu you can do that by executing:
sudo apt install openjdk-11-jdk

intellij plugin SDK can't resolve java

my plugin project can't find any java classes.
How can I make my project compile again?
I'm developing on manjaro
project: https://github.com/axaluss/power-mode-intellij-plugin
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=18.1.2
DISTRIB_CODENAME=Juhraya
DISTRIB_DESCRIPTION="Manjaro Linux"
IntelliJ IDEA 2019.2.4 (Community Edition)
Build #IC-192.7142.36, built on October 29, 2019
Runtime version: 11.0.4+10-b304.77 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.2.21-1-MANJARO
GC: ParNew, ConcurrentMarkSweep
Memory: 1948M
Cores: 6
Registry:
Non-Bundled Plugins: Batch Scripts Support, CMD Support, dcevm, de.ax.powermode, mobi.hsz.idea.gitignore, net.seesharpsoft.intellij.plugins.csv, org.intellij.scala, BashSupport, org.toml.lang, some.awesome
I figured it out.
Somehow the "project sdk" was broken.
I set it up freshly while I was figuring it out.
But somehow deleting it and creating it a second time fixed it.

Android Build Error: Unable to locate Java VM. Please set JAVA_HOME environment variable

I'm using Ti Studio on Win7, and my project builds and works when I have my Android plugged in via USB and I run using "Android Device".
However, when I try to buid it for distribution I get:
[ERROR] Program launch failed. Unable to locate Java VM. Please set JAVA_HOME environment variable.
I have looked at this thread which describes a similar problem, and verified that JAVA_HOME is set:
+>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_29
Also, in Ti Studio I have verified that Preferences->Studio->Platforms->Android has the "Android SDK Home" set to the path where Android SDK is installed.
Can anyone guide me on what else I need to do to fix this?
Thanks!
UPDATE FOR ANAND
+>javac -version
javac 1.6.0_29
+>java -version
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
Did you read System Requirements?
From Documentation:
For Windows, the 32-bit version of Java JDK is required regardless of
whether Titanium is running on a 32-bit or 64-bit system.
Try to install additional 32bit version of Java (without removing the 64bit) and set the system variable.
You may refer this answer.
Hope it helped you
Configure environment variables as mentioned here and JDK must be 32 bit

Titanium appcelerator close automatically

2 days ago I had installed Titanium Appcelerator 3.1 and today I installed android sdk 2.2 and 4.2, But now after starting my Titanium, it gets automatically closes after few minutes and showing some java related error.
My system configurations :
Ubuntu 12.04
64 bit java 1.6.0_27
Titanium 3.1
Android sdk 2.2 and 4.2
4 GB RAM
Please find the error log below
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f29fb86f757, pid=2889, tid=139818259298048
JRE version: 6.0_27-b27
Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops)
Derivative: IcedTea6 1.12.3
Distribution: Ubuntu 12.04 LTS, package 6b27-1.12.3-0ubuntu1~12.04.1
Problematic frame:
V [libjvm.so+0x588757] klassVtable::oop_follow_contents()+0xd7
You have the wrong JDK. You need to use the OracleJDK as specified here.