A couple of questions about Eclipse - java

I've been learning to program in Java and the one thing I'm having difficulty locking down is an IDE that I actually like! I tried NetBeans, but did not get on with it at all. I've recently been using CodeRunner, which I found on the Mac App Store. I like CodeRunner, but I worry that it might be a bit simplistic. So I've been thinking of trying Eclipse, but there are a couple of things I'm not quite sure about that hopefully someone here can answer.
First of all, I've tried installing Eclipse on my Mac and I'm baffled by the fact that it comes with a folder packed full of program files and not as just a packaged Mac app. I'm not entirely sure what to do with it; are there any Mac Eclipse users out there who can advise me?
My other query has to do with projects. I've worked with a couple of different Java books and they all recommend using a single project to hold all of the java files for the book. Can anyone explain why this is? I would prefer to keep my own folder structure, for example having a separate folder for each chapter. Would I just have a different project for each chapter instead, is that how this works?
My apologies if these are noob questions; I really want to get my head around Java, but need to be able to get comfortable with the IDE ideally first!
Many thanks.

1- you can just put it in the Applications folder and use it as a normal application ;)
2- I think it's better to organise stuffs from the same source (in this case your book) in the same project. You can then put each chapter in different packages

Related

Creating Eclipse Projects Programmatically (no Plugin)

I need to create some dummy projects each containing a single class for testing purpose. It seems like the usual way to go is to write an Eclipse plugin for that. However this isn't really the way I want to go, since I have no experience in creating plugins nor do I want to start an extra runtime eclipse Environment. The projects that I want to create should end up in the same workspace I'm currently working in.
So is there any way to achieve such or is writing a plugin the only way to go in that case?
Edit: Again, as far as possible I want to stay away from touching any plugin stuff. Pretty much every solution that i've seen here on Stackoverflow discusses this problem with regards to plugins. So this should (hopefully) not be a duplicate question
You could look at EASE, a scripting environment aimed at Eclipse users. Documentation is quite sparse, but there are some sample scripts aimed at creating projects.

How to Configure IntelliJ IDEA 14 for your migration from Eclipse

I have recently installed IntelliJ, to learn Java. I have been learning Java previously in Eclipse, but a lot of Seniors have suggested me to start Developing in IntelliJ as it would Save time in Future.
Now the Problem is the Environment is totally different, I cannot add packages directly, i have to configure a lot of things, which is making me confuse, as to which option i need to correctly run my applications. Can anyone help me out how to go about it.
IntelliJ is definitely different from Eclipse so a little reading on the Getting Started pages is helpful. For me, understanding the modules part was the hardest.
For migrating from Eclipse, they have a pretty good tutorial besides the IDE options to import Eclipse projects.

GWT/ JSP- how to run jsp

I am on a project that uses GWT/ eclipse/ SQL Developer and the guy who originally implemented it is no longer on the project. We have a normal WAR and everything but the jsp files are kept in a different environment. Anyone know why? Can they not be run through GWT?
The issue we are facing is the only way we have to test/ compile JSPs is to actually deploy it into DEV which takes a lot of time. So we are in need of being able to run JSPs locally.
I have been told someone used to use Jdeveloper to do this, but I am unfamiliar with it and the only YouTube tutorials are in a foreign language (in regards to using JSPs with JDeveloper 11g). Someone else suggested notepad/ Tomcat? Or yet another option would be to configure eclipse to run it with our current project in GWT?
I am not familiar with any of this being I am brand new to JSPs,Tomcat, etc. and am in desperate need of some help.
What is the best way to accomplish my needs and are there any guides/ tutorials to help me through the process?
My requirements are just to run a folder with 4 linked jsps and be able to connect to the database to provide the information.
"I am not familiar with any of this being I am brand new to
JSPs,Tomcat, etc. and am in desperate need of some help."
That's sounds true!
One answer about the different environments is that jsp needs "EE" .I.E. EclipseEE but the GWT app just uses plain old eclipse (like an eclipse helios release with GWT plugin).
Regarding your requirements, I can't understand them clearly enough to begin to provide helpful information, but good luck.
Tony

How To Export to JNLP in Eclipse

I watched today as someone painlessly exported a NetBeans java project to a JNLP file and HTML file that he could just copy to his web server. Making JNLP files by hand is slightly obnoxious, especially given the codebase parameter. I would love if I could do the same in Eclipse, but I can't seem to find such a function or a plugin which does this.
The only thing I've found is this article but I can't really parse it, it's a bit dense to me, for instance it mentions:
Ensure that the org.eclipse.equinox.launcher plug-in is in the feature or in one of the included feature;
But if that's even a grammatical sentence, I don't know how to ensure what it says.
Since I never did find an easy way to do it in Eclipse, I did one better, and made JNLPs easy to use on your server! I took the time to figure out the different little quirks that were confusing me, and decided that the necessity to manually specify an absolute codepath is obnoxious. So I wrote a PHP class which generates your JNLP file for you, so that you don't need to worry about the XML at all, and even better, you can use the exact same PHP file on a development server and a live server, or move it around, or whatever you'd like. It updates the codebase dynamically. Solved my problems.
I'm pretty sure that page you found is for developing Eclipse Plugins.
Why not just download NetBeans?

Emacs and Java change propagation and errors notification

Emacs and Java change propagation
Hi,
I'm mostly used to code in IDE like Eclipse but I wanted to try emacs. Because I keep hearing about how much better it is than big IDE like Eclipse and Visual Studio.
So I was looking at what emacs provides for Java (with the JDEE extension) but it doesn't seem as complete as Eclipse.
One of the most important thing I look for in a Java editor is change propagation and error notification. For example if I rename a class, I want to be able to have all the declarations of this class renamed automatically. And if I delete a method, I want to be able to see all the place where this creates errors.
I didn't find those things in emacs, and this is a showstopper for me, I can't see how I could work on big projects without those features.
So my question is : those features don't exist or is it just me that haven't looked at the right place?
Emacs can be better that Eclipse, but the question is "for what"? Emacs (and VIM) are generally smaller, faster and optimized for text editing and navigation*. In recent versions Eclipse are quite capable for editing and navigating java code but with different "style".
If you are willing to learn Emacs then learn it. You will get experiences on your own and it is very important for a developer (you are the only one can decide what is work for you). But learning Emacs does not mean to "throw out" Eclipse, they can co-exist quite well if you use ant or maven-based project building and a source control system. You can for example do all editing in Emacs while for debugging and refactoring use Eclipse.
There are some interesting thought in this thread about Emacs and java development. Also there is an interesting read and conclusions about Emacs and Eclipse from someone who tried both environment.
If you are not an expert Eclipse user yet you should look at the powerful editing and navigating features of Eclipse before starting Emacs:
10 Eclipse navigation shortcuts every java programmer should know
Effective Eclipse: shortcut keys
Effective Eclipse: custom templates
Effective Eclipse: fix it quickly
Back to the question: there is an Emacs extension called Xrefactory for Java but it does not support Java 1.5 features so it is useful only if you use Java 1.4 or older.
(*) of course they are much more, I know :)
Emacs is an incredible editor, with good support for developing in C. For developing in Java there is much better support in one of the Java IDE's which has deep knowledge about the programs being edited. You probably want something like Eclipse, JDeveloper or Netbeans.
In my opinion you will not be satisified with developing Java with Emacs, and you should use another tool.
I don't know much about Emacs (so you may regard the following as off-topic), but I work with both Eclipse and VIM.
I use Eclipse for big Java projects, and I can't live without the large-scale features (cross-project renaming/refactoring etc.). I use VIM for small scale stuff (e.g. knocking up code for StackOverflow examples in multiple languages).
Eclipse and VIM have very different capabilities and consequently I use each bearing this in mind. I don't expect VIM to do the heavy lifting, but on the other hand I don't expect Eclipse to start in a keystroke and to be able to write a new (small) project in a few seconds (in whatever language I require - not restricted to Java). Perhaps you should look at the Emacs/Eclipse pair in a similar light ?

Categories