Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find java. Please use the --jdkhome switch #7749

Open
MichelKutu opened this issue Apr 7, 2023 · 1 comment
Open

Cannot find java. Please use the --jdkhome switch #7749

MichelKutu opened this issue Apr 7, 2023 · 1 comment

Comments

@MichelKutu
Copy link

hello
I am trying to install autopsy 4.20 on my MacOS Ventura 13.2 but I am running into an issue.
When executing the binary /bin/autopsy the following error appears:
"Cannot find java. Please use the --jdkhome switch"

my current java version is :

admsig@MacBook-Pro-de-admsig ~ % java --version                                                                    
java 20 2023-03-21
Java(TM) SE Runtime Environment (build 20+36-2344)
Java HotSpot(TM) 64-Bit Server VM (build 20+36-2344, mixed mode, sharing)

and my autopsy configuration file looks like this :

Sat, 14 Jan 2023 11:26:51 -0500
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

# ${HOME} will be replaced by user home directory according to platform.
#
# Default locations of userdir and cachedir:
# (http://wiki.netbeans.org/FaqWhatIsUserdir)
#
# On Windows ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
# with <AppData>\<AppName>, where <AppData> is the value of 
# "AppData" key in Windows Registry under
# "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
# and ${DEFAULT_CACHEDIR_ROOT} will be replaced by the launcher
# with the value of "<LocalAppData>\<AppName>\Cache" where "LocalAppData"
# is a key in Windows Registry under 
# "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders".
# <AppName> is the the executable's filename without the extension.
#
# On Mac ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
# with "~/Library/Application Support/<AppName>" and
# ${DEFAULT_CACHEDIR_ROOT} with "~/Library/Caches/<AppName>"
# where <AppName> is the launcher script's name.
#
# On other systems ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
# with "${HOME}/.<AppName>" and ${DEFAULT_CACHEDIR_ROOT} with 
# "${HOME}/.cache/<AppName>".
#
# You can also use ${HOME} variable which will be replaced with
# user.home JVM system property value. 
#
# The above location variables are valid only in the default_userdir and
# default_cachedir properties.
#
# NOTE: If you specify a non-default userdir path on command line
# (--userdir option) and don't specify a cachedir path (--cachedir option),
# cachedir will be in "<userdir>/var/cache".
#
# Cachedir must be different from userdir. The same cachedir and userdir
# would cause problems.
#

default_userdir="${DEFAULT_USERDIR_ROOT}/dev"
default_cachedir="${DEFAULT_CACHEDIR_ROOT}/dev"

# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options="--branding autopsy -J-Xms24m -J-Xmx4G -J-Xverify:none -J-XX:+UseG1GC -J-XX:+UseStringDeduplication -J-Dprism.order=sw"
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea

# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
jdkhome="/Library/Java/JavaVirtualMachines/jdk-20.jdk/Contents/Home/bin/java"
jreflags="-Djna.library.path=/usr/local/lib" 
# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)
#extra_clusters=

thank you in advance for your help

@imol-ai
Copy link

imol-ai commented Apr 24, 2023

Maybe, you need to: "use the --jdkhome switch". Set the switch to point to your java installation, on macintosh: /Library/Java/JavaVirtualMachines/. You will have to probably install an older java than 20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants