Closed crazy-canux closed 8 years ago
@crazy-canux can you try :echo javacomplete#server#GetCompiler()
and also try to use :call javacomplete#server#Compile()
Sure,
And got this errors:
javac: directory not found: /home/chengca/.vim/bundle/vim-javacomplete2-master/libs/javavi/target/classes
"test.java" [New File]
Error detected while processing function javacomplete#Start..javacomplete#server#Start..javacomplete#server#GetClassPath..
shell returned 2 No Javavi library classes found, it means that we couldn't compile it. Do you have JDK8+ installed? Press ENTER or type command to continue
But, I already installed openjdk8. And java -version can prove i
javac: directory not found: /home/chengca/.vim/bundle/vim-javacomplete2-master/libs/javavi/target/classes
please do not use vim-javacomplete2-master
,change it to vim-javacomplete2
if you just down load the zip file ,please unzip it
I have lots of plugins in ~/.vim/bundle, and others are working well. Of course I unzip it. mv vim-javacomplete2-master vim-javacomplete2 Still the same error.
can you try with
call mkdir('/home/chengca/.vim/bundle/vim-javacomplete2-master/libs/javavi/'. join(['target', 'classes'], g:FILE_SEP), "p")
BTW, are you using pathogen?
Yes, I am using pathogen.
How to try with " call mkdir('/home/chengca/.vim/bundle/vim-javacomplete2-master/libs/javavi/'. join(['target', 'classes'], g:FILE_SEP), "p")" ?
run in vim .
call mkdir('/home/chengca/.vim/bundle/vim-javacomplete2-master/libs/javavi/'. join(['target', 'classes'], g:FILE_SEP), "p")
E739: Cannot create directory: /home/chengca/.vim/bundle/vim-javacomplete2-master E739: Cannot create directory: /home/chengca/.vim/bundle/vim-javacomplete2-master/libs/javavi/target/classes
it is due to the different file permission; and you can run this command in terminal ,and see the different file permission between them.
ls -l /home/chengca/.vim/bundle
Recommend to use dein.vim to manager your plugins instead of download plugin yourself.
*mkdir()* *E739*
mkdir({name} [, {path} [, {prot}]])
Create directory {name}.
If {path} is "p" then intermediate directories are created as
necessary. Otherwise it must be "".
If {prot} is given it is used to set the protection bits of
the new directory. The default is 0755 (rwxr-xr-x: r/w for
the user readable for others). Use 0700 to make it unreadable
for others. This is only used for the last part of {name}.
Thus if you create /tmp/foo/bar then /tmp/foo will be created
with 0755.
Example: >
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
< This function is not available in the |sandbox|.
Not available on all systems. To check use: >
:if exists("*mkdir")
<
No, I didn't see any different.
drwxr-xr-x 4 root root 4096 Aug 8 2015 bufexplorer drwxr-xr-x 5 root root 4096 Aug 8 2015 ctrlp drwxr-xr-x 6 root root 4096 Sep 8 2015 delimitMate-master drwxr-xr-x 5 root root 4096 Jan 3 01:12 emmet-vim-master drwxr-xr-x 9 root root 4096 Nov 19 20:15 jedi-vim-master drwxr-xr-x 3 root root 4096 Aug 8 2015 minibufexpl drwxr-xr-x 3 root root 4096 Aug 8 2015 molokai drwxr-xr-x 4 root root 4096 Aug 8 2015 nerdcommenter drwxr-xr-x 8 root root 4096 Aug 8 2015 nerdtree drwxr-xr-x 7 root root 4096 Dec 19 2013 perlomni.vim-master drwxr-xr-x 10 root root 4096 Aug 26 2015 python-mode-master drwxr-xr-x 4 root root 4096 Mar 5 2013 rainbow_parentheses.vim-master drwxr-xr-x 9 root root 4096 Aug 8 2015 riv drwxr-xr-x 4 root root 4096 Aug 8 2015 surround drwxr-xr-x 7 root root 4096 Dec 3 13:56 syntastic drwxr-xr-x 4 root root 4096 Dec 29 2012 tablify-master drwxr-xr-x 6 root root 4096 May 17 2013 tabular-master drwxr-xr-x 6 root root 4096 Aug 8 2015 tagbar drwxr-xr-x 4 root root 4096 Aug 8 2015 taglist drwxr-xr-x 8 root root 4096 Mar 25 23:47 tern_for_vim-master drwxr-xr-x 5 root root 4096 Mar 10 10:49 tmux.vim-master drwxr-xr-x 14 root root 4096 Dec 9 21:59 ultisnips-master drwxr-xr-x 6 root root 4096 Oct 19 2015 vim-airline-master drwxr-xr-x 3 root root 4096 Jul 26 2015 vim-colorschemes drwxr-xr-x 5 root root 4096 Aug 8 2015 vim-colors-solarized drwxr-xr-x 6 root root 4096 Jan 3 22:39 vim-easymotion-master drwxr-xr-x 4 root root 4096 Dec 1 17:04 vim-fugitive-master drwxr-xr-x 5 root root 4096 Aug 8 2015 vim-gitgutter drwxr-xr-x 6 root root 4096 Oct 26 2015 vim-indent-guides-master drwxr-xr-x 3 root root 4096 Jan 19 2015 vim-instant-markdown-master drwxr-xr-x 4 root root 4096 Jun 24 2015 vim-ipython-master drwxr-xr-x 7 root root 4096 Jan 6 01:38 vim-javacomplete2 drwxr-xr-x 10 root root 4096 Dec 23 17:35 vim-markdown-master drwxr-xr-x 4 root root 4096 Aug 8 2015 vim-nagios drwxr-xr-x 3 root root 4096 Aug 8 2015 vim-pathogen drwxr-xr-x 10 root root 4096 Jan 7 21:29 vim-perl-master drwxr-xr-x 7 root root 4096 Aug 8 2015 vim-puppet drwxr-xr-x 6 root root 4096 Oct 30 2015 vim-rails-master drwxr-xr-x 11 root root 4096 Aug 8 2015 vim-ruby-master drwxr-xr-x 4 root root 4096 Jul 25 2015 vim-trailing-whitespace-master drwxr-xr-x 5 root root 4096 Jan 2 11:55 vim-virtualenv-master drwxr-xr-x 7 root root 4096 Aug 8 2015 vimwiki drwxr-xr-x 7 root root 4096 Nov 5 10:55 Vundle.vim drwxr-xr-x 4 root root 4096 Aug 8 2015 winmanager drwxr-xr-x 8 root root 4096 Feb 5 19:21 YouCompleteMe drwxr-xr-x 6 root root 4096 Jan 13 06:56 zeavim.vim-master
Why root
? Not all plugins need write permissions to it directory. JC2 plugin just cannot compile server lib to generate completions, because of your permissions.
Oh my god! Yes, you are right. root didn't work.
@artur-shaik @wsdjeg thanks very much!!!
Actual behavior (Required!)
Download and install javacomplate2.
Expected behavior (Required!)
use vim to edit *.java files.
The steps to reproduce actual behavior (Required!)
shell returned 2 No Javavi library classes found, it means that we couldn't compile it. Do you have JDK8+ installed?
But, I already installed openjdk8. And java -version can prove it.
Environment (Required!)
Q&A
JCdebugEnableLogs
and can put here content ofJCdebugGetLogContent
command, if you need.g:JavaComplete_JavaviDebug
to1
, than setg:JavaComplete_JavaviLogfileDirectory
, and put here server logs, too.Screenshot (Optional)
The output of :redir and :message (Optional)