How to import a jar in Eclipse?

You can add a jar in Eclipse by right-clicking on the Project → Build Path → Configure Build Path. Under Libraries tab, click Add Jars or Add External JARs and give the Jar. A quick demo here. The above solution is obviously a “Quick” one. However, if you are working on a project where you … Read more

undefined reference to `WinMain@16′

This error occurs when the linker can’t find WinMain function, so it is probably missing. In your case, you are probably missing main too. Consider the following Windows API-level program: #define NOMINMAX #include <windows.h> int main() { MessageBox( 0, “Blah blah…”, “My Windows app!”, MB_SETFOREGROUND ); } Now let’s build it using GNU toolchain (i.e. … Read more

What are the best JVM settings for Eclipse? [closed]

It is that time of year again: “eclipse.ini take 3” the settings strike back! Eclipse Helios 3.6 and 3.6.x settings alt text http://www.eclipse.org/home/promotions/friends-helios/helios.png After settings for Eclipse Ganymede 3.4.x and Eclipse Galileo 3.5.x, here is an in-depth look at an “optimized” eclipse.ini settings file for Eclipse Helios 3.6.x: based on runtime options, and using the … Read more

How do I import the javax.servlet / jakarta.servlet API in my Eclipse project?

Ensure you’ve the right Eclipse and Server version Ensure that you’re using at least Eclipse IDE for Enterprise Java developers (with the Enterprise). It contains development tools to create dynamic web projects and easily integrate servletcontainers (those tools are part of Web Tools Platform, WTP). In case you already had Eclipse IDE for Java (without … Read more

Tempered Greedy Token – What is different about placing the dot before the negative lookahead?

What is a Tempered Greedy Token? The rexegg.com tempered greedy token reference is quite concise: In (?:(?!{END}).)*, the * quantifier applies to a dot, but it is now a tempered dot. The negative lookahead (?!{END}) asserts that what follows the current position is not the string {END}. Therefore, the dot can never match the opening … Read more

Null Pointer Except, but why? [closed]

I believe this line is wrong: if(type.equals(null)) strTypeList = “What?What?What?LOLOLOLOLOLnopechucktesta”; it should be: if(type == null) strTypeList = “What?What?What?LOLOLOLOLOLnopechucktesta”; Without seeing the contents of the method calls here: Type = AddyBook.get(x).getContactType(); it’ll be hard to debug but if I were to guess it would be the method “getContactType()” is returning null. EDIT: Try unchaining the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)