Sublime Forum

The operation could not be completed. Unable to locate a Java Runtime

#1

hi everyone,
i get the following error on ST4/macOS:

SublimeLinter.plugin.cflint [WARNING]: cflint output:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.

I have already installed java using sdkman:

java --version
openjdk 11.0.23 2024-04-16
OpenJDK Runtime Environment Temurin-11.0.23+9 (build 11.0.23+9)
OpenJDK 64-Bit Server VM Temurin-11.0.23+9 (build 11.0.23+9, mixed mode)

How can I solve this?
Thanks!

0 Likes

#2

this is the console being started (if it helps with debugging):

startup, version: 4175 osx arm64 channel: dev
executable: /Applications/Sublime Text.app/Contents/MacOS/sublime_text
application: /Applications/Sublime Text.app
working dir: /
packages path: /Users/ivanionut/Library/Application Support/Sublime Text/Packages
state path: /Users/ivanionut/Library/Application Support/Sublime Text/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/ivanionut/Library/Application Support/Sublime Text/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.373697
OpenGL Context Information:
  GL API Version: 4.1 Metal - 88.1
  GLSL Version: 4.10
  Vendor: Apple
  Renderer: Apple M3 Pro
startup time: 0.471975
first paint time: 0.555434
git: located Sublime Merge installed at /Applications/Sublime Merge.app
git: using configuration from system git install
git: tracking working dir /Users/ivanionut/Documents/WORKS/test1
git: tracking working dir /Users/ivanionut/Documents/WORKS/test2
git: tracking working dir /Users/ivanionut/Documents/WORKS/test3
environment variables loaded using: /bin/zsh -l
reloading python 3.3 plugin Advanced CSV.csvplugin
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
=== NumPy disabled, using TinyNumPy instead ===
To enable cell evaluation using the full NumPy, download NumPy from:
    https://pypi.python.org/pypi/numpy
and install it into Sublime Text's Packages directory.
For information on the features and limitations of TinyNumPy, visit:
    https://github.com/wadetb/tinynumpy
======================
reloading python 3.3 plugin AlignTab.aligner
reloading python 3.3 plugin AlignTab.aligntab
reloading python 3.3 plugin AlignTab.hist
reloading plugin Default.convert_syntax
reloading python 3.3 plugin AlignTab.parser
reloading python 3.3 plugin AlignTab.table
reloading python 3.3 plugin AlignTab.utils
reloading python 3.3 plugin AlignTab.wclen
reloading python 3.3 plugin AttrFold.attr_fold
reloading python 3.3 plugin BracketHighlighter.bh_core
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin A File Icon.plugin
reloading plugin AutoSetSyntax.boot
reloading plugin CFML.cfml_plugin
reloading plugin Codeium.display_completions
reloading python 3.3 plugin BracketHighlighter.bh_logging
reloading python 3.3 plugin BracketHighlighter.bh_plugin
reloading python 3.3 plugin BracketHighlighter.bh_popup
reloading python 3.3 plugin BracketHighlighter.bh_regions
reloading python 3.3 plugin BracketHighlighter.bh_remove
reloading python 3.3 plugin BracketHighlighter.bh_rules
reloading python 3.3 plugin BracketHighlighter.bh_search
reloading python 3.3 plugin BracketHighlighter.bh_swapping
reloading python 3.3 plugin BracketHighlighter.bh_wrapping
reloading python 3.3 plugin BracketHighlighter.support
reloading python 3.3 plugin CFDocs.cfdocs
reloading python 3.3 plugin CFMLDocPlugin.docifycfml
reloading python 3.3 plugin ChangeQuotes.change_quotes
reloading python 3.3 plugin Close All without Confirmation.close_all_without_confirm
reloading python 3.3 plugin CodexAI.codex_ai
reloading python 3.3 plugin CSV.csvplugin
reloading python 3.3 plugin FileDiffs.file_diffs
reloading python 3.3 plugin Indent XML.indentxml
reloading python 3.3 plugin Indent XML.setup
reloading python 3.3 plugin JSONLint.JSONLint
reloading python 3.3 plugin LastModifiedIndicator.LastModifiedIndicator
reloading python 3.3 plugin OpenHere.openhere
reloading python 3.3 plugin PackageSync.PackageSync
reloading python 3.3 plugin SideBarEnhancements.SideBar
reloading python 3.3 plugin SideBarEnhancements.SideBarAPI
reloading python 3.3 plugin SqlBeautifier.sqlbeautifier
reloading plugin Codeium.language_server
reloading plugin Codeium.login
reloading plugin Codeium.protorequests
reloading plugin Compass Navigator.plugin
reloading plugin Compass Navigator.utils
reloading plugin DoxyDoxygen (evolution).Doxy
reloading python 3.3 plugin Strip Whitespace Lines.sublime-strip-whitespace-lines
reloading python 3.3 plugin TabsExtra.support
reloading python 3.3 plugin TabsExtra.tab_menu
reloading python 3.3 plugin TabsExtra.tab_sort_helper
reloading python 3.3 plugin TabsExtra.tabs_extra
reloading plugin EditorConfig.EditorConfig
reloading python 3.3 plugin Terminus.main
reloading plugin Khan.plugin
reloading plugin Less.plugin
reloading plugin LSP-css.data_types
reloading python 3.3 plugin Theme - Monokai Pro.Monokai Pro
reloading python 3.3 plugin TrailingSpaces.trailing_spaces
reloading python 3.3 plugin CloseFolder.CloseFolder
reloading python 3.3 plugin JsPrettier.__init__
reloading python 3.3 plugin JsPrettier.JsPrettier
reloading python 3.3 plugin rainbow_csv.auto_syntax
reloading python 3.3 plugin rainbow_csv.main
reloading python 3.3 plugin rainbow_csv.sublime_rbql
reloading python 3.3 plugin StringUtilities.stringutilities
reloading plugin LSP-css.plugin
reloading plugin LSP-eslint.plugin
reloading plugin LSP-html.data_types
reloading plugin LSP-html.plugin
reloading plugin LSP-typescript.commands
reloading plugin LSP-typescript.plugin
reloading plugin LSP-typescript.plugin_types
reloading plugin LSP.boot
reloading plugin MarkdownEditing.plugin
reloading plugin OpenAI completion.assistant_settings
reloading plugin OpenAI completion.buffer
reloading plugin OpenAI completion.cacher
reloading plugin OpenAI completion.jl_utility
reloading plugin OpenAI completion.openai
reloading plugin OpenAI completion.openai_network_client
reloading plugin OpenAI completion.openai_panel
reloading plugin OpenAI completion.openai_worker
reloading plugin OpenAI completion.output_panel
reloading plugin OpenAI completion.settings_reloader
reloading plugin OpenAI completion.stop_worker_execution
reloading plugin OpenAI completion.worker_running_context
reloading plugin Package Control.plugin
reloading plugin Pretty JSON.PrettyJson
reloading plugin Pretty JSON.PrettyJsonListeners
reloading plugin RainbowBrackets.main
reloading plugin Sass.plugin
reloading plugin SublimeLinter-contrib-CFLint.linter
reloading plugin SublimeLinter-json.linter
reloading plugin SublimeLinter-tslint.linter
reloading plugin SublimeLinter.__allo__
reloading plugin SublimeLinter.__init__
reloading plugin SublimeLinter._init
reloading plugin SublimeLinter.active_linters_view
reloading plugin SublimeLinter.busy_indicator_view
reloading plugin SublimeLinter.goto_commands
reloading plugin SublimeLinter.highlight_view
reloading plugin SublimeLinter.log_handler
reloading plugin SublimeLinter.panel_view
reloading plugin SublimeLinter.quick_actions
reloading plugin SublimeLinter.status_bar_view
reloading plugin SublimeLinter.sublime_linter
reloading plugin Tips.Tips
reloading plugin SFTP.SFTP
plugins loaded
Empty file I belive
SublimeLinter: WARNING: cflint output:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.


SublimeLinter.plugin.cflint [WARNING]: cflint output:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.


SublimeLinter: WARNING: cflint output:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.


SublimeLinter.plugin.cflint [WARNING]: cflint output:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.


Empty file I belive
reloading settings Packages/User/PackageSync.sublime-settings
Package Control: Skipping automatic upgrade, last run at 2024-07-05 08:26:31, next run at 2024-07-05 16:26:31 or after
1 Like

#3

I tried uninstalling all plugins and keeping only the necessary ones, but I still have the same problem. This is the startup log. Has anyone ever had this issue?

startup, version: 4177 osx arm64 channel: dev
executable: /Applications/Sublime Text.app/Contents/MacOS/sublime_text
application: /Applications/Sublime Text.app
working dir: /
packages path: /Users/ivanionut/Library/Application Support/Sublime Text/Packages
state path: /Users/ivanionut/Library/Application Support/Sublime Text/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/ivanionut/Library/Application Support/Sublime Text/Installed Packages
ignored_packages: ["Color Scheme - Legacy", "Vintage"]
pre session restore time: 0.200278
OpenGL Context Information:
  GL API Version: 4.1 Metal - 88.1
  GLSL Version: 4.10
  Vendor: Apple
  Renderer: Apple M3 Pro
startup time: 0.262932
environment variables loaded using: /bin/zsh -l
git: located Sublime Merge installed at /Applications/Sublime Merge.app
git: using configuration from system git install
git: tracking working dir /Users/ivanionut/Documents/WORKS/test1
first paint time: 0.313494
reloading python 3.3 plugin CFDocs.cfdocs
reloading python 3.3 plugin SideBarEnhancements.SideBar
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading python 3.3 plugin SideBarEnhancements.SideBarAPI
reloading python 3.3 plugin Trimmer.Trimmer
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin CFML.cfml_plugin
reloading plugin Package Control.plugin
reloading plugin RainbowBrackets.main
reloading plugin SublimeLinter-contrib-CFLint.linter
reloading plugin SublimeLinter.__allo__
reloading plugin SublimeLinter.__init__
reloading plugin SublimeLinter._init
reloading plugin SublimeLinter.active_linters_view
reloading plugin SublimeLinter.busy_indicator_view
reloading plugin SublimeLinter.goto_commands
reloading plugin SublimeLinter.highlight_view
reloading plugin SublimeLinter.log_handler
reloading plugin SublimeLinter.panel_view
reloading plugin SublimeLinter.quick_actions
reloading plugin SublimeLinter.status_bar_view
reloading plugin SublimeLinter.sublime_linter
plugins loaded
SublimeLinter: WARNING: cflint output:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.


Package Control: Skipping automatic upgrade, last run at 2024-07-25 11:23:37, next run at 2024-07-25 19:23:37 or after
0 Likes

#4

Such kinds of errors normally mean required environment variables not having been set-up, correctly.

ST invokes your login shell upon application start to read environment variables from it.

It’s zsh in your case, according to the following line

environment variables loaded using: /bin/zsh -l

This can be solved by placing required env variable definitions into correct zsh init file.

I can remember various such discussions caused by variables being defined in .bashrc (.zshrc for zshell) instead of .profile, because the former one is called only for interactive shells.

0 Likes