Questions tagged [java]

Widely-used object-oriented programming language, emphasizing portability. Questions about programming with Java are off topic and should be asked on stackoverflow.com.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Junit giving error: org.mockito.exceptions.misusing.WrongTypeOfReturnValue [migrated]

Junit giving error: org.mockito.exceptions.misusing.WrongTypeOfReturnValue Here is the original code: package com.ms.ets.hive; import java.io.IOException; import java.text.SimpleDateFormat; import ...
Dheeru's user avatar
  • 1
-1 votes
0 answers
24 views

Getting error while downloading Java

I am trying to install Java in my AWS EC2 instance by using this below command: sudo yum install java-1.8.0-openjdk-devel But I'm facing the below error: No match for argument: java-1.8.0-openjdk....
user1803282's user avatar
0 votes
1 answer
27 views

Recommended Deployment for JavaFX Jars (Netbeans)?

I have an issue in Netbeans 17 where I really can't deploy .jar files outside the Netbeans environment. I have a vanilla Netbeans maven project that I'm interesting in deploying to other systems. Is ...
Sarah Szabo's user avatar
0 votes
0 answers
33 views

I have an issue with printing paths from environment variables in windows 11

So I tried to install javabridge for a project that I have with Weka. By doing this I discovered that I can not print the paths from environment variables when I tried to create a CLASSPATH and ...
-3 votes
0 answers
19 views

Format string number [migrated]

I have a string number which is an amount variable I want to format it with commas such that 1000 returns 1,000 and 1000.00 returns exactly 1,000.00 and 1000.000 also returns 1,000.00 at max 2 ...
Zod's user avatar
  • 1
0 votes
0 answers
44 views

Windows 10 Scaling Issue with Java 11 Application

We have recently upgraded an application which has been using Java 8 but was upgraded to Java 11 during the process. Now we are faced with the following problem: Users are working on a HiDPI Laptop (...
MichaelS's user avatar
1 vote
1 answer
46 views

Windows Process-Wide Security for Java via registry keys

My goal is to configure COM/DCOM security for my Java OPC DA client (not server). The main problem is that every time the client tries to get updates from a OPC DA server in asynchronous mode, it ...
devaskim's user avatar
  • 111
0 votes
1 answer
75 views

Why does Java, Android Emulator and Chrome crash complaining about insufficient memory even when I'm using 80% of the memory?

My main computer recently began to crash most applications after just a couple hours of usage complaining about being out of memory. I'm running a Dell Optiplex 7070 with 16GB of RAM. I know 16GB isn'...
adamasan's user avatar
  • 145
0 votes
0 answers
5 views

A special case of Java generics matching [migrated]

I'd like to resolve a dubious point that has been affecting some parts of my code for years — it is fixed with a trivial cast, but now I'd like to understand the rationale behind it and possibly a ...
Fabrizio Giudici's user avatar
0 votes
1 answer
40 views

Download so many tiny files without archiving? [closed]

I want to implement a file server for a mobile app. This app requires so many tiny files to be downloaded from the server before it begins it's work And with updates from version to version some files ...
Shaheen Zahedi's user avatar
0 votes
1 answer
31 views

Are Java libraries shared in memory between processes?

On Linux when two processes (programs) use the same native .so library it is loaded only once. The memory that contains the machine code is shared between processes as read-only so it doesn't have to ...
zomega's user avatar
  • 1,234
0 votes
0 answers
21 views

Java - Connection exception connection timed out

I'm doing a project using Java Sockets to communicate from nodes to other. Our simulation is configured this way, one machine instantiates multiple nodes of a distributed system and the other machine ...
Gabriele Passoni's user avatar
0 votes
0 answers
14 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 ...
cookie_marsh's user avatar
0 votes
1 answer
127 views

Java folder missing from openCV installation with homebrew

On my old MacBook Pro mid 2012 I was able to easily install openCV 4.5.2 with homebrew. After installation I had a java folder with a dylib file and a jar. Now I bought a MacBook Pro M2 2022, ...
gutey's user avatar
  • 1
0 votes
0 answers
28 views

"no jpl in java.library.path" Error when running my chatbot application (SWI-Prolog and Java)

I have been experiencing this problem for days now. I am trying to run my projects on my new Mac device (M1 MBA Ventura 13.3.1). I'm new to macOS so I went and resorted to a few youtube videos on ...
Anon's user avatar
  • 1
0 votes
0 answers
31 views

How do I change the default Java JRE version that is used when double-clicking .jar files in the Finder in macOS?

How do I change the default Java JRE version that is used when double-clicking .jar files in the Finder in macOS? I installed several newer JDKs from Adoptium, but no matter what newer JDKs I install, ...
Felix An's user avatar
0 votes
0 answers
126 views

Minecraft server on VPS crashes due to ressource and watchdog error

I rent a VPS with 8GB RAM to host a minecraft server for my friends, but the server crashes around once a day. To setup the server i used https://www.ionos.com/digitalguide/server/know-how/minecraft-...
BigKeF's user avatar
  • 1
0 votes
1 answer
2k views

I am setting up a Java Minecraft server, 1.19.2 forge with a small modlist — I keep getting this error

I am setting up a Java Minecraft server, 1.19.2 forge with a small modlist — I keep getting this error. This is the log [25Mar2023 11:10:11.541] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]:...
user avatar
0 votes
0 answers
252 views

Can not uninstall java from mac M1

I have the following version of java installed rahul@doctor ~ % java --version openjdk 19.0.1 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10-21) OpenJDK 64-Bit Server VM (build 19.0.1+10-21, ...
Rahul's user avatar
  • 109
1 vote
1 answer
39 views

Can't edit environment variables on Win 10 Pro from start menu - apps won't launch - java no longer correct version

Little lost on what happened here. Having an issue with Windows overall at the moment, pretty sure an upgrade happened (though not confirmed) and it's after doing something to the machine. I started ...
Dexter Whelan's user avatar
2 votes
0 answers
72 views

openjdk@11 is already installed but not found in JavaVirtual Machines folder

I am working on macOS ventura 13.2.1 If i run brew install openjdk@11 i get Warning: openjdk@11 11.0.18 is already installed and up-to-date. java -version gives me The operation couldn’t be ...
Ourania's user avatar
  • 21
0 votes
1 answer
92 views

java not updating "Failed to download required installation files."

On my Windows 7 machine the Java update consistently fails with this error message.This seems to a common problem, does anyone have an insight into what's going wrong, and is there a fix for it other ...
JOHN's user avatar
  • 1
1 vote
0 answers
54 views

My wix website is very, very slow seems like its because of JS [closed]

I have small jewelry website built on wix. Its very slow .. takes around 8 seconds to load up. i tested it on gtmetrix.com https://gtmetrix.com/reports/www.ardonn.co.il/1Vprfypw/ And it appears that ...
Lee's user avatar
  • 11
0 votes
0 answers
62 views

Why java consumes about 3GB of memory on the background?

I am just wondering to know what this process stands for and why it consumes that much of memory consistently in my Ubuntu-22.04LTS background? Is it possible to get ride of it or reduce it's memory ...
best_of_man's user avatar
-1 votes
1 answer
204 views

How can I remove the powershell banner in vscode?

Everytime I use the terminal for a code, vscode sents this banner. How can I remove it? It says: Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Install the latest ...
Saverio's user avatar
0 votes
0 answers
24 views

Installed and functional JDK declared 'defective' by LibreOffice

There are two accounts on my MacbookPro (10.13 ‘High Sierra’), users A and B. Both have admin privileges. LibreOffice Package 7.4.3.2 was installed with install option 'for all users' and has worked ...
Fred Sculla's user avatar
2 votes
1 answer
172 views

PowerShell, properly association .jar files with java.exe or javaw.exe

Using the answer from this question Copy Java installation to another system I can manually install Java (without running the installer) and port it to other systems. This works well. However, I still ...
YorSubs's user avatar
  • 599
0 votes
0 answers
29 views

Cannot drop files onto java apps (having GUIs)

I have macOS 10.15.7 (Catalina) with java installed. When I open a java-based GUI application (e.g. Axone or Jaikoz), then try to drag/drop a file onto it, nothing happens. Additionally, when I open a ...
esp's user avatar
  • 41
0 votes
1 answer
99 views

Why graalvm is not appearing in update-alternatives --config java?

I downloaded the file graalvm-ce-java17-linux-amd64-22.3.0.tar.gz and extract to the location usr/lib/jvm. Then i set the environment path with command export PATH=/path/to/<graalvm>/bin:$PATH ...
Prakash Karkee's user avatar
1 vote
0 answers
42 views

Oracle SSO (Passlogix) prevents Java Application from starting [closed]

I have a Java application which uses a bundled Java runtime (it does NOT use a system installed version of Java). ✅ When I start the application using java.exe -jar myapp.jar, the application works ...
tresf's user avatar
  • 281
2 votes
1 answer
424 views

Copy Java installation to another system

I'd like to create a detached/offline Java setup on Windows to roll out to other systems and VMs. I know that some applications bundle Java within them, but I was wondering if I can also create a Java ...
YorSubs's user avatar
  • 599
0 votes
0 answers
1k views

In 2022, how do I run a java applet on Windows?

Browsers have disabled support for the API it uses. This leaves users with old systems that require Java; an embedded proprietary locked-down device that uses a Java web page to configure it, with no ...
aphid's user avatar
  • 171
0 votes
0 answers
22 views

Having just taken the latest updates to CentOS 7, many GUI applications are crashing on startup

For instance UPM is a password manager based on java. When it starts now, the UI is completely inaccessible. Clicking close does nothing, even killing from the process manager kills the underlying ...
J Collins's user avatar
  • 558
0 votes
0 answers
19 views

MAC OS - Create Shortcut/Application to a command line [duplicate]

I have a .jar file that has to be ran with quite a few command line arguments, so each time I need to run the application I have to open the terminal and write/copy the command to start it. Ideally I ...
JoeIsBlogging's user avatar
1 vote
1 answer
806 views

JAVA_HOME env var in WSL return the error "not defined correctly' when a try run a mvn command

I set the JAVA_HOME with the command export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/bin/java and tried to run an app with mvn compile jib:build. But return this message: The JAVA_HOME environment ...
Brener Augusto de Oliveira's user avatar
0 votes
2 answers
150 views

Open a file by file format with batch script

So I am trying to open any file that ends with .jar with Java without having Java installed into windows, but a custom install path. Currently my code looks like this which I also found on the web: &...
pasi123567's user avatar
0 votes
0 answers
233 views

Can't execute .jar files as non-admin user on Windows 10

I have multiple computers that I am the administrator for. They have non-admin accounts used by their daily users, and I use my admin privileges to execute programs for those users on occasion. On one ...
Joe M's user avatar
  • 355
0 votes
1 answer
37 views

How do I run a Java 1.0/1.1 Applet on a modern system?

I have an old Java Applet that needs to run in JDK 1.0 or 1.1. How do I run it on a modern system, for example Windows or Linux on a 64bit CPU?
Pibben's user avatar
  • 101
0 votes
0 answers
80 views

Command works only when user ran it, not with eval

I'm trying to automate build. I made a complete script which can be seen here, but I made a minimal example: #!/bin/bash trap "exit" INT DIR="spigot/spigotJars/install" if [ -d &...
Elikill58's user avatar
  • 135
0 votes
0 answers
87 views

What linux user does eclipse run Linux commands as?

Linux running as user x executes Linux commands using runtime.exec. What user does the command run as and how can one tell? Yes. Eclipse running as root won't execute sudo -n commands passed into java ...
Kim K. M's user avatar
2 votes
1 answer
2k views

"Unable to add module to the current project as it is not of packaging type 'pom'" - How to load a given Maven project into VSCode/VSCodium?

Since there are no stupid questions, I dare to ask this stupid question. As a beginner at 0, I do not see how to make the step 0, that is, how to stand at the starting point at all. I stumbled upon a ...
questionto42's user avatar
  • 1,705
0 votes
0 answers
219 views

Apache NetBeans 12.3 on macOs 12 crashes on startup

Java(TM) SE Runtime Environment (build 18.0.2.1+1-1) is installed. Apache NetBeans 12.3 is installed. I launch it and it gets as far as "Done loading modules." before throwing in the towel ...
jon.oneil's user avatar
0 votes
1 answer
53 views

Docker RUN installs don't exist in ubuntu

I have the following Dockerfile: FROM ubuntu:22.04 COPY filebeat.yml /home/docker/filebeat.yml RUN apt update && \ apt install -y sudo curl vim && \ adduser --disabled-password ...
Logister's user avatar
  • 103
0 votes
0 answers
41 views

Migrating current NetBeans 11.2 IDE working environment to fresh Windows install

I have worked with Java for quite some time, but until lately, I've just used my favorite text editor and javac. I currently support a large project that is set up in Apache NetBeans 11.2. I ...
Mark Stewart's user avatar
0 votes
1 answer
576 views

how to find an exact match with findstr

The output of the command: java -version is: java version "1.8.0_341" Java(TM) SE Runtime Environment (build 1.8.0_341-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode) ...
acgbox's user avatar
  • 712
-1 votes
2 answers
362 views

How to detect java by cmd, after installing it, without restarting the PC in windows 10

When I install Java, at the end of the installation, it does not detect it on my system: C:\Windows\system32>where java INFO: No file could be found for the given patterns. and C:\Windows\system32&...
acgbox's user avatar
  • 712
0 votes
0 answers
16 views

How to add Java EE features in eclipse installed via Ubuntu snapcraft?

I have installed Eclipse from snapcraft in Ubuntu. Now I want Java EE features. How can I add it? I am using Ubuntu 22.04.
Payel Senapati's user avatar
0 votes
0 answers
80 views

Tomcat failed to install after running script through user data of Ubuntu EC2 instance on AWS

This is the script I added to the user data: #!/bin/bash sudo apt update sudo apt upgrade -y sudo apt install openjdk-11-jdk -y sudo apt install tomcat10 tomcat10-admin tomcat10-docs tomcat10-common ...
codestein's user avatar
2 votes
1 answer
41 views

Cannot catch output of programme. No one of streams redirection works

I would like to save the result of analysis of a number of nested sampling log files. I analyse it the next way: applauncher NSLogAnalyser -noposterior -N 76 -log .\...
Vovin's user avatar
  • 125
0 votes
1 answer
55 views

What is a Application/Service Certificate compliant with FIPS 140-2

I have enabled FIPS on my AWS EC2s and updated the prefix's as shown here: https://aws.amazon.com/compliance/fips/ All of this is working in the AMI Build & Pipeline, however, at the application ...
ianhalfpenny's user avatar

1
2 3 4 5
47