Error: could not find or load main class CSC-101.Proj.4.Hangman
Caused by: Java.lang.NoClassDefFoundError: Hangman (wrong name: CSC-101/Proj/4/Hangman)
[process exited 1]
当我尝试使用 python 时,即使我从同一工作目录运行它,我也什么也得不到:
[process exited 0]'
我不明白,因为当我在 nvim 中输入“:term python3 %”时,它工作得很好。
这是我正在使用的功能:
funcs.run_code = function()
local filename = vim.fn.expand("%")
local basename = vim.fn.expand("%:r")
local filetype = vim.bo.filetype
local cmd = nil
if filetype == "python" then
cmd = "term: python3 "..filename
elseif filetype == "java" then
cmd = "term: javac "..filename.." && java "..basename
end
if cmd then
vim.cmd("w")
vim.cmd(cmd)
else
print("No interpreter or compiler defined for filetype: '"..filetype.."'")
end
end
谢谢!