Tag Archives: eclipse

New in Java 7: switch()ing on Strings

Finally, Java can switch on Strings! No more inefficient strings of if/else chains or Hash lookups or translation into Enums. Finally just clean readable and intuitive code. switch(suit) { case “club”: case “diamond”: trickValue = 20; break; case “heart”: case “spade”: trickValue = 30; break; case “no-trump”: trickValue = 40; break; } It’s actually just […]

Using Eclipse WTP with Maven’s eclipse:eclipse Goal

If you use Maven’s “eclipse:eclipse” goal to generate a project descriptor for eclipse, by default you’re just going to get a plain Java project. You’ll have to add in the Dynamic Web facet in order to tell Eclipse that you can deploy this project in a web container. The easy way around this is to […]