Questions tagged [java]

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

Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems. It has a run-once run-anywhere philosophy, where programs do not need recompilation on other systems. It is used for writing Android apps, Business servers, and more. Use this tag for emacs-related Java questions.

50 questions
23
votes
3 answers

Suitability of Emacs as a Java development IDE

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 reading up and thought that JDEE is the way to go…
user1172468
  • 1,027
  • 2
  • 9
  • 8
10
votes
1 answer

Which class or method or function am I in?

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 previous developer is prone to writing tall methods:…
davidrmcharles
  • 307
  • 1
  • 8
7
votes
4 answers

Setting up Ditaa in Org-mode

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 +----------------+ | Hello World!!! | | …
Nalisarc
  • 296
  • 3
  • 11
6
votes
1 answer

Simple JDEE Setup for Existing Java Project

I imagine most developers, like myself, starting out with JDEE are beginning with source code that is already written as opposed to a new empty project. What I'm asking for is a simple explanation of how to get JDEE set up for an existing Java…
5
votes
1 answer

Make emacs format Java more consistently

When I open Java files originally created and edited in Emacs, the indentation shows up correctly, as in the image below: However, when I open the same file in Sublime Text, or any other editor besides Emacs, the indentation is messed up, and I can…
Adam R
  • 53
  • 3
5
votes
1 answer

Get Emacs to indent fluent builder inside argument list

So emacs's java-mode handles indenting continued method invocations at the function body level out of the box, but it doesn't seem to handle them inside of an argument list. I'd like to override this behavior. I'm aware of C-c C-s, but in this…
b4hand
  • 1,995
  • 1
  • 19
  • 31
5
votes
1 answer

How to configure specific Java indentation?

I have the following code from Intellij's indentation: public static String[] defaultMethodBlacklist = new String[]{ "getClass", "wait", "notify", "notifyAll", "finalize" }; And: public…
Lee H
  • 2,697
  • 1
  • 16
  • 31
5
votes
1 answer

Which version of CEDET should be used with EMACS 24.4.1 for java development?

CEDET Version: 2.0 I have EMACS version GNU Emacs 24.4.1 (x86_64-w64-mingw32) of 2014-10-20 on KAEL which comes with CEDET version Requested File Loaded Package Version Version …
M Smith
  • 279
  • 1
  • 7
3
votes
0 answers

How to specify the (sub)directory for source and compiled files when evaluating Java codeblocks in org mode?

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 change the directory, where the source and compiled…
tester
  • 473
  • 4
  • 13
3
votes
1 answer

Modifying Java indentation style

I use Emacs for Android development and this has been bugging me lately. I'm trying to get the following indentation behaviour: submitBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { submitEnquiry(); …
sjm
  • 71
  • 4
3
votes
4 answers

How do I find the variable or lisp code controlling a face at a particular column?

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 chase down the cause and fix it to essentially match…
pajato0
  • 399
  • 1
  • 8
3
votes
0 answers

Java dependency injection

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: // import statements here public class Foo { private…
Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77
2
votes
1 answer

Java development on Emacs?

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
  • 3,854
  • 1
  • 17
  • 47
2
votes
0 answers

Java 15 Text Blocks in CC Mode?

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
  • 740
  • 4
  • 12
2
votes
2 answers

Are there any tutorials/documentation for lsp-java?

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) to get to known with lsp-java or do I have to try…
topkek
  • 79
  • 1
  • 7
1
2 3 4