Skip to main content

Questions tagged [java]

Java is a programming language. Use this tag for all questions on how to use emacs to work with Java code.

Filter by
Sorted by
Tagged with
0 votes
2 answers
191 views

When I run M-x java-ts-mode it complains Tree-sitter for Java isn't available With C-h f java-ts-mode I see that the mode is built-in, but in the *Warnings* buffer I also see No such file or ...
Harald's user avatar
  • 404
0 votes
0 answers
43 views

I tried to follow the tutorial on this link and when I arrived to the Working with Java Project section, I found I cannot initialize a project. Everything shows up as expected until It asks for a ...
Kaosifer's user avatar
0 votes
1 answer
416 views

I'm trying to marry emacs, lsp-mode, lsp-java, dap-mode and a multi-module Maven project's tests. The main goal is to be able to run and debug them; building the project would also be nice but mvn ...
Pavel Gurkov's user avatar
0 votes
1 answer
137 views

I have a gradle multiproject with different java subprojects. I'm also using lombok in my code. When I try debug a JUnit test using dap-java-debug-test-method, I therefore get error messages regarding ...
user3617992's user avatar
0 votes
1 answer
94 views

If I create a C file I get 2 character indentation which is what I want. However, if I create a java file, eg Hello.java then I am getting 4 character indentation. And I can't work out why. My ....
arcomber's user avatar
  • 229
1 vote
0 answers
147 views

I installed Emacs recently, because I already had a good experience with Vim (another ide that gives the user freedom to modify the ide as the user wants) and as I am studying Java together with Elisp ...
Bruno Ciccarino's user avatar
1 vote
1 answer
2k views

I am looking at setting up Emacs for Java development. As much as possible, I would like to achieve Emacs being comparable to IntelliJ IDEA in terms of features, and also ease-of-use / "things ...
user43791's user avatar
0 votes
1 answer
851 views

When using lsp-java with a 3 file project and one external jar, I am not using gradle or maven. I put the jar into a lib directory, open a Java file and everything works. Then I follow find-...
Harald's user avatar
  • 404
0 votes
1 answer
206 views

I am working on a simple java program, it uses a jason.jar and junit.*.jar (for testing). I usually run the tests through the command line; i never run my programs through and Editor/IDE, I always use ...
Hackerman's user avatar
0 votes
1 answer
441 views

I want to view Java documentation like https://docs.oracle.com/en/java/ inside emacs. I have tried lsp-java with lsp-ui but my setup wasn't enough.
Francesco Cadei's user avatar
0 votes
1 answer
159 views

I have a super simple example where I have a list, a Java method and a call to this method. It looks like this: #+name: animals - dog - cat - guinea pig - horse #+name: does-contains-cat #+begin_src ...
Nicryc's user avatar
  • 147
1 vote
0 answers
531 views

I have a Guix profile in which I installed for a beginner's java class a java environment as minimal as possible: openjdk 17, java-junit (which is JUnit 4), emacs-lsp-java, and emacs-dap-mode. I ...
elyuku's user avatar
  • 102
1 vote
0 answers
354 views

I'm trying to debug java in emacs.I'm running the command M-x dap-java-debug in emacs and I'm getting below error. emacs workspace/executeCommand with vscode.java.resolveMainClass failed. (error &...
Rajkumar Natarajan's user avatar
0 votes
0 answers
113 views

I have a configuration for Java code on emacs that's the following: (use-package flycheck :ensure t :config (global-flycheck-mode)) (use-package company :ensure t :hook (after-init . global-...
raylight's user avatar
  • 257
2 votes
1 answer
372 views

I am essentially having this issue but for the java-mode. Eglot shows too many messages in the java files. How can I fix this? I only wanna see the documentation and error messages in the minibuffer.
scribe's user avatar
  • 1,160
0 votes
1 answer
444 views

I need to import gurobi.jar to my project to correctly view the flycheck's errors. I have read Maven in 5 Minutes and How to add local jar files to a Maven project? but I am still not able to ...
Francesco Cadei's user avatar
0 votes
1 answer
158 views

I am very new to Java and have only been using an lsp for the past month or two. I have done some projects in Go, Python and Rust with lsp-mode and haven't had any problems. Now that I have been ...
greenbug's user avatar
0 votes
0 answers
73 views

I have (I think) installed lsp and lsp-java. My java mode hook starts with (message "Running my-java-mode-hook") (auto-revert-mode) ;; Set up lsp (require 'lsp-mode) (require '...
Troy Daniels's user avatar
1 vote
1 answer
232 views

I'd like Emacs to follow this indentation style: struct Foo { void bar() { for (int i=0; i<10; i++) { if (condition) { // code // code ...
sajmon's user avatar
  • 56
2 votes
1 answer
2k views

Is is exist good package for java development on Emacs? Good... I mean to support: Debugging Code formatting Code Highlighting Help context Maven support Gradle support and many others things
a_subscriber's user avatar
  • 4,386
1 vote
1 answer
142 views

I am new to Emacs and I want to use org-mode to summarize the coding exercise and key points while learning Java. I am currently using IntelliJ to evaluate algorithmic coding questions I did on ...
JoZ's user avatar
  • 131
1 vote
0 answers
389 views

I'm a java developer and I'm beginner using spacemacs, I've configured .spacemacs file to java configuration. Many functionalities works well, for example, a class recognition when I'm coding, but in ...
chavalife17's user avatar
2 votes
1 answer
373 views

Java SE 15 adds (finally) support for multiline string literals that start with """\n and end with """. Has anyone updated java-mode (CC Mode) to recognize this construct?...
Colin Fraizer's user avatar
0 votes
1 answer
189 views

I recently installed meghanada-mode from melpa to help with some Java I am writing. Mostly I like it. However, it has started showing the following messages (in my *Messages* buffer): Error:...
intel_chris's user avatar
0 votes
1 answer
538 views

I am trying to set up a break point in my controller so that I can debug my spring boot web application within spacemacs. Can someone walk me through the steps on doing this. The steps I have done so ...
Dan's user avatar
  • 24
0 votes
0 answers
234 views

EDIT: Error is not present with Emacs 26.3. I will revist when Emacs 27 becomes a release. Emacs 27.0.50 This error occurs when I load a .java file or read java code in an org-mode src block. How ...
danbanta's user avatar
1 vote
1 answer
2k views

I'm trying to run a simple HelloWorld from Emacs using dap-mode commands dap-debug and dap-java-debug but prompted the error saying lsp-request: No delegateCommandHandler for vscode.java....
Joseph Tesfaye's user avatar
2 votes
2 answers
5k views

I have managed to install lsp-java according to their git Readme (https://github.com/emacs-lsp/lsp-java) and created my workspace. Is there a better way (eg. in form of a documentation or tutorial) ...
topkek's user avatar
  • 89
1 vote
1 answer
786 views

Spacemacs: 0.200.7 Emacs: 25.3.1 sbt: 1.2.0 Java: openjdk version "1.8.0_171" .sbt/1.0/plugins/plugins.sbt: addSbtPlugin("org.ensime" % "sbt-ensime" % "2.5.1") ...
Metropolis's user avatar
1 vote
0 answers
121 views

Emacs doesn't use macOS's /etc/launchd.conf env variables. I have the following there: function addToPATH { case ":$PATH:" in *":$1:"*) :;; # already there *) PATH="$1:$PATH";; # ...
HappyFace's user avatar
  • 930
1 vote
1 answer
1k views

Is there an emacs tool to format java code according to a Java Code Formatter Profile (xml) spec, such as the one below? https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style....
erjoalgo's user avatar
  • 895
2 votes
3 answers
1k views

Is there a lightweight Java environment for EMACS? I have used JDEE in the past, but it's accumulated a lot of, ahem, features since I used it last, and just trying to set it up has consumed a couple ...
Charlie Martin's user avatar
1 vote
0 answers
119 views

I am using eclim and I am loving it! But I had to disable eclimd-autostart because it keep trying to fire up eclimd when I pop a .js buffer. Autostarting of eclimd is disabled, please start eclimd ...
CESCO's user avatar
  • 374
3 votes
0 answers
50 views

I use Org Mode with Java codeblocks. When I evaluate a codeblock the source files and the compiled files (*.class) are saved in the same directory as the Org file with the codeblocks. How can I ...
tester's user avatar
  • 491
0 votes
0 answers
101 views

I am not a Java guy at all, but I mess with it quite often for university reasons. I have used this awesome post by peter goldsborough to set up eclim. Which is nice! But this also requires a lot of ...
CESCO's user avatar
  • 374
1 vote
1 answer
277 views

I am opening a Java source file which is part of a maven project. JDEE now runs maven once, which I can sort of understand. But whenever I move around in the file, it will trigger once more. Since it ...
Arne's user avatar
  • 449
0 votes
1 answer
1k views

I come from Java/Netbeans, and I can indent my Java code using alt+shift+f, I have searched through this site and other articles, but I didn't find a good way to indent PHP. What I found: using ...
azzamsa's user avatar
  • 664
1 vote
0 answers
93 views

I know I have eclim setup correctly because everything else works, I.E I can do autocomplete, jump to definition etc. I can even see problems with eclim-problems. However, when I make a syntax error, ...
user7637341's user avatar
2 votes
1 answer
393 views

i've installed jdee from package-list it was elpa i think .. color highlight and indentation are working fine . but when i run any command ( JDEE commands ) i get this message : Customize ‘jdee-...
melbx's user avatar
  • 121
2 votes
0 answers
68 views

I have two files A.java (base class) and B.java (class). The class B succeed A. In file B.java, I compiled by C-c C-v C-c, then it can not detect file A.java with error message: cannot find symbol ...
Junbeom Lee's user avatar
2 votes
1 answer
185 views

using spacemacs in java mode, moving the mouse over an email address displays in the modeline the text mouse-1, C-c RET: mail this address. And if I click on it, a blank email sending form is opened ...
Emmanuel Touzery's user avatar
3 votes
4 answers
255 views

For the longest time I have been ignoring a face change at column 80 in my Java code. The text switches to a pinkish color as shown below. Now it is sufficiently bothersome that I would like to ...
pajato0's user avatar
  • 399
7 votes
5 answers
8k views

I've been having trouble setting up ditaa to work in emacs, I got my copy of the ditaa jar from here And I've been trying to run this code block #+begin_src ditaa :file hello.png :exports results +-...
Nalisarc's user avatar
  • 296
0 votes
1 answer
364 views

I successfully attach to my java app with emacs & gud, but gud-break doesn't work as expected: it runs only: stop at :48 if the line number is 48. So even the class name is missing and the ...
Emmanuel Touzery's user avatar
10 votes
1 answer
1k views

When navigating a source file with incremental search, I often find myself jumping into some context that is taller than the window. This raises the question: "Which class am I in?". Or, if the ...
davidrmcharles's user avatar
2 votes
1 answer
398 views

Currently my team (non-Emacs users) indent java like so: public DiskThresholdDecider(Settings settings, NodeSettingsService nodeSettingsService, ...
Lee H's user avatar
  • 2,747
23 votes
3 answers
22k views

I'm making yet another attempt to convert over to Emacs. I'm a decent Vi user but have been using Eclipse for most of my development work for the past 10+ years (has it been that long). So I did some ...
user1172468's user avatar
  • 1,057
3 votes
0 answers
69 views

I develop Java programs in Emacs occasionally, and adding a dependency to a dependency-injected class is a common action. For example, imagine adding the dependency Qux to the following class: // ...
Matthew Piziak's user avatar
1 vote
1 answer
2k views

What works I have installed emacs-eclim and have it working in my Java buffers. For example, I can invoke eclim-java-refactor-rename-symbol-at-point or eclim-java-show-documentation-for-current-...
Matthew Piziak's user avatar
1 vote
1 answer
1k views

I am using Emacs (v24.4) for writing Java applications. I have created a Java library that I am building using Gradle (v2.2) and testing with Spock Framework where I have all my test cases. I would ...
ant2009's user avatar
  • 111