Questions tagged [java]
Java is a general-purpose programming language and a computing platform called the Java Virtual Machine (JVM). Use this tag when you are dealing with a java program, installing java, or configuring a java installation.
892 questions
1
vote
1
answer
38
views
Adding new file to JAR, works when placing it at the root, but not for a nested destination
When I run make build I want to run mvn clean package, npm run build, then include a file from the NPM build output into the newly created JAR.
This is successful when running the following commands ...
1
vote
1
answer
68
views
Preallocate large continuous memory block for legacy executable
I'm trying to develop J2ME game on Linux using this guide by microgram dev.
The j2me emulator from Oracle Wireless Toolkit works totally fine after Linux reboot.
I run some other apps like browser, ...
1
vote
1
answer
94
views
Why doesn’t zsh autocomplete .java source files when using java MyFile.java?
Since Java 10 as I recall, we can run Java source files directly from the command line:
bash
$ java Math.java
The JVM compiles and executes the file automatically.
However, in zsh, tab autocompletion ...
2
votes
1
answer
64
views
VM with Rocky Linux OS going down after every two weeks
We were running a set of Java processes on an RHEL box. There was one or two particular services that used to go down due to OOM killer after every 2-3 weeks. We used to get alerts, and it was ...
2
votes
2
answers
3k
views
Is installing openjdk-21-jdk on Debian 12 from jdk.java.net .deb safe, if its openjdk-21 package looks not working on Debian tracker?
Because Java 25 LTS is coming soon (September 2025) and I've not even yet installed Java JDK 21 LTS (September 2023), I've attempted to do so with a sudo apt install openjdk-21-jdk on my Debian 12. ...
0
votes
1
answer
102
views
Issue Starting Java Application on RHEL Server
I’m experiencing an issue when trying to start a Java application on a RHEL server. I’m confident that the application itself is configured correctly, as it runs without any problems on other servers.
...
0
votes
0
answers
54
views
Netbeans - Run/Debug the project as root
Is there a way to run/debug my Java program from Netbeans as root?
Context: I'm working on RaspberryPi 4 and using PI4J library to access GPIO. Lib offers several I/O Providers and the only one that ...
0
votes
1
answer
184
views
Java installation issue on Oracle Linux 7.9: "cannot execute binary file" error
I am trying to install Java on a Linux server.
Linux server details
NAME="Oracle Linux Server"
VERSION="7.9"
System Architecture
x86_64
What I have tried so far
I have downloaded ...
0
votes
0
answers
34
views
what fonts do I need for DimSum Chinese Mandarin Tools?
I found DimSum years ago (I installed it on Windows), it helped me to translate English to Chinese, but unfortunately the project is abandoned, the site is still there, but many links are broken. My ...
0
votes
0
answers
101
views
Unable to run Logic 2010 on Linux in ChromeOS
I am trying to install Logic 2010 (download link), which uses Java, on the Linux virtual machine in ChromeOS.
I followed steps 0 to 2 in a guide from Reddit, copied the Java folder into the Resources ...
4
votes
1
answer
217
views
Can Linux files systems resolve a relative path before resolving symlink?
New Linux user here, freshly transitioned from Windows 10 to Fedora 41. Lot's of experience with many OS's, including various *nix and Unix-like file systems.
I have a standard practice of using ...
0
votes
0
answers
50
views
Java 11 DocPrintJob throw IOException for -o flags with AIX print spooler
I am using the Java Print Service API (javax.print) to send print jobs to a specific printer queue on an AIX system. While my code works fine with Java 8, switching to Java 11 causes it to fail with ...
1
vote
1
answer
96
views
Temenos Printing Error on AIX: Unsupported lpr Flags (-J and -o) with Semeru Runtime
I'm running a Temenos application on an AIX 7.3 system configured with the AIX spooler. The lpr command works fine when tested manually. However, when the application attempts to print using Java's ...
0
votes
0
answers
97
views
Linux Server swap memory problem
I have the same problem on all servers running Java processes.
I have lots of available memory. But my swap is full of Java-related pages.
But the system never cleans its swap, Java pages stay there &...
0
votes
1
answer
78
views
almalinux 9 tomcat 10 openlogic java 11 error HTTP Status 404 – Not Found
I would like to troubleshoot an issue that I think it happens only in my just made up environment. I have an almalinux 9 with apache tomcat 10 and openlogic jdk version 11.
Installation seemed to work ...
0
votes
1
answer
406
views
How to fix a locale warning from Perl?
Ubuntu 22.04 LTS
perl -e exit:
...
0
votes
2
answers
436
views
Removing Gradle with all dependencies
I have installed Gradle via Synaptic Package Manager. During the installation process, two auxiliary packages were installed, plus a large amount of different dependencies, and the process was quite ...
0
votes
1
answer
149
views
My systemd service stopped working after updating server jarfile
I have a fabric minecraft server running on Oracle Linux, which I updated today, but now Java exits with status code 1 and says that server.jar can't be found.
Please help me, I really don't ...
0
votes
1
answer
125
views
Enabling Java JNDI LDAP connection to Active Directory using SSH through remote SSH tunnelling
Firstly, I would like to validate my idea for the PoC, specifically I would like to understand whether this can be possible or not and furthermore some pointers with regards to how it can be done ...
0
votes
1
answer
222
views
java process keep re-starting after kill it with command: kill -9 pid
I have a screen called bung were inside i run a java process using ./start.sh (script to run the java process) but before type that command i start the screen running screen -r bung so i open the ...
0
votes
1
answer
433
views
"Failed to load swt-pi3" error in e2studio installer
I would like to install the latest version of Renesas' e2studio on my up-to-date Fedora 39 machine but I keep getting the following error:
$ ./e2studio_installer-2024-01_1_linux_host.run
Mar. 31, ...
0
votes
0
answers
2k
views
How to solve Missing X server or $DISPLAY when trying to change the loaded website in chromium
I am a newbie with using raspberry and
I am using chilipie-kiosk to develop a kiosk on a raspberry pi. The idea is when the Raspberry Pi starts, the Chromium browser is launched with a page that we ...
0
votes
0
answers
451
views
JAVA_TOOL_OPTIONS="-Dos.name=Windows 7" -> Unrecognized option 7
I am trying to install the latest version of PSIM which is a windows application. I downloaded the latest version of JAVA as well as JAVA 8 (in case it doesn't like the latest) and set the variable ...
3
votes
2
answers
899
views
When SIGTERM is received by a process, what happens to its children?
I am wondering what happens when a process receives SIGTERM and it has children spawned (e.g. JVM that has /bin/sh commands running).
Is there some sort of automatism or does the parent simply exit ...
0
votes
1
answer
2k
views
If I have a json string how do I calculate the number of bytes needed when stored?
I have a json string formatted displayed in a web page. What I am trying to understand is what is the size in terms of bytes that this json string requires.
If I copy and pipe to wc -c I get 1000 ...
0
votes
0
answers
84
views
Why are four Jenkins build nodes suddenly having fatal problems finding things on the PATH?
In our overall organization, we run Jenkins 2.303.1 onprem. We run thousands of builds a day. The project I work on uses one Jenkins master and a set of about ten build nodes. We build a few hundred ...
3
votes
2
answers
9k
views
Java 21 binaries fail to execute on Raspberry Pi OS 64-bit (aarch64)
I'm not able to install Java 21 on Raspberry Pi 5. I downloaded ARM versions from OpenJDK and Oracle, but neither works for me.
When typing ./java, it prints:
No such file or directory
(I'm sure I'm ...
2
votes
2
answers
6k
views
Arch linux - Error during update of packages: jdk-openjdk and jre-openjdk are in conflict
When I try to update my system I get jdk-openjdk and jre-openjdk are in conflict error:
This is log of the update attempt:
:: Synchronizing package databases...
core is up to date
extra is up to ...
0
votes
1
answer
5k
views
Error: could not open `user_jvm_args.txt`
This is my first time making a bash script into a service and I'm running into an error where the service fails because it can't open a text file that is used for java arguments (user_jvm_args.txt). I ...
0
votes
1
answer
104
views
shell script invoke java, keep existing on linux
we have a bash shell script which invoke java program. will it be happened that the java ends/complete but the process of still on the process list?
below is the content of execute, which invoke a ...
1
vote
2
answers
4k
views
Java: what exactly does a headless install mean?
I'm installing Java and Tomcat on a headless server. The client doesn't have Java and just sees a webpage.
Should I install openjdk-17, or openjdk-17-headless?
1
vote
0
answers
218
views
100% memory consumption when running Jetbrains IDE for 5 min
Fresh install of Arch Linux causes major memory leaks upon opening JAVA based applications, or Jet Brains applications to be exact.
Memory starts off fine but within 5 minutes its up over 90%, opening ...
0
votes
1
answer
288
views
Installing Ant is overriding Java Installation
I am trying to install ANT after installing java. My java in Sun Java.
pc19@pc19-H110:~$ java -version
java version "20.0.2" 2023-07-18
Java(TM) SE Runtime Environment (build 20.0.2+9-78)
...
0
votes
1
answer
67
views
How to replace stock java with downloaded binary?
In Debian Stable the latest openjdk version available is 17.
$ which -a java
/usr/bin/java
/bin/java
$ java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-Debian-...
2
votes
0
answers
480
views
Java process getting terminated in Redhat by SIGTERM from Systemd
I'm starting a Java process using nohup and & (running it in the background). This process gets terminated frequently. There is no pattern on when it is getting terminated. From the application (...
1
vote
1
answer
1k
views
How do I install Java for all users?
I need to install Java 8 on my raspberry pi. I used SDKMan to do so, following this tutorial.
All works well only if I use java from my admin account (the one I used to install it). Trying to run java ...
0
votes
1
answer
198
views
How to prune Ubuntu to bare essentials
I have a Raspberry Pi running a Java application (with Swing/GUI) in a kiosk-like setup.
I want to terminate (or preferably prevent from starting) all unnecessary processes that are not essential for ...
14
votes
4
answers
39k
views
How can I install Java 8 on Debian 12 (bookworm)?
Under Debian 11, we typically use OpenJDK from adoptopenjdk.net.
This organization will no longer provide new releases: https://adoptopenjdk.jfrog.io/ui/native/deb/dists/
Is there a way to install ...
0
votes
1
answer
426
views
Shell script not picking up variable in if statement
I have some code that looks like this:
################### - Let's call this section 1
if [ -n "$STUFF_JAVA" ]; then
__LAUNCHER="$STUFF_JAVA"
else
__LAUNCHER="...
-1
votes
1
answer
409
views
java8 installing issue on linux error: alternative path
i have an issue on setup the java on my kali linux using vm on macboob Pro
im new on the system i have the issue that when i follow the command
(a㉿kali)-[/usr/lib/jvm/jre1.8.0_371]
└─$ sudo update-...
1
vote
0
answers
495
views
How to package a Maven Java application for Debian?
I am trying to package a Java application that is built with Maven.
I created the debian/ folder with mh_make and I have been reading/watching the tutorials:
https://wiki.debian.org/Java/Packaging/...
0
votes
1
answer
55
views
Apache Ignite - Automatic Cluster Snapshot Create / Restore Procedure
When trying the Apache Ignite cluster snapshot procedure (snapshot create, restore), the restore operation is not successful.
Before the restore procedure, we have destroyed the cache which we want to ...
0
votes
1
answer
267
views
Confused about java -version [duplicate]
For every program/utility on Unix, I would type the name of the program followed by --version to check its version, like so
program --version
If I understand correctly, the double dash -- is used to ...
1
vote
1
answer
184
views
configure: error: Could not find alsa!
I'm trying to cross compile jdk for android. I run:
./configure
--with-toolchain-path=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64
--with-sysroot=$ANDROID_NDK_HOME/platforms/android-21/...
1
vote
0
answers
345
views
What is this Java error about for maven on Ubuntu: package org.apache.http.client does not exist import org.apache.http.client.ClientProtocolExcepti?
I am using Java and Maven Project on Ubuntu but I am getting following error upon building Java code on NetBeans IDE:
package org.apache.http.client does not exist import org.apache.http.client....
1
vote
1
answer
2k
views
Everytime I try run anything Android studio related Java-related errors show up
for example when I run sdkmanager this error displays:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api....
1
vote
2
answers
4k
views
"No X11 DISPLAY variable was set [...]" when using java.swing
When I'm trying to run a Java GUI application from the command line, I get:
Exception in thread "main" java.awt.HeadlessException:
"No X11 DISPLAY variable was set,
or no headful ...
0
votes
1
answer
5k
views
Systemd cannot exec a start command with error: No such file or directory, but the path is correct and permissions are correct aswell
So I have this modded minecraft server which has a launch script that is very simple and I wanted to control the server using systemd.
Here is the launch script:
#!/bin/sh
# Server Launch Script
#
# ...
0
votes
0
answers
300
views
how to kill java process forcefully and remove directory which is used by that process
I have one use case where I am killing a java process with pkill java, and after that, I want to remove certain directories. I have used rm -rf /pathtofolder but it gives:
rm: cannot remove '/...
0
votes
1
answer
163
views
Is there a way someone can read arrays of bytes which I send with java sockets while using TLS 1.2?
If anyone can answer me pls I just need an anwer. I know thus isn't maybe right place for this question
I created chatting app with sockets in Java 8 and i use TLS 1.2 My question is: Is there any way ...