Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorshawn9
    • CommentTimeOct 30th 2006
     
    So its been a while since I have programmed in Java.. Does java have a syntax check? For instance you can run php -l to just check the syntax of your code, and I was going to add javac -??? to my VIM so I can syntax check my code from vim.... Does anyone know of this? Thanks!
    • CommentAuthorjavier
    • CommentTimeOct 30th 2006
     
    ByteCode is interpreted, not Java source. In this way the compilation sequence from Java source to ByteCode is where the java source syntax checking occurs. The client typically does not syntax check the compiled bytecode (at least I hope never to!).

    That is the big difference between PHP and Java, IMHO.
    • CommentAuthorshawn9
    • CommentTimeOct 30th 2006
     
    Right, but the what makes a compiled language compiled is the act of turning the source into machine code. Going from a .java file to a .class file doesn't do this. It, as you mentioned, turns it into bytecode. It's sort of a fine line, especially when java can be *compiled* directly into native machine code with certain compilers.

    Anyway, I got what I wanted to work. I also have color highlighting in my vim, so if I miss a { [ ( the color goes crazy. I know there are a ton of very powerful IDEs out there (which I still might go back to) but for the most part I like that VIM is very light and easy to use.

    So I have my exrc to create a temp file (/tmp/javafile.java) and when I hit ^p it compiles it and if there are any errors it prints to my screen in vim.

    I understand the differences between PHP and Java; I was just giving an example of what I was trying to do!

    Thanks!