Showing posts with label Project Configuration IDE. Show all posts
Showing posts with label Project Configuration IDE. Show all posts

grails- add jar to lib folder - not working - solution

In grails application you can add jar dependencies by just pasting the .jar file to lib folder. If your code doesn't find the jar dependency at runtime then you can do following :

Run the following grail command (s):
  • clean
  • compile --refresh-dependencies 
In eclipse you can open the Grails Command Prompt by :
Right Click on project -> Grail Tools -> Open Grails Command Prompt

Hope this helps.

mysql hibernate unicode support - character set, collate

I just did following configurations to achieve Unicode support in my Java+Hibernate+MySQL project.

Configuring MySQL to support Unicode - set Character Set and Collate as :
 COLLATE "utf8_general_ci";

NOTE : You Need to do "ALTER TABLE" instead of "CREATE TABLE", 
      if you are going to modify existing DB.

Hibernate JDBC connection string :

Hibernate Configuration:
    <property name="hibernate.connection.charSet">UTF-8</property>
    <property name="hibernate.connection.characterEncoding">UTF-8</property>
    <property name="hibernate.connection.useUnicode">true</property>

eclipse proguard maven project configuration - java obfuscate

I am going to describe how can can configure proguard and maven to obfuscate a java project. If you need help on how to configure maven project in eclipse see my earlier post.

A)Project configs
    <!-- Project configs -->


OpenCV-JavaCV : eclipse project configuration windows 7

NOTE: A Easier and Simpler version of the installation step is available !!  Check the latest ( Jan , 2017) article.


Eclipse (windows 7) project setup for JNA wrapper of OpenCV : JavaCV - getting started.

OpenCV (Open Source Computer Vision Library) is library of programming functions for real time computer vision.  JavaCV provides wrappers to commonly used libraries for OpenCV and few others.

Download the Essentials :

Error Free Android Hello World Project on Eclipse

Removal of two common errors that may arise when running the android project on eclipse.
[ PANIC: Could not open: C:\Users\gTiwari\.android/avd/MyAndAVD.ini ]
[ invalid command-line parameter: Files ]

Today I tried to setup the essentials and test a demo project on Eclipse.I installed required tools (Android SDK, ADT, etc) and created a empty project successfully.

I was following these articles :
Installing Android SDK and ADT in eclipse.
Android First HelloWorld App in Eclipse.
But I  got the few errors when I tried run the Hello World project that eclipse created for me.

In this Blog, I am  describing the errors and how I solved them that may be useful for Android beginners like you.

[My System Details : Windows 7(64-bit). Eclipse 3.7 (Indigo).The MyFirstEmul is the name of emulator I created.]

Error #1
When i created a hello world project and tried to run it. I got the following error.
[2011-08-27 18:05:22 - Emulator] PANIC: Could not open: C:\Users\gTiwari\.android/avd/MyAndAVD.ini
Cause : 
The emulator could not found in location "C:\Users\gTiwari\". I searched over my HDD for the emulator I created earlier. And I found it in the  E:\ .android folder. This might be due to I had moved my system folders such as Documents, Desktop, Downloads to E:\.
Solution :
I simply moved the E:\.android folder to C:\Users\gTiwari\ and solved it.

Error #2
After I solved the Error #1, and tried to run the project, I got the following error :
[2011-08-27 18:24:39 - Emulator] invalid command-line parameter: Files.
[2011-08-27 18:24:39 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.
[2011-08-27 18:24:39 - Emulator] please use -help for more information
Cause : 
The default installation location is: C:\Programme Files(x86)\Android\android-sdk.  But the  SDK location cannot contain any spaces.
Solution : 
Should I reinstall the Android SDK to new location with no space in folder names ?
Well, that may be a solution. But i found easy solution for this.
I make use of mklink command line utility of NTFS in Windows 7 (in previous versions of the command may be different). I pointed C:\AndroidSDK to the actual C:\Program Files (x86)\Android\android-sdk by using following command.
     MKLINK  /J  C:\AndroidSDK "C:\Program Files (x86)\Android\android-sdk\"
This command created special junction folder C:\AndroidSDK helped me in  redirection.

And I configured this new path(C:\AndroidSDK) to AndroidSDK in Eclipse IDE settings - from
                      Windows -> Preferences -> Android
And run the Hello World project successfully.

See my other posts on  android from : 

Android: Application Project Structure in Eclipse

The Android project (under Eclipse ADT) consists of several folders:
Android - Project folder structure

  • src: Java Source codes. The Java classes must be kept in a proper package with at least two levels of identifiers (e.g., com.example...).

Android First Program eclipse- getting started

Android apps are written in Java, and use XML extensively. I shall assume that you have basic knowledge of Java programming and XML.
Step 0: Read - Read "Hello, world" tutorial at
Step 1: Create a Android Virtual Device (AVD) - AVDs are emulators that allow you to test your application without the physical device. You can create AVDs for different android platforms (e.g., Android 2.3 for phone, Android 3.2 for tablet) and configurations (e.g., screen sizes and orientations, having SD card and its capacity).

Tutorial on Ibatis-Using Eclipse Ibator plugin to generate Persistence POJO Models, SqlMap and DAO :: with coverage of Dynamic SQL and working downloadable example

IBatis is a lightweight persistence framework that maps objects to SQL statements. The SQL is decoupled from the application logic by storing in XML descriptor file . SQL mapping is done by data mapper to persist objects to a relational database. 
In this article i am going to discuss on how to use ibator plugin in eclipse to generate Java model objects from your database, the DAO interface and its auto implementation to access your db and auto generated SQL map xml files. And also we will deal with fun of dynamic SQL.  The Link for downloading the working eclipse project is given at the end of article. For more detail about ibatis visit the references at last of this article.

Part A: Ibator/DB Configuration
Step 1. Installing IBator
Visit this link and download ibator plugin for eclipse

Or From Eclipse Update Site :
Step 2. Requirements and Project Configuration: 

Create, configure maven project in eclipse - example tutorial

In this post, the followings are covered :
  • Download and Install maven in windows:
  • Add M2_REPO classpath variable in eclipse 
  • Generate Java/Web Project  with maven and import in eclipse
  • Add another dependency from web repository
  • Add custom or 3rd party library manually into repository:
  • Benefits of using MAVEN :