Tuesday, May 31, 2011

Eclipse is running in a JRE, but a JDK is required



When installing m2eclipse plugin, you might get an error like this in a eclipse console

"Eclipse is running in a JRE, but a JDK is required"

Problem can be solved simply by editing eclipse.ini file from your eclipse installation directory.

The key is that the -vm entry must come before the -vmargs entry. Also, make sure to have a line break between

-vm

and the path.

So in the eclipse.ini file:

THIS WILL NOT WORK:
-vm C:\java\jdk\bin\javaw.exe

BUT THIS WILL:
-vm
C:\java\jdk\bin\javaw.exe

Thursday, July 29, 2010

Google Web Toolkit (GWT) CRUD - SmartGWT





I found this extensive GWT widget developed and licensed under GNU. From the all the GWT frameworks I have seen, this is the best one so far. It has over 260 showcase features and it is open source!. One of the biggest strength of this framework is the support for data integration/binding. GWT is an amazing tool. However, it doesn't have much of built-in framework for form validation/binding. Writing the code for data binding/validation in GWT can consume a lot of time. SmartGWT has amazing API functions to deal these obstacles with just a couple lines of code!

Look at the show case below:
http://www.smartclient.com/smartgwt/showcase/#add_grid_form_category

Pay close attention to Grid-Form-Binding. Writing GWT CRUD screen with SmartGWT sounds like a piece of cake!

For more information:
- Google code: http://code.google.com/p/smartgwt/
- Showcase: http://www.smartclient.com/smartgwt/showcase/


Wednesday, April 7, 2010

Spring MVC Attachment Upload/Download Handler





I implemented an attachment upload/download handler using Spring MVC. Uploading was just a piece of cake because all I had to was wiring the multipart resolver into the configuration and have a bean injected to it. Spring documentation was all I needed.

However, downloading was more tricky. I have to get response's output stream, set mime type and write the byte arrays to it. I found out this great mime type list for 2007 office. Even after I set the mime types for the response, .docx was saying that the file was corrupt. Once I click "Yes" on the recovery, it comes back fine but I am not sure why it is getting corrupted as all the other attachments come back just perfect. If anyone has any insights on this issue, please let me know.

Office 2007 Mime Types
.docm, application/vnd.ms-word.document.macroEnabled.12
.docx, application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotm, application/vnd.ms-word.template.macroEnabled.12
.dotx, application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potm, application/vnd.ms-powerpoint.template.macroEnabled.12
.potx, application/vnd.openxmlformats-officedocument.presentationml.template
.ppam, application/vnd.ms-powerpoint.addin.macroEnabled.12
.ppsm, application/vnd.ms-powerpoint.slideshow.macroEnabled.12
.ppsx, application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptm, application/vnd.ms-powerpoint.presentation.macroEnabled.12
.pptx, application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlam, application/vnd.ms-excel.addin.macroEnabled.12
.xlsb, application/vnd.ms-excel.sheet.binary.macroEnabled.12
.xlsm, application/vnd.ms-excel.sheet.macroEnabled.12
.xlsx, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltm, application/vnd.ms-excel.template.macroEnabled.12
.xltx, application/vnd.openxmlformats-officedocument.spreadsheetml.template


Wednesday, January 27, 2010

DisplayTag feature to expose row numbers

I was working on Spring MVC and DisplayTag to structure the table. I had a list of objects and needed to refer the index of an item because I had to use <spring:bind>

I discovered a cool DisplayTag feature that exposes the row number of an item. Here is an example:

<display:table name="ticketList" id="ticket"> 
<display:column title="Row Number">
${ticket_rowNum}
</display:column>
</display:table>



You are basically appending "_rowNum" to the variable to get the row number.

Monday, March 30, 2009

Life Goes On: LuxuryMagic #14 - Sun Certified Java Programmer 6.0!




I dedicated a past few weeks to study for the exam. I finally received the certification today! Next is Sun Certified Web Component Developer (SCWCD). In the meantime, I submitted my resumes after receiving the certification. I don't know my decision of pursing this certification rather than finding job earlier would turn out. Hopefully, I get to hear some good news but the current economy is fairly tough especially for junior level developer like me.

Wednesday, December 17, 2008

Life Goes On: LuxuryMagic #13 - Business Card



This business card is designed by my roommate who owns design company called Broad Sighted. I initially provided him ideas for designing LuxuryMaster.net because I wasn't very proficient on CSS during that time. I received basic lesson from him so I am a bit better now but he is really good.

He provided me excellent quality of work designing 5 different front end main pages with various color schemas depicting various mood with amazing amount of details in all places.

I will now be independently working on back-end infrastructure and I am currently planning on the whole infrastructure although I have my idea fairly solid. I remember spending a whole semester designing the architecture in school when I was working on my senior project.

Although the group of 4 spent whole semester of designing basic architecture, we ran into various issues when writing codes for the actual product. I was the team leader of the group and it was very stressful to change the implementation all the time. I learned my lesson from that and I don't plan on quick rushing on this project =)

Anyways, due to his successful performance on my LuxuryMaster.net's front end UI work, I asked him to design the business card and look how it came! I can't upload the actual version of the card because it contains personal information but if you look at it carefully, you will be able to see transparent color scheme applied in different vertical layers and it is simply amazing!

If any of you are interested getting web hosting and design services for your business, I suggest you to contact him. You may visit his website Broad Sighted for more details.



Friday, December 12, 2008

Life Goes On: LuxuryMagic #12 - It's my turn to protect








I have decided to stop playing online poker for a while as I have found more joyful and meaningful things to do in my life. I haven't decided how I will spend the money I get from the withdrawal but I am sure I will figure something out =)

I purchased a book called "Real Estate Millionaire: Secret Strategies To Lifetime Wealth Today" by Dean Graziosi. I haven't had a chance to read much about the book it seemed interesting because it seems like anyone can possibly work on trading real estate properties because you don't have to have credit, or investment, or anything.

I also plan to work on my LuxuryMaster.net in the meantime and stay tuned for the updates on the site!

Thursday, December 4, 2008

Thursday, November 20, 2008

Life Goes On: LuxuryMagic #10 - Key to My Heart



My roommates designed above picture in the frame and gave it to me for my 24th birthday present. In the picture frame, it says 'carpe shipem'. It is a phrase from Latin meaning "seize the day" and living the moment in your life. I perceived the meaning of the word right when I heard from my roomate. However, I found myself not applying this beautiful message to my life until today.

Looking back and thinking about it, I don't think I have ever slept ever since I got into the college. Yesterday, I had a such a long sleep, when I woke up, my body felt extremely tired and everything seemed empty.



I have recently experienced overwhelming attention in my life that I have never desired for. I was extremely overwhelmed that I had a moment to give up everything in my life. However, I believe Jesus saved my life at my last moment because there are so many options available to you if you have made a decision to fold over yourself.

I have wondered why I have been chosen to go through this hard moment in my life and prayed to Jesus various times why I am going through this challenging flop on my life.






Today, I was working at my job as usual. Recently, I had overwhelming amount of work at my job all the sudden. Ironically, I got my daily tasks done a little early. I went to eat lunch, get some massage on my body, relaxed myself a bit, watched children playing around in the mall, watched beautiful sky, took a deep breath, and came back to work and thought about why I am working in the office at this moment. Everything I was responsible for was finished so why should I be in the office? Why can't I just go outside and whatever the hell I want?

I thought about myself and trying to figure out what I can do to enjoy in the meantime. I first figured out how I can possibly contribute my developers in the team by working extra amount of time which I got done fairly quickly. I honestly felt really good because I feel like I was finally be able to contribute something extra to the development team rather than working 8 hours straight, being lazy about myself, and just get things done like a machine.

I then forgot about work as I have no obligation or given tasks to continue. I then wondered what would be the first step to benefit more people other than people working in the office. Looking back and thinking about it, I had suffered so much in the past living on my own, working towards my future that I had always dreamed - best car, best job, beautiful girl friend, and etc. Those were so important to me and I had amazing amount of passion on various different things I enjoy in my life and I honestly felt it's reaching and I can accomplish that faster than other people. However, I decided to set all these aside and have a moment to think about what would be really is important in my life if I can only live a day.

I finally decided to accept myself that I desire a lot of different things in my life, instead of turning myself in a miserable mode and thinking about future life, I have decided to not to be sad about my life, worrying about tomorrow, or what the hell would happen if I do something. I simply decided to accept everything happening in my life and cope thorough with it regardless of the outcome.

I instantly felt extreme amount of stress going off of my brain and became happy. I am not sure if I will feel happy or sad tomorrow but since I am not a machine, I decided to forgive myself being sad, happy, or whatever but just stay positive on myself and use self discipline and patience not to lose self control.

I believe we all facet different types of challenging moments in our life and the question is how we perceive these different challenging moments in our life. I have decided to use my intuition to figure out what exactly is going on and deal positively instead of being negative and doubtful about myself, other people, or getting frustrated about the situation.



Just being careless about the current circumstance with controlled mind set was a simple key to my happiness. I strongly believe this is the soul that Jesus has given me while coping through my hard time and I will use my best judgment to protect this great freedom in my life so that I can truly 'carpe shipem' in my life with the people I love regardless of the law, money, perception of other people, and future life.

Saturday, November 1, 2008

Life Goes On: LuxuryMagic #9 - Pursuit of Self Tranquility





I have been having this awesome art that I bought from the University of Colorado when I visited there for lunch. I hung it on the wall for a while but never paid attention to the message in the art. It says:

"The poor long for riches. The rich long for heaven but the wise desires tranquility"