this post was submitted on 13 Nov 2023
1 points (100.0% liked)

Emacs

311 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Hi

I managed to setup lsp and java for emacs. I can compile and all works fine.

I set compile command in init.el to run javac and java command so I see the result, as below.

(setq compile-command "javac YourJavaFileName.java && java YourJavaClass")

For now I have to replace "YourJavaClass" with current class. Can anyone help me to automatically pass currently opened class name to that command, please?

Thanks!

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here