I am new to Python and only installed Eclipse + Pydev as the autoformatting possibilities would help me with the annoyingly stringent indentation rules of Python, which weren't being caught by Geany for example. (These have cost me HOURS of futile searching for even very simple intentaion problems).
I don't need Java or Jython (yet), so how do I disable the interference from Ant at Run time?
Or is there another IDE with autoformatting that doesn't need Java support that would be better suited?
Ant doesn't run in Eclipse at runtime unless you have an Ant builder on the project. (it might be something else causing whatever behavior is bothering you.) That said, Eclipse is a heavy IDE if you only want it for the formatting help. If you are using other features like debugging, PyDev is helpful.
You might consider a lightweight IDE. NotePad++ has a Python plugin.
Related
I'm just about starting to learn Java. Reading about, I installed Netbeans.
Running Apache Netbeans IDE 11.2.
The Java version is 13.0.2.
I'm promptly follow the Quickstart guide on the netbeans website.
File>>New project>> Java >> Java Application.
Errhmm, I don't have this 'Java' option. All I have is
So what's the difference between Java & Java with Maven/Cradle/Ant . At this point in time, I intend to start with basics of Java programming and then move on from there. SO which option am I meant to be starting with? If I'm missing Java, how can I add it ? Going through the installation procedures didn't give me any option to choose from.
p:s - this is all running on Mac OS Catalina
You can start with any of Java with ... option. I use Java with Ant option.
Maven, Gradle, Ant are build-tool addons i.e. they provide additional support if you intend to use any of these as your build tool.
When you choose Java with Ant option, it will let you create, compile, debug and run your Java programs without requiring anything additional. After using this option, you will get an interface as shown in the screenshot given below:
Maven, Gradle and Ant are build tool which allows you to compile, unit test, package and (if you like) even deploy your Java applications (they do support other languages btw).
I suggest you to start with one of those (Maven is very popular and probably a little bit easier than the others) instead of relying on your Java IDE specific features.
Once you master a build tool you can change IDE (IntelliJ is also a very good option ;-)) and will still work as before. You also find plenty of resources and help (like Stackoverflow) if you need hit some problems.
Best of luck!
I'm new to Java and Eclipse (C# developer here). I have a requirement to take an open-source Java application (OpenFire) and modify it to suit our needs.
I downloaded Eclipse Juno, I downloaded OpenFire. But something tells me that OpenFire was written using another IDE because when I try to open it in Eclipse, it complains about the element missing in the build.xml file (I used the "Open from an existing Ant BuildFile" option, which OpenFire has).
What can be the best way to approach this type of situation knowing that open-source can be written using so many tools out there? The goal is not to have to change much of the files just to get it into an IDE.
Any help or direction would help.
The IDE does not make a difference to the project unless there are IDE-specific artifacts like .classpath in the project tree. The build.xml file format is set by Ant, not by any one IDE, so it is extremely unlikely that the IDE is the source of your difficulty.
However, IDE-specific files have no place in the source repository.
Rather than chase down a red herring, look at the error in the build.xml and fix that.
Also, to diagnose if your IDE is mismanaging Ant, use ant from the command line to build your project. You should never depend on the IDE to build your project for you, and never use the IDE to build the project for someone else to use. Always use standard build tools like Ant or Maven or Gradle, and always run them from command line or script to get "official" builds.
If you can run your build that way, you are guaranteed independence of IDE irregularities.
What can be the best way to approach this type of situation knowing that open-source can be written using so many tools out there?
This problem has been already solved by IDE and platform independent build tools which are tightly integrated with most of the popular IDEs
Maven, Gradle are examples of such tools
These build tools also has standard configuration and directory structure which is understandable by popular IDEs
I'm pretty new to programming and to Java, so I'm really not sure.
I know that JDK has its own compiler and the JRE too so would I really need Eclipse?
You need the JRE to run java code on your computer and the JDK to write it. However, many programmers tend to prefer an IDE (Integrated Development Environment) to use along side for actually writing the code, debugging, and execute it much more efficiently. Eclipse is a good example of one, and one of the many used/preferred IDE's (in my opinion at least) out there. However, others exist too:
DrJava
Netbeans
BlueJ
JCreator
These editors are much more preferred because they make it easier to learn / write code. However, you may choose a normal text editor (like sublime, atom, textedit, notepad, textmate, etc..) or even the command line. Mac & Linux have "vim" built in which is a command line editor too which I tend to prefer.
Yes, the JDK and JRE are necessary to run java but Eclipse is the tool that will allow you to code, debug and execute easier.
Think of JDK as the engine of a car and Eclipse or any other IDE like the wheel.
i am pretty new to programming, and having some trouble with debugging java programs. I try to use gdb to debug my java program, but no matter how hard i try, it still does not work at all.
The error message in the minibuffer of emacs(GUI) is always "No such file or directory , gdb". I am sure that my currrent directory is the the same as the sourcefile and the compiled file(executable file compiled with "javac -g xx.java") .
So, my confusion is that: Does the error has something to do with:
1. wrong syntax of invoking gdb (used Meta gdb xx )
2. what is the executable java file for gdb/ how gdb identify them
3. is it possible that my installation of EMACS is incomplete, as i input the gdb to the command line(Win8 system), NO gdb prompt appears at all(something like(gdb....))
Error No such file or directory, gdb
If the error message is coming from emacs, it means that gdb is not installed. To fix it, install gdb. Note that gdb is not part of emacs, it's a separate program. If you get gdb with a bundle, it would usually be part of gcc, the GNU Compiler Collection, not Emacs. The source is the same - FSF (Free Software Foundation) / GNU Project (GNU is Not Unix), but it is different / separate packages.
If the error message is coming from gdb, it means that gdb cannot find the executable. See next point for this.
However, looking at your description, it's more likely that gdb is not installed at all.
gdb cannot debug Java directly
gdb cannot be used to debug Java programs in general, it can only be used to debug Java programs that were compiled into binaries using gcj. See also Java Debugging with gdb from its manual.
You may want to go for jdb instead, which is the Java Debugger that comes with a JDK.
Emacs for Java? Use an IDE instead
Emacs is a great text editor indeed. The jokes that people make about Emacs, like "Actually Emacs is a Common Lisp implementation for developing computer games which happens to have one of the two best text editors as a demo app" are a pun on its greatness. I'm a vim user myself, and I have only the deepest respect for Emacs and what it contributes to computer science (i.e. Common Lisp).
But no matter how good Emacs and vim are, these days the IDEs beat them to it.
The three most popular Java IDEs
Eclipse
NetBeans
IntelliJ IDEA
I recommend IntelliJ IDEA and have my reasons for it, but you can't really choose wrong. They're all good!
What do the IDEs offer?
Syntax Highlighting
Bleeding edge with the latest Java versions
Hundreds of additional checks (especially IntelliJ IDEA: Inspections)
Lots of typical edits automated (especially IntelliJ IDEA: Intentions)
Refactoring
Java Debugging
Java Decompilation
Code Coverage
Code Completion
Integrated access to JavaDoc help
Integration with Unit Test frameworks
Integration with Version Control Systems
Integration with Android SDK and Emulator
Integration with the typical Java build tools Ant, Maven, Gradle
A lot more with those many plugins
Several of these things are also offered by Emacs or vim - but not all of them.
What about my Emacs (or vim) knowledge?
I'm a vim power user myself, but I wouldn't use vim for any Java that exceeds Hello, World, because an IDE like IntelliJ IDEA is just so much better. One argument that is often made is that we users invest a lot into editors like vim and emacs learning all their shortcuts for productivity. This knowledge does not need to be lost. IntelliJ IDEA has an IdeaVim plugin for Vim users and an emacsIDEA plugin for Emacs users. I don't know, but I could imagine that the other IDEs have similar plugins.
I am using Ubuntu and I would like to know the basic tools to install so I can begin develop in java.
With 'minimal' I mean the most transparent way without fancy tools and stacks etc. Like for minimal C programming you just write code and run 'gcc file.c -o myapp'.
Thank you
Just download JDK.
Minimal tools are javac for compiling and java for executing JVM. Both are in bin directory.
You need to install JDK to start with hello world
Eclipse IDE. It's probably the most comprehensive Java IDE. I understand that isn't what you're looking for but light, simple ones like JCreator are not free to use. I don't see the sense in developing without an IDE of any kind.
Install the JDK. An IDE is a minimal requirement for development in Java. Not all developers would agree, but IMHO its the most productive way to develop in Java. I suggest IntelliJ CE which is free.