sun.font.FontManager.getDefaultPlatformFont exception - java

Im using Openshift Platfrom (jre 1.6) to deploy my java application with jasper reports. From last few days Im receiving following exception during jasper report execution.
java.lang.NullPointerException
sun.font.FontManager.getDefaultPlatformFont(FontManager.java:3409)
sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:263)
java.security.AccessController.doPrivileged(Native Method)
sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:164)
any info how to resolve this issue?

Our sysadmins had updated java to
java version "1.6.0_39"
OpenJDK Runtime Environment (IcedTea6 1.13.11) (rhel-1.13.11.1.el6_8-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
on
Linux version 2.6.32-573.7.1.el6.x86_64 (mockbuild#x86-031.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Thu Sep 10 13:42:16 EDT 2015
I got around that problem by installing these with yum
dejagnu.noarch 1:1.4.4-17.el6
dejavu-sans-mono-fonts.noarch 2.33-1.el6
dejavu-serif-fonts.noarch 2.33-1.el6
yum install dejagnu.noarch 1:1.4.4-17.el6
yum install dejavu-sans-mono-fonts.noarch 2.33-1.el6
yum install dejavu-serif-fonts.noarch 2.33-1.el6

Related

Netbeans profiler OpenJDK 64-Bit Server VM (Zulu 8.58.0.13-CA-macos-aarch64)

I am trying to use Netbeans 12.5 profiler on OpenJDK 64-Bit Server VM (Zulu 8.58.0.13-CA-macos-aarch64)
The first calibration process always fail.
Deleting ~/.nbprofiler doesn't fix the problem.
I am getting the error:
Profiler calibration data file does not exists:
/Users/myhome/.nbprofiler/machinedata.jdk18
and Netbeans output:
*** Profiler message (Sun Jan 23 12:30:38 CET 2022): Starting target application...
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java
-agentpath:/Applications/NetBeans/Apache NetBeans 12.5.app/Contents/Resources/NetBeans/netbeans/profiler/lib/deployed/jdk16/mac/libprofilerinterface.jnilib
-Xbootclasspath/a:/Applications/NetBeans/Apache NetBeans 12.5.app/Contents/Resources/NetBeans/netbeans/profiler/lib/jfluid-server.jar:/Applications/NetBeans/Apache
NetBeans
12.5.app/Contents/Resources/NetBeans/netbeans/profiler/lib/jfluid-server-15.jar
org.netbeans.lib.profiler.server.ProfilerServer
/Applications/NetBeans/Apache NetBeans
12.5.app/Contents/Resources/NetBeans/netbeans/profiler/lib/deployed/jdk16/mac
5141 10 Profiler+Calibration+Run
*** Profiler warning (Sun Jan 23 12:33:11 CET 2022): timed out while trying to connect to the target JVM.
*** Profiler error (Sun Jan 23 12:33:11 CET 2022): connection with server not open
My environment:
Netbeans 12.5 openjdk version "1.8.0_312" OpenJDK Runtime Environment
(Zulu 8.58.0.13-CA-macos-aarch64) (build 1.8.0_312-b07) OpenJDK 64-Bit
Server VM (Zulu 8.58.0.13-CA-macos-aarch64) (build 25.312-b07, mixed
mode) macOS 12.1 Chip Apple M1 Pro
Thanks in advance for any help/suggestion
You can manually create your calibration file.
Navigate to the directory
cd ~/.nbprofiler
Then create the file machinedata.jdk18
touch machinedata.jdk18
And lastly, give the file 644 permission
chmod 644 machinedata.jdk18
Once you finish, you can run the profiler without errors.

Intellij and Pycharm annotate showing a fixed wrong date

I am facing a quite bizarre situation regarding Intellij IDEA and Pycharm annotate (git blame) functionality.
Late last year I decided to install different JDKs on my MacOS Mojave (version 10.14.6) for development purposes. It seemingly messed up things quite bit, so I spent some time trying to "undo" (i.e., removing) the JDKs and jEnv. I am able to start and use IntelliJ IDEA and PyCharm (in fact, I never lost the ability to start and use them), but both programs now show a wrong fixed date (10/01/2019) for all the lines when I click on "Annotate" option of every versioned file no matter how old or new is the line. If I use git blame on the command line I see the correct dates of each file's lines. Downloading and installing the newest version of Intellij IDEA didn't help to solve the issue. Please, anyone could help me restore the default behaviour?
The default java version is below:
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
git blame on CLI:
Annotate option in Intellij IDEA:
The default java version is:
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
The git version is:
git version 2.21.1 (Apple Git-122.3)
The Intellij IDEA and PyCharm versions are:
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.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 990M
Cores: 4
Registry: editor.distraction.free.mode=true
Non-Bundled Plugins: DBN
PyCharm 2019.3.4 (Community Edition)
Build #PC-193.6911.25, built on March 18, 2020
Runtime version: 11.0.6+8-b520.43 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 990M
Cores: 4
Registry:
Non-Bundled Plugins: com.alayouni.ansiHighlight, com.intellij.ideolog
Try to right click on the annotations in Intellij -> Options -> Show Commit Timestamp.

Java throws "Repository Does Not Have Release File" when running apt-get update on Ubuntu 19.10

Whenever I try to run apt-get update in my Ubuntu 19.10 machine, I get the error E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu eoan Release' does not have a Release file.
I have installed OpenJDK v 13 on this machine and can use Java commands with no issue, including my IDE's.
Java version as shown by java --version shows me this:
openjdk 13 2019-09-17
OpenJDK Runtime Environment (build 13+33-Ubuntu-1)
OpenJDK 64-Bit Server VM (build 13+33-Ubuntu-1, mixed mode)
Any ideas?

Installed JRE8, JDK 13, ran all the suggestions on the other post of how to install rJava still not working

macOS version is 10.14.5
r version 3.6.1
I tried to include rjava, however it always show me the error message:
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Users/myname/Library/R/3.6/library/rJava/libs/rJava.so':
dlopen(/Users/myname/Library/R/3.6/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib
Referenced from: /Users/myname/Library/R/3.6/library/rJava/libs/rJava.so
Reason: image not found
I did some researches and it guided me to:
https://zhiyzuo.github.io/installation-rJava/
and another thread here. I followed the instructions but nothing seem to work. I think one possible reason may be the java version of my computer. I installed both JDK 13 and JRE1.8.0_231-b11.
However when running java -version, it shows me this:
java version "13" 2019-09-17
Java(TM) SE Runtime Environment (build 13+33)
Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing)
and running ls -l /Library/Java/JavaVirtualMachines/, it shows me this:
drwxr-xr-x 3 root wheel 96 Oct 11 11:14 jdk-13.jdk
And I compared my results with my coworker who has the same computer and more competent IT who finished all the config and installations for her.
She ran java -version and her results like the following:
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b04, mixed mode).
Let me know what I can do! Thank you so much!!!!!!

How to get Java 6 JDK on mavericks

I am trying to get the Java 6 JDK on my mac. I've tried downloading this http://support.apple.com/kb/DL1572
But I can't find it in /Library/Java/JavaVirtualMachines
I already have Java 8 installed, and I don't want to remove it or replace it, I just want to have the Java 1.6 JDK that I can work with on my computer. (Need it to do my mandatory assignemtns for class. Studying Computer Science)
What do I have to do? Thanks in advance!
It installs in a different location.
$ uname -a
Darwin Yoyo-2.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 i386 MacBookPro11,3 Darwin
$ /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Categories