diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AutopsyOptionsPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/AutopsyOptionsPanel.java index 36ca201649036aeffd8cfadd5dc1d3790c49332b..56a0f2ceb3eed5bf6cefbeb390e59e9548156b16 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AutopsyOptionsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AutopsyOptionsPanel.java @@ -506,7 +506,6 @@ void load() { confLoaded = true; } catch (IOException ex) { logger.log(Level.SEVERE, "Can't read current Jvm max memory setting from file", ex); - memField.setEnabled(false); heapDumpFileField.setText(DEFAULT_HEAP_DUMP_FILE_FIELD); } memField.setText(initialMemValue); diff --git a/build-windows-installer.xml b/build-windows-installer.xml index c56429a330684f42fa012154fb5afd8ae17393e3..f6d328443c884fe73cd93e37a5e33414f56b62cc 100644 --- a/build-windows-installer.xml +++ b/build-windows-installer.xml @@ -174,11 +174,11 @@ <move file="${nbdist.dir}/installer_${app.name}_64-SetupFiles/installer_${app.name}_64.msi" tofile="${nbdist.dir}/${app.name}-${app.version}-64bit.msi" /> </target> - <!-- 32/64 specific since config settings are different --> + <!-- Sets Java 17 JVM parameters --> <target name="update-config" description="Updates configuration file with correct JVM args."> <property name="inst.property.file" value="${inst-path}/etc/${app.name}.conf" /> - <!-- Sets max heap size to be ${jvm.max.mem} which is set in the run-ai-(32/64) target --> - <var name="jvm.args" value=""--branding ${app.name} -J-Xms24m -J-Xmx${jvm.max.mem} -J-XX:+UseStringDeduplication -J-Dprism.order=sw -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED -J--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED"" /> + <!-- Sets Java 17 JVM parameters --> + <var name="jvm.args" value=""--branding ${app.name} -J-Xms24m -J-XX:+UseStringDeduplication -J-Dprism.order=sw -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED -J--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED"" /> <propertyfile file="${inst.property.file}"> <entry key="default_options" value="@JVM_OPTIONS" /> <!-- Update configuration file to include runtime --> @@ -222,6 +222,19 @@ <exec executable="${ai-exe-path}"> <arg line="/edit ${aip-path} /AddFolder APPDIR\${photorec-rel-path} ${photorec-path-to-use}"/> </exec> + + <!-- FOR 4.21.0 RELEASE ONLY! In rare circumstances on some OSs, due to + Java 17 update some of the existing legacy Java 8 JVM arguments prevent + JVM 17 from starting. Therefore we are overwiriting the Java 8 Autopsy.conf + file with a Java 17 Autopsy.conf file, just in case. This should be removed + from future Autopsy releases. --> + <exec executable="${ai-exe-path}" failonerror="yes"> + <arg value="/edit"/> + <arg value="${aip-path}"/> + <arg value="/AddFolder"/> + <arg value="AppDataFolder\${app.name}"/> + <arg value="${basedir}\installer_autopsy\etc"/> + </exec> <echo message="Removing extra ewfexport_exec binaries..."/> <exec executable="${ai-exe-path}"> diff --git a/installer_autopsy/etc/autopsy.conf b/installer_autopsy/etc/autopsy.conf new file mode 100755 index 0000000000000000000000000000000000000000..ab7b2fe00c2cf4d751ed430a204d354b1a36685c --- /dev/null +++ b/installer_autopsy/etc/autopsy.conf @@ -0,0 +1,71 @@ +#Thu, 15 Jun 2023 09:17:11 -0400 +# 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} +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-XX:+UseStringDeduplication -J-Dprism.order=sw -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED -J--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED" +# 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="/path/to/jdk" + +# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices) +#extra_clusters= + +jdkhome="jre"