Cream butter and sugar. Add egg and vanilla; sift flour and baking powder and salt; add to creamed margarine batter, then add coconut and nuts.
Batter will be very thick. Grease and flour a 9x9 inch pan. Put about 2/3 of batter in the pan, spread jam over it; sprinkle remaining batter on top. Bake at 350F for 35-45 minutes.