Set 2 class path here, 1 for android SDK and another for auto-generation code under ./gen
If I only set ./gen like:
let g:syntastic_java_javac_classpath = "./gen"
code like R.layout.xxx pass, but code call Android SDK fail
If I only set Android SDK like:
let g:syntastic_java_javac_classpath = "/Users/hkbarton/DevTools/Android/sdk/platforms/android-19/android.jar"
code call android SDK pass, but R.layout.xxx fail
This make sense.
But if I set both like:
let g:syntastic_java_javac_classpath = "./gen:/Users/hkbarton/DevTools/Android/sdk/platforms/android-19/android.jar"
Why both code are not pass?
@troydm might want to answer this. On a quick look: this and this, while probably unrelated to the problem above, look suspicious.
@lcd047 no this code is related only when you are saving classpath using :SyntasticJavacEditClasspath and you have configuration files enabled
@hkbarton are you setting this variables globally or are u using :SyntasticJavacEditClasspath command?
@troydm In the first case the classpath is used as a regexp. In the second, the classpath is enclosed in double quotes without any escaping. Are you sure these are ok?
@troydm I'm using :SyntasticJavacEditClasspath in the specific project
@troydm In my .vimrc i set let g:syntastic_java_javac_config_file_enabled=1, then I'm using :SyntasticJavacEditClasspath in my android project, notice there is a file generated under project dir, named ".syntastic_javac_config", content is like: let g:syntastic_java_javac_classpath = "xxx:xxx".
I'm wondering the .jar path is a absolute jar path, and the ./gen is a relative folder path, and javac need deal with these 2 situations use different approach?
@troydm I'm trying use javac manually like this: javac -cp /usr/local/android/sdk/platforms/android-19/android.jar:./gen ./src/com/demo/TestPrj/actTest.java, it succeed
@troydm @lcd047 ok, i think i found the bug should in there: https://github.com/scrooloose/syntastic/blob/master/syntax_checkers/java/javac.vim#L357, need use ":" as split split(g:syntastic_java_javac_classpath, ":") in new version of syntastic. would you mind a pull request?
Shouldn't that be ":" on UNIX and ";" on Windows?
@lcd047 yes, thanks for review. commit another fix.
@hkbarton ahh yes, ic that code was handling cases when classpath is on separate lines but since we don't have that anymore it wasn't handling it the right way. I'll do some overall checker review and do some cleanup of code later as i'll have some freet time, thx for the fix