My code reads
import android.os.Bundle;
import rita.wordnet.RiWordnet;
import java.util.*;
import android.app.Activity;
import android.content.IntentSender;
import android.view.Menu;
import android.widget.TextView;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView strlab;
strlab=(TextView)findViewById(R.id.textView1);
RiWordnet wordnet = new RiWordnet();
String word = "diode";
System.out.println("\nFinding parts of speech for " + word + ".");
String[] partsofspeech = wordnet.getPos(word);
for (int i = 0; i < partsofspeech.length; i++) {
strlab.setText(""+partsofspeech[i]);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
It compiles fine. I'm using the latest version of the Android SDK ADT bundle for windows available. When ever i run the app it stops unexpectedly.
I'm using RITA Wordnet jar files. I added them by simply copying them to libs folder.
I understand the jar files needs java 5.0 or 6.0. So I changed the setting to 1.6 in the Java compiler options in the project properties. I also understand the "order and export" method of adding jars is out-dated.
Can someone please help me ?
Edit: Adding screenshots of my log cat