Hot answers tagged

53

why do I have to cast the returned object of Object.clone()? Because it returns Object. The generics framework makes me think the IDE could check the type of object references on the right-side of the "=" mark without casting while I am typing? I don't get it. Object.clone is not generic. If generics had existed when clone was designed, it probably ...


26

This is not a feature of any IDE, but of the language definition. An IDE helps you use a programming language more efficiently, it doesn't change the semantics of that language. That means that an editor helper might automatically insert a cast when it's obvious which one you want, but it can't simply break the rules of the language and pretend that code ...


14

I feel that you're doing it wrong. You're heading towards unmaintainable spaghetti environment. Java projects tend to grow to tens or hunderds of dependencies. You start from Guava, JodaTime, SLF4J some commons and it grows... and it's OK. Just don't try to maintain it manually. Maven/Gradle is a must! Never ever commit eclipse workspace files. It just not ...


6

Although NetBeans has a nice GUI editor, I would recommend that you start by learning Swing, with the Java tutorials. Swing is the GUI framework often (but not exclusively) used for Java applications, and it's also the framework supported by the NetBeans GUI editor. Once you understand Swing, you can dive into learning the tools provided by NetBeans.


5

If you need different settings for C and python, you can have them: autocmd FileType python setlocal expandtab autocmd FileType c setlocal noexpandtab


4

Netbeans' GUI builder is nice and other IDEs (Xcode and Visual Studio both come to mind) have similar features. However, while good productivity enhancers, if you want to learn build GUIs; you should design them by hand for the time being until you understand how they work.


3

It is due to the type signature of the Object.clone method. The type signature states that the method will return an object of type Object. protected Object clone() throws CloneNotSupportedException The collections will use so called generic types to substitute the type of casting automatically. So if you have this code: List<Integer> ints = ...


3

R1. We use Eclipse or whatever, including IntelliJ Eclipse has "first class" support: we make sure that whatever changes we do in the development environment doesn't break anyone, and make sure the developer experience is as smooth as possible. It's also the IDE used for trainings. That said, people can use whatever environment they like, and we have a ...


3

1: I use IntelliJ (I'm biased as a prior JetBrains employee); other people use IntelliJ or Eclipse. I tried to use Eclipse and seriously disliked it. 2: Currently we use a custom closed-source tool. Before that, we all used IDEA and used its dependency control. Another team used Maven. 3: Currently there are custom build plugins for both IDEA and Eclipse, ...


3

If you do not have your own coding standards in place, then either write it, or adopt one. I do not know what netbeans coding standard is, so I can not say whether it is good or bad. This answer explains why a coding standard is impotant, and as Uncle Bob said : After the first few iterations, get the team together to decide. meaning that you ...


3

A software package has two kinds of configuration: environment-specific configuration behaviour-specific configuration The former differs between the devel, test, stage and production environments. It should have at most 4 lines or so (web server base url, database connection string, SSL certificates, connection strings/urls to other related components, ...


3

A simple solution would be to keep all the configuration files in the repo and the have a build script that copies the correct version for the environment in when needed.


3

RMI is the standard for distributed object computing in Java. An EJB with a remote interface is an RMI object. RMI enables an application to obtain references to other objects located elsewhere in the network, and to invoke method on that object as though it where co-located with the client on the same JVM locally in client's virtual machine. On the server ...


3

All you need might be a conditional breakpoint. Both Netbeans and Eclipse allow you to edit properties of a breakpoint by right-clicking it and add a condition (a piece of code) that the debugger will evaluate every time it reaches the breakpoint, and stop only of the condition is true. In your case the condition would be some string that identifies the ...


3

Whether one IDE is more lightweight than another is pretty subjective. Do you have the identical features running etc? Even then it's not a like for like comparison. Couple of workarounds: The two IDEs both feature importers that will allow you to bounce projects back an forth - most of my projects run in all three major IDEs. You can performance tune ...


2

The way I always learned was by originally learning Swing from Sams Teach Yourself Java in 24 Hours, then I use netbeans' GUI builder simply to be able to copy over the Layout Code (in the GUI builder name all of your elements the same name as you name them in the regular code, and declare your one Swing elements by hand) once you get the hang of using Swing,...


2

Stock Vim is pretty well suited to C++ already. Just enable OmniCPPComplete and install ctags-exuberant or cscope (and optionally a tab-complete script), and you'll get all of the completion features you'll need. As a C++ programmer, that's all I ever actually need. (Though I do have a rather long indentexpr.)


2

NetBeans vs Eclipse is a holy war question. I say this not because I think it's a bad question that should not be asked but because most of the time holy wars mean that the two pieces of software are equal enough that you should just pick one and start using it. Personally I've picked Eclipse since it was what was used at my last job and it's what I see used ...


1

If you are already a .Net shop and don't seem to have these same issues over there. My recommendation is to do what they are doing. My bet is, they have a known IDE version, with a known framework version across all machines. None of these problems are JAVA specific, although I will admit .NET has not quite embraced dependency management as well as the Java ...


1

I use same vim setting for coding C, C++ and Python (and other stuff too like bash, make ..). You can change settings based on file type. I have a blog post explaining how to change indentation settings for Python and C code automatically in vim. The gist is autocmd BufNewFile,BufEnter *.{py} call set_python_settings() autocmd BufLeave *.{py} call ...



Only top voted, non community-wiki answers of a minimum length are eligible