windows - Cassandra - "The system cannot find the file specified"
问题描述
I have installed Cassandra on Windows 10, and now when I try to run it using "cassandra", I get the following error:
Any ideas?
解决方案
After looking at the file it seems, powershell script cassandra-env.ps1
executes following function:
if (Test-Path Env:\JAVA_HOME)
{
$env:JAVA_BIN = "$env:JAVA_HOME\bin\java.exe"
}
elseif (Get-Command "java.exe")
{
$env:JAVA_BIN = "java.exe"
}
else
{
echo "ERROR! No JAVA_HOME set and could not find java.exe in the path."
exit
}
I'm not an expert on Cassandra stuff, but if I were you I would run this script and make sure $env:JAVA_BIN
is set correctly, and from there I would follow its trail and check
ParseJVMInfo
function in the conf\cassandra-env.ps1
file which is throwing error in your setup.
Update: Check JAVA_HOME environment variable and see if it is setup such that [JAVA_HOME]\bin\java.exe exists.
推荐阅读
- c# - 尝试到达 REST 端点时出现 NullReferenceException
- testing - 如何在 golang 基准测试中正确地 StartTime 和 StopTime?
- javascript - 加/减号码
- linux - 优化大文件的awk命令
- javascript - 在 Elixir 或 jQuery 中循环输入
- shopify - 如何以编程方式添加特定的 Shopify 菜单?
- javascript - 每个事件循环处理多少个 JS 语句?
- r - 两个数据框列之间的百分比差异(仅数字)
- linux - 在 64 位 Linux 上,ptrace() 可以返回双精度值吗?
- c# - 使用带有 DBContext 依赖注入的部分视图模型实例在 _layout.cshtml 中渲染部分视图