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.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
19 views

Error: Could not find or load main class ; can any one help please? [closed]

I have done reinstalling the vscode and jdk but still the problem persists can ony one come up with solution.
0 votes
1 answer
2k views

attach to tty running a process

I have a systemd service file that runs a java program in another tty [Unit] Description=java program After=network-online.target [Service] Type=simple ExecStart=/usr/bin/java -cp "/home/user/...
0 votes
2 answers
2k views

Java programs not running in terminal

I have java 8 installed on fedora 20. Any java program runs perfectly fine via eclipse but when I run the same program on terminal it reports an error saying 'could not load main class' . what could ...
0 votes
0 answers
34 views

Error while installing openjdk [closed]

Got the below error while executing below command sudo apt-get install openjdk-8-jdk Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to ...
0 votes
0 answers
17 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, ...
1 vote
2 answers
24k views

How to fix Picked up _JAVA_OPTIONS: no options listed on Linux?

This issues is on Manjaro Deepin 15.9 linux DE. When I run java -version in terminal it outputs this: Picked up _JAVA_OPTIONS: java version "11.0.2" 2019-01-15 LTS Java(TM) SE Runtime ...
0 votes
0 answers
56 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
1 answer
3k views

How to schedule to run testng.xml file on terminal on linux environment?

I have scripted a Selenium automation testcase. I have generated the testng.xml file which should be executed on the linux terminal at a particular time of my need. Say I want to schdule to execute ...
3 votes
4 answers
11k views

Intellij IDEA: Unrecognized VM option 'UseConcMarkSweepGC'

I installed Intellij IDEA from on my arch using yay. I worked fine but recently it started doing this: john@arch-thinkpad ~ [1]> intellij-idea-ultimate-edition Unrecognized VM option '...
2 votes
2 answers
107 views

On Debian, how do I make a script that will rerun a Java program after it has stopped or crashed?

I'm running a Java server program that needs to be started with a shell script. The script needs to start the Java program again if it happens to crash or be stopped manually. I found this script ...
0 votes
1 answer
2k views

Is -d64 required for java on linux?

We are generating scripts for running java on RHEL or an Amazon Linux ami. The scripts all now contain the -d64 option. We are using OpenJdk 1.8 64-bit. The oracle faq question When you download the ...
0 votes
0 answers
36 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 ...
5 votes
2 answers
2k views

Can I indicate that a .deb package depends on Java, but not specify what implementation (e.g. OpenJDK, IcedTea, Oracle)?

I have a .deb package that contains an app, which requires Java to function. However, I don't care which implementation they have installed (e.g. OpenJDK, IcedTea, Oracle), and I don't want to force a ...
5 votes
1 answer
2k views

Java SDK on NixOS for IntelliJ

I have recently installed NixOS on my machine, for Java development I have added IntelliJ CE 14.1.5 and the Oracle JDK 8. However IntelliJ does not automatically recognize the path to the Java SDK ...
1 vote
1 answer
1k 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
93 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 ...
3 votes
1 answer
3k views

Setting classpath for Java

I was trying to use a tool a tool written in java called "fastqc" (for people who are interested in what is fastqc. when I tried typing the command :" fastqc" I got the error: Exception in thread "...
2 votes
1 answer
45 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
0 answers
25 views

Kafka with KRaft - what is listening on the random high port?

I'm in the process of writing some ansible to install Kafka on RHEL and I've got the service running and am about to configure the firewall to make the service accessible on the network. When I look ...
-1 votes
3 answers
3k views

Running JAVA in Cygwin through bash script

I've been encountering a problem with cygwin where I cannot run a jar file with an error that the file cannot be found. If it were easier i would "translate" the java source in bash, but ...
2 votes
3 answers
5k views

org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] while running spoon.sh in ubuntu

When I am running spoon.sh file in Ubuntu I am getting the following error: [santosh@sbx data-integration]$ ./spoon.sh /home/decathlon/Pentaho-5.0.1/data-integration org.eclipse.swt.SWTError: No more ...
0 votes
2 answers
2k views

Unable to build using Java OpenJDK 14. /bin/sh: javac: command not found

I've been tasked to work on updating a Java program that hasn't been touched for years and I'm running into issues building it using the latest version of Java OpenJDK 14.0.1.7-2 on Centos 7. When I ...
0 votes
1 answer
10k views

JAVA_HOME should point to a JDK not a JRE

If anyone can help me with this, it would mean a lot as I've seen similarly answered questions for windows but not many or Linux. I am running I am running Linux mint 20.2 (Uma). I have a problem ...
0 votes
2 answers
3k views

Unable to locate an executable at "/Library/Java/JavaVirtualMachines

Whenever I try to run any apt command on my Mac I get Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home/bin/apt" (-1) error. My .bash_profile ...
0 votes
0 answers
49 views

Hadoop Namenode heap size tuning

NameNode process is executed in Java virtual machine, and Java object which NameNode creates is managed in Java virtual memory. As the fles or directories are created, inode objects and block objects ...
0 votes
1 answer
3k views

JAVA OPTS Xms Xmx MetaspaceSize MaxMetaspaceSize relationship with server resources

I have just started working with jboss application servers and recently we had a problem when trying to deploy an application in a new test server (RHEL 7), it happened that, when starting the jboss ...
0 votes
1 answer
505 views

Install Java 6 to Debian Lenny

I'm trying to install old Java 6 to Debian Lenny: sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-bin Got this error: Couldn't find package sun-java6-jdk sources.list: deb http://archive....
0 votes
0 answers
33 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 ...
1 vote
2 answers
2k views

How do I run Jenkins with a specific working directory and a specific user account?

I am executing below jenkins.war with below command jenkins -jar jenkins.war But I want to specify to use below path while executing the war `/data/jenkins` and it should run as jenkins user . ...
0 votes
1 answer
4k views

CentOS 6.6; java 7: libjli.so cannot be found

Background: I have written a Java program to capture network packets. The code uses a wrapper API around libpcap and works nicely – as long as I run the program via sudo. I am now trying to figure out ...
1 vote
2 answers
4k views

No trusted certificate found when using Java for making request on HTTPS

I'm a Java developer and I need to use a particular version of java 8 (1.8.0_162) can't use OpenJDK either. But, I'm getting this error when I try to connect / get / download / whatever from my java ...
0 votes
0 answers
41 views

Running a Java Abstract Window Toolkit application within a Docker container under Wayland

In the last years I ran a Java Swing application within a Docker container by running: docker run -u 1000:1000 --rm --name etax_zug --hostname etax-zug \ -e DISPLAY=unix:0 \ -e XAUTHORITY=/tmp/...
0 votes
1 answer
2k views

Java 21 on Raspberry Pi 5

I'm not able to install Java 21 on Raspberry Pi 5. I download ARM versions from openJDK and Oracle, but both don't work for me. When typing ./java it prints: "No such file or directory" (I'm ...
2 votes
2 answers
5k 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 ...
1 vote
1 answer
2k views

Where does keytool command logs?

I want to know in which file the keytool command logs all the information. i.e., when I execute the below command:- keytool -import -file ca-certificate.cer -alias sample -keystore /root/keystore.jks ...
0 votes
1 answer
1k 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
40 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
454 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?
0 votes
0 answers
14 views

Integrate java app installed through flathub to GTK

I have installed sweethome3d via flathub(https://flathub.org/apps/com.sweethome3d.Sweethome3d). Expectedly, the look is not integrated with Adwaita or whatever GTK theme and icons I am using. Is there ...
1 vote
0 answers
58 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
0 answers
101 views

Mailx call in shell script suddenly sending blank messages

Similar to what was reported in posting, MAILX sends an email but with a blank subject and body text, I have an Oracle EBS 12.2 server that's using a concurrent program (java) to invoke a shell script ...
0 votes
0 answers
211 views

Uninstall Java 8 openjdk-8-jre-headless to upgrade to openjdk-11-jre-headless

I've tried several methods of removal of the package. apt remove openjdk-8-jre-headless, apt purge openjdk-8-jre-headless, I've tried to dpkg-l | grep openjdk to find the packages listed, Each time I ...
6 votes
4 answers
20k views

How to do HmacSHA256 using openSSL from terminal?

I need to perform the following Java snippet using OpenSSL from the command line: private byte[] hmacSha256(byte[] key, byte[] payload) throws GeneralSecurityException { Mac mac = Mac....
0 votes
1 answer
95 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
33 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-...
6 votes
2 answers
10k views

setting JAVA_HOME and PATH with update-alternatives

EDITED The question was more about bash script them java environment and thanks for those whom had the patience and spare the time to reply me. I am much obliged. As for the Java environment I started ...
2 votes
0 answers
217 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
527 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
0 answers
105 views

Detecting a Pipewire Virtual Sink in Java

I'm trying to set up a Virtual Sink using Pipewire which I've done successfully, however, I am having trouble detecting it in Java though other applications have no problem detecting it. I can play ...
2 votes
3 answers
3k views

How to use the Java plugin in Firefox 52 in Ubuntu?

I am using Ubuntu Mate Xenial and can't find a way to run Java in Firefox 52.

1
2 3 4 5
18