BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-28-2010, 01:49 PM   #1 (permalink)
New Member
 
Join Date: Jul 2010
Model: Bold
PIN: N/A
Carrier: jordan zain
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy BB Twitter4J problem

Please Login to Remove!

Hi,
I'm developing BB application that interact with Twitter via Twitter4J API, I added library (twitter4j-core-2.1.7-SNAPSHOT.jar)
When I lunched the app to BB simulator, I got "Error Starting TwitterApp: Module 'twitter4j-core-2.1.7-SNAPSHOT' not found"!

My code is:

package com.rim.samples.device.twitterapp;

import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.conf.ConfigurationBuilder;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.EditField;
import net.rim.device.api.ui.container.MainScreen;

public class TwitterApp extends UiApplication {

private EditField usernameField;
private EditField passwordField;
private ButtonField login;
private ConfigurationBuilder cb;

public static void main(String[] args) {
TwitterApp theApp = new TwitterApp();
theApp.enterEventDispatcher();
}

public TwitterApp() {
try {
//cb=new ConfigurationBuilder();
} catch (Exception e) {
Dialog.alert(e.getMessage());
}

MainScreen mainScreen = new MainScreen();
mainScreen.setTitle("My Twitter");

usernameField = new EditField("Username: ", "");
passwordField = new EditField("Password: ", "");
login = new ButtonField("Login", ButtonField.CONSUME_CLICK | ButtonField.NEVER_DIRTY);

mainScreen.add(usernameField);
mainScreen.add(passwordField);
mainScreen.add(login);

login.setChangeListener(new FieldChangeListener() {

public void fieldChanged(Field arg0, int arg1) {
Twitter twitter;
try {
twitter = new Twitter(usernameField.getText(), passwordField.getText());
twitter.updateStatus("hi");
} catch (TwitterException e) {
e.printStackTrace();
}
}

});

pushScreen(mainScreen);
}
}
Offline  
Old 10-28-2010, 03:57 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Is this Eclipse or JDE?

It sounds like your build path does not include the jar.
Offline  
Old 10-29-2010, 03:05 AM   #3 (permalink)
New Member
 
Join Date: Jul 2010
Model: Bold
PIN: N/A
Carrier: jordan zain
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Eclipse
what should i do?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Genuine WESCO N6K universal joint cross 2.475" unknown appl. vintage driveline
$19.99
Genuine WESCO N6K universal joint cross 2.475Vintage Enterprise Sausage, Wine, Apple Stuffer
$250.0
Vintage Enterprise Sausage, Wine, Apple Stuffer picture6fFT VOLEX APPLE 3 PRONG POWER CORD E62405Sp VINTAGE
$2.95
6fFT VOLEX APPLE 3 PRONG POWER CORD E62405Sp VINTAGE  picturevintage sausage stuffer Apple Smasher wine press squeeze Enterprise grapes cast
$19.99
vintage sausage stuffer Apple Smasher wine press squeeze Enterprise grapes cast pictureVintage Enterprise 4 Quart Sausage Stuffer Lard Apple Wine Press 4 Qt
$199.99
Vintage Enterprise 4 Quart Sausage Stuffer Lard Apple Wine Press 4 Qt picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.