Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts

Wednesday, April 25, 2012

install telnet in windows 7 and up

pkgmgr /iu:"TelnetClient"

Friday, February 24, 2012

tomcat not finding maven-project dependency

Right Click on your web project in Project Explorer -> select 'Properties'. Under project properties, select 'Deployment Assembly'.

The Deployment Assembly property page shows the content that will be published as a assembled artifact by Eclipse to the server. You need to tell Eclipse that you want all your Maven dependencies to be published too.

To do that, click 'Add' button, then select 'Java Build Path Entries'. Click Next and select Maven Dependencies. This will publish the Maven dependency JAR files to the lib folder when Eclipse publishes your project to WST server.

Thursday, February 23, 2012

good development tools to have

eclipse plugins
- quantum db plugin
- subversive svn plugin
- checkstyle w/sun profile
- spring ide
- jboss hibernate tools plugin
- maven plugin
- regex util
- apache directory studio
- google plugin
- springsource tools
- eclipse color theme
- m2e-android

other tools
- tortoise
- notepad++
- winmerge (folder compare)
- free download manager
- greenshot (screen capture)

Friday, February 10, 2012

naming conventions

nouns in all caps will be treated as ordinary words, including abbreviations and is subject to camel caps rules

e.g.
UUID => Uuid
DAO => Dao


Dao should also follow these rules, even in
* ClassNamesDao
* fieldNameDao
* bean id="nameDao"

- the word "name" is to be treated as a suffix, and not as a separate word
-- filename, username, firstname, lastname

Tuesday, February 7, 2012

hibernate can't target an unmapped class

-make sure the annotation is javax.persistence.Entity, and not org.hibernate.annotations.Entity. The former makes the entity detectable. The latter is just an addition.

-if you are manually listing your entities (in persistence.xml, in hibernate.cfg.xml, or when configuring your session factory), then make sure you have also listed the ScopeTopic entity

-use packagesToScan in sessionFactory rather than annotatedPackages and pass all the packages with entities

-make sure you don't have multiple ScopeTopic classes in different packages, and you've imported the wrong one.

Thursday, August 25, 2011

Adding GWT Maven Archetype

Add Archetype... and enter:
* Archetype Group Id: org.codehaus.mojo
* Archetype Artifact Id: gwt-maven-plugin
* Archetype Version: 2.1.0-1
* Repository URL: http://repo1.maven.org/maven2

Friday, June 20, 2008

convention tips

bring the following:
official receipt
registration confirmation
businesscards
swag bag

notes:
always stay till end of day for swag
drop businesscards to different sponsor boxes for more swag
check sponsor corners for raffle items, contests and giveaways for even more swag
practice catching shirts

Tuesday, March 18, 2008

auto start a process in Ubuntu

1. Create a script that calls the program you want to auto start
2. Copy the script to /etc/init.d/
3. Run "sudo update-rc.d <script> default"

Wednesday, January 9, 2008

running executable jar files via console

Use when:
1. NoClassDefFoundError and MissingResourceExceptions keep appearing every time an executable jar file is run
2. executable jar files need 3rd party libraries
3. resource folders need to be accessible via classpath


There are two ways to run executable jar files. Which to use depends on how the jar file was constructed.

If the jar file does not need any 3rd party libraries use:

java -jar <jarfile>


If the jar file uses any 3rd party libraries that has not been put inside the archive or needs to have folders accessible via classpath, use:

java -cp .;<libraries>;<classpath>;<jarfile> <main-class>

*Note that a folder containing customized Properties files must appear before the main jar file to override any copies inside the archive itself


Tuesday, January 8, 2008

organize eclipse project folders

organize a project's source folders in such a way that:

  1. all source files are stored in the src folder
  2. all configuration files such as xml, properties, and conf files are stored in the conf folder
  3. all compiled classes are put in the bin folder
  4. exported jar file(s) are stored in the dist folder
  5. project specific configuration files (i.e. .jardesc, manifest.mf) are stored in the etc folder


==========
  1. right click Package Explorer and select New>Create a New Project
  2. select Java Project and click Next
  3. specify the project's name and make sure Create separate source and output folders is selected in the Project Layout panel
  4. click Next
  5. click the Create new source folder link and create the src and conf folders
  6. click Finish
  7. right click the project name and add the bin, dist, etc folders
  8. create a new manifest file in the etc folder and name it manifest.mf
  9. make sure ". conf" is part of the Class-path so that configuration files stored in it can be accessed by your classes