Question

I'm trying to decide whether to change IDEs as I've read promising things about both NetBeans and IntelliJ, but I have two interrelated (perhaps dumb) questions:

  1. Is there any difference in the final application produced by all 3 IDE's, assuming that all 3 use identical code (Java)? In other words, do IDE's package the final app in different ways, or add a watermark/signature file of sorts?

  2. I often learn new programming techniques and tools by reading source code from smart developers. Is there any way to identify which IDE a certain app was built with by analyzing a Java app's source code? Such as a file containing "Built with NetBeans 8.0.2" or similar, somewhere?

Was it helpful?

Solution

Is there any difference in the final application produced by all 3 IDE's, assuming that all 3 use identical code (Java)? In other words, do IDE's package the final app in different ways, or add a watermark/signature file of sorts?

IDE != compiler.

Some few IDE's have a built in compiler that produces executables but most IDE's use whatever compiler you installed. IDE's are glorified text editors. They only even care about your compiler because they want to do code completion for you as you type.

If you produce identical source code and use the same compiler it won't matter if you wrote the code with NetBeans, IntelliJ, Eclipse, Notepad, Vi, Emacs, or windows paint, assuming you know how to bit twiddle your way to ascii using pixels.

I often learn new programming techniques and tools by reading source code from smart developers. Is there any way to identify which IDE a certain app was built with by analyzing a Java app's source code? Such as a file containing "Built with NetBeans 8.0.2" or similar, somewhere?

No. If there is there shouldn't be. Source targets a compiler (or interpreter). IDE's target humans. You're better off suspecting IntelliJ was used because you know Joe wrote the code and that Joe likes IntelliJ.

OTHER TIPS

I have been working for years with teams that allow each developer to choose which IDE to use, IntelliJ, NetBeans, Eclipse.

Builds (in our case) are done by Gradle, Maven, or Ant, using Jenkins or Circle CI. The IDE is not even present on the build instances.

This should give some idea how independent IDE can be from the resulting product. We're editing the same files and projects with different IDE's every day. Mostly with Netbeans and IntelliJ now. Eclipse popularity waned a while back. Some code is done with our favorite text editor at times too.

The main issues that come up for us that vary between IDE's are things like, which files or paths to put in .gitignore, which plug-ins to use. Differences about how the IDE's do an automated deploy to Glassfish (the quirkiest of the three app servers involved). Tomcat and Jetty don't produce as many questions.

Based on taking in a few projects from other companies, it is usually fairly easy to tell what IDE's they are using by looking at the source repository, if only because people don't always replace the default license headers and .gitignore (or equivalent) all their configuration and automation files. And when they do .gitignore those files, well, we can read .gitignore files to see what they are. People typically leave traces of their activity.

An IDE as said is not a compiler. A compiler is not a packaging tool for your compiled application, a packaging tool may or may not include an installer builder.

Especially in Java all 3 tend to be different applications (though an IDE may ship with a compiler and/or a packaging tool and/or an installer builder).

Both Netbeans and IntelliJ default to using industry standard 3rd party compilers and build and packaging tools by default, and they by default use the same ones.

As a result the only way to distinguish the packaged application as having been created using one or the other would be to be intimately with certain code generation patterns employed by each that might lead to specific groups of classes, and methods and variable names within them, and that'd only work if those specific generators were actually employed.
And even then, the code generated by one of them could have been further edited in the other.

Licensed under: CC-BY-SA with attribution
scroll top