Unable to locate a java runtime that supports javaws

How to solve “Unable to locate a Java Runtime that supports” error?

I am trying to run a java-based program called Caver analyst on MacOS BigSur 11.2.3 When I click on the Unix executable file, a terminal window pops up with the following message:

/Users/amir/Desktop/caver_analyst2/bin/caver_analyst ; exit; The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null). Please visit http://www.java.com for information on installing Java. The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null). Please visit http://www.java.com for information on installing Java. Found jdkhome= Cannot find java. Please use the --jdkhome switch. 

I downloaded the latest Java version (15.0.2) and, as recommended in similar questions, added its path to the .config file, however, nothing works. Thanks for the help!

It seems that your Java binary cannot be found. May I suggest adding to output of the following commands in a Terminal ? «java -version», «echo $JAVA_HOME» and «echo $JDKHOME»

Hey @FloT, I did as you suggested, but it still does not work. The output of java -version is: java version «16» 2021-03-16 Java(TM) SE Runtime Environment (build 16+36-2231) Java HotSpot(TM) 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)

Читайте также:  Http prices autoins ru priceautoparts repair parts html

Yes @amiro, I wasn’t expecting this to make to stuff work, only to give some ideas of what goes wrong 🙂 does «echo $JAVA_HOME» shows a path ?

5 Answers 5

I found out that the issue here is having the regular runtime versus a developer kit (JRE).

In theory, no end-user application should need the JDK (it’s supposed to be for developers), but as we can see, that’s not how it works in practice.

Also note that since Oracle has imposed stricter licensing terms on Java, you should probably download something more open (an «OpenJDK»), like Amazon’s Coretto.

It seems that you are missing Java environment variable to make your program work.

Solution 1

Try to run caver_analyst with the —jdkhome switch, followed by (I guess) the path to a valid JDK as suggested in your error message. It should solve your problem.

Solution 2

Usually, the path to Java must be defined in a JAVA_HOME environment variable. Yours is obviously not defined, so let’s define it manually :

  1. Open a Terminal
  2. Go to your home directory with command cd
  3. Look for a file called «.zshrc» in this directory:
you@yourmac ~ % ls .zshrc .zshrc 
  1. If it does not exist i.e. if the command ls .zshrc gives you a «No such file or directory» message, create the file: touch .zshrc
  2. Get the path to Java and keep it somewhere : which java
  3. Open the newly created file (it’s a hidden file so you will have to show hidden files. Alternatively, you can edit the file in command line with nano .zshrc )
  4. At the end of the file, add the following line : export JAVA_HOME=»/Path/to/your/java/home» and replace /Path/to/your/java/home with the path that you got at step 5.
  5. Save, close the file, reboot your laptop.

This file will be automatically read and its instructions executed when you open your profile. The «export» instruction creates an environment variable. You can verify if it was successfully created with echo $JAVA_HOME , echo being a command to display something. The «$» in front of the variable tells echo to look for a variable.

I hope this helps, but if it doesn’t, please don’t hesitate to share the error messages and step where it fails here.

Источник

Java 8 installation not compatible with javaws resulting in failure to locate Java Runtime

To open a pop-up message, simply double-click. Alternatively, you can access the message from a terminal. It’s important to note that Java Web Start was deprecated in Java 9 and removed in Java 11. If you want to launch Java Web Start applications from the browser, be sure to enable the feature in System Preference > Java > Security. This applies even if you plan to launch the applications without a browser.

Unable to locate a Java Runtime that supports javaws although Java 8 is installed

When attempting to open JNLP files on my Mac, I receive a pop-up message instead of the file opening.

The operation couldn’t should be finalized with javaws compatibility. For details regarding installing Java, kindly check http://www.java.com.

$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_333.jdk/Contents/Home/ $ /usr/bin/java -version java version "1.8.0_333" Java(TM) SE Runtime Environment (build 1.8.0_333-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode) $ /usr/bin/javaws The operation couldn’t be completed. Unable to locate a Java Runtime that supports javaws. Please visit http://www.java.com for information on installing Java. 

Although Java Web Start was deprecated in Java 9 and removed in Java 11, it is still available in Java 8. Despite this, there seems to be some uncertainty regarding the status of Web Start. Can you clarify?

The error message was misleading because the problem was actually related to permissions. If someone else is experiencing this issue, it could be helpful to check the permissions.

Ensure that the option «Enable launching Java Web Start applications from the browser» is enabled in the Security settings of the Java section in System Preferences, even when launching such applications without using a browser.

Unable to locate a Java Runtime that supports javaws, 1 If anyone is facing the same issue, this was a permission issue, although the error message is misleading. In System Preference > Java > Security, make sure “Enable launching Java Web Start applications from the browser” is enabled, even when launching them without a browser. Share Improve this …

Unable to locate a Java Runtime that supports javac

I am trying to compile a Java program that displays «Hello World» using Java version 8 update 333, but during compilation, the following occurs:

The operation couldn’t be completed. Unable to locate a Java Runtime that supports javac. Please visit http://www.java.com for information on installing Java. 
java version "1.8.0_333" Java(TM) SE Runtime Environment (build 1.8.0_333-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode) 

It’s possible that you installed a JRE (Java Runtime Environment) instead of a JDK (Java Development Kit. To compile, you will require a JDK.

The answer, which can be found above, was provided by RealSkeptic. Thanks to them for their contribution.

Unable to locate a Java Runtime that supports javac, I am attempting to compile a "Hello World" program in Java 8 update 333. When I attempt to compile it, this happens: The operation couldn’t be completed. Unable to locate a Java Runtime t

/gradlew The operation couldn’t be completed. Unable to locate a Java Runtime

Upon executing the ./gradlew in the project directory, the following output is generated:

./gradlew The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java. 
which java /usr/bin/java /usr/bin/java The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java. 

It appears that the installation of JDK in Android studio was successful and it can now be found in ~/Library/Android/sdk/sources/android-28 .

Errors, such as the ones produced by export JAVA_HOME=/Users/mrgloom/Library/Android/sdk/sources/android-28/ or export JAVA_HOME=/Users/mrgloom/Library/Android/sdk , occur during the given setting.

ERROR: JAVA_HOME is set to an invalid directory: /Users/mrgloom/Library/Android/sdk/sources/android-28/ Please set the JAVA_HOME variable in your environment to match the location of your Java installation. 

What is the procedure to indicate the path for Java in gradlew ?

Utilizing the Java Development Kit that comes with Android Studio and implementing the export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home configuration proved to be beneficial for me.

Java Runtime Error python pip install package in big sur, Unable to locate a Java Runtime that supports apt. Stack Overflow. About; Products For Teams; Stack Overflow Public questions & answers; Stack

JDK is installed on mac but i’m getting «The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.» sudo apt update

On my MacOS terminal, I’m attempting to execute the following command: sudo apt update .

The response message I’m receiving contains the code The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt. Please visit http://www.java.com for information on installing Java. .

Despite following the solution provided, which involved JDK installation, I am receiving the same response. Although, I did come across a similar question previously.

export PATH="$HOME/.jenv/bin:$PATH" eval "$(jenv init -)" export JAVA_HOME="$HOME/.jenv/versions/`jenv version-name`" 

I tried to move it to my folder named .zshrc.save but was unsuccessful.

Upon executing the command java -version in the terminal, the following output is generated.

java version "15.0.2" 2021-01-19 Java(TM) SE Runtime Environment (build 15.0.2+7-27) Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing) 

Two decades ago, a tool named apt was included with Java, which was the Annotation Processor Tool. However, this tool became outdated shortly after its release.

The update labeled node-js refers to an entirely different tool, namely Advanced Package Tool , which is designed for managing installations on Debian and Ubuntu Linux distributions. It is not recommended to run this tool on a Mac as it is not compatible. The instructions you found are only applicable for Linux and therefore useless for your machine.

Seek solutions related to brew since it is the preferred substitute for apt on Mac. It should be noted that this has no association with Java and any similarities are entirely coincidental.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 

Create a symlink for the JDK to be located by the system’s Java wrappers.

sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk 

To prioritize openjdk in your PATH, execute the following command.

echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.profile 

It may be necessary to configure the settings for compilers to detect openjdk.

 export CPPFLAGS="-I/usr/local/opt/openjdk/include" 

Unable to install or find python on terminal, Java error, Even though JRE 8 is installed on my MAC -» No Java Runtime present,requesting to install » gets displayed in terminal 307 Could not find a version that satisfies the requirement tensorflow

Источник

Installing javaws through SDKMAN on MacOS to access a KVM remote host?

SDKMAN should install the full JDK, right? Today I run sdk install java 18.0.1.1-open to install the OpenJDK. After resetting my Terminal, I still can’t access javaws :

The operation couldn’t be completed. Unable to locate a Java Runtime that supports javaws. Please visit http://www.java.com for information on installing Java.

openjdk 18.0.1.1 2022-04-22 OpenJDK Runtime Environment (build 18.0.1.1+2-6) OpenJDK 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)

What is going on? Is javaws not installed through SDKMAN? I need to open a jnlp file to access a KVM remote host.

1 Answer 1

Java Web Start (JWS) was deprecated in Java 9, and starting with Java 11, Oracle removed JWS from their JDK distributions. This means that clients that have the latest version of Java installed can no longer use JWS-based applications. And since public support of Java 8 has ended in Q2/2019, companies no longer get any updates and security fixes for Java Web Start.

This is why we decided to create OpenWebStart, an open source reimplementation of the Java Web Start technology. Our replacement provides the most commonly used features of Java Web Start and the JNLP standard, so that your customers can continue using applications based on Java Web Start and JNLP without any change.

So I installed it through Homebrew:

brew install --cask openwebstart 

and then I could open the file with the installed OpenWebStart application.

Источник

Оцените статью