Archives de catégorie : Java

Enable hardware keyboard on Android emulator

Publié dans Java | Laisser un commentaire

I thought it was possible in previous version, but it appears that now it is not possible to use the physical hardware keyboard of a computer in an Android emulator… Hopefully, this is just a small configuration to edit!

  • Open the AVD Manager: in Eclipse > AVD Manager
  • Select the particular AVD, or create a new one, and click on Edit
  • Go to the « Hardware » section, click on « New ».
  • Select the Property: « Keyboard Support », and change its value to « yes » (it is « no » by default)
  • That’s it! You can start your emulator and use your physical keyboard.

AVD Manager

More information

Logo Virgo

Virgo OSGi and command line

Publié dans OSGi | Laisser un commentaire

I already wrote about Virgo, a complete OSGi stack, based on Equinox and easily integrable on Eclipse (eh, it is done for that). Yes, it is possible to launch and manage our Virgo server using Eclipse (read: Let’s work OSGi Virgo on Eclipse), but if you try to launch a big project like Societies, you might may soon be blocked by an ugly Java « Out of memory ». This is because Eclipse is heavily using the Java memory, and if you launch your OSGi server using Eclipse, you increase again this memory usage.
So, what is the solution? It’s easy: don’t launch Virgo using Eclipse, launch it with command line. So, the server will have its own memory cluster. Lets do this.
Continuer la lecture

Maven Error « Could not find Launcher »

Publié dans Java | Laisser un commentaire

If you have the following error when launching a Maven command, for example « mvn install »:

Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher

Your are probably using a Maven 2 configuration for a Maven 3 usage. Delete your global variable M2_HOME and it should work. You can use M3_HOME instead to select the folder for the « repository » of dependencies, and the emplacement of the configuration file settings.xml.

Problèmes de mémoire ?

Maven OutOfMemoryError

Publié dans Java | Laisser un commentaire

Maven Error

Maven failed during a build whit the following error:

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: PermGen space

Solution

Add the environment variable MAVEN_OPTS: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m