Wednesday, June 22, 2011

Eclipse: How to convert a Java Project into a Web Project

Eclipse Version: Helios Service Release 1

Java projects do not have the Export->WAR File option. To get this option you must convert your Java project into a web project.

Step 1: Create a new Dynamic Web Project
Step 2: Open the Dynamic Web Projects .project file and copy the following lines of XML to your Java projects .project file.


[2011-06-15 14:01:36 - ddms]null

<buildspec>
...
<buildcommand>   <name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
...
</buildSpec>

<natures>
...
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
...
</natures>


Step 3: Within the Java projects Project Facets enable the Dynamic Web Module and Java.

Tuesday, June 14, 2011

Android Programming: ddms]null java.lang.NullPointerException error

Starting Android emulator within Eclipse Helios I get:


[2011-06-15 14:01:36 - ddms]null
java.lang.NullPointerException
at com.android.ddmlib.Client.sendAndConsume(Client.java:572)
at com.android.ddmlib.HandleHello.sendHELO(HandleHello.java:142)
at com.android.ddmlib.HandleHello.sendHelloCommands(HandleHello.java:65)
at com.android.ddmlib.Client.getJdwpPacket(Client.java:671)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:317)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)
}



To fix this problem set a Size on the SD card property within the Android Virtual Device (AVD).