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

OEM DELL PA-6 Family AC Adapter 9364U A57
$5.99
OEM DELL  PA-6 Family AC Adapter 9364U    A57 pictureGenuine OEM Dell L240AS-00 240W 0T5VF6 Power Supply
$34.99
Genuine OEM Dell L240AS-00 240W 0T5VF6 Power Supply pictureDell 5130CN Toner Lot Of 7 OEM & NIB Cyan Yellow Magenta Black
$850.0
Dell 5130CN Toner Lot Of 7 OEM & NIB Cyan Yellow Magenta Black   pictureGENUINE OEM FACTORY SEALED DELL 5130cdn/C5765dn BLACK IMAGING DRUM
$49.95
GENUINE OEM FACTORY SEALED DELL 5130cdn/C5765dn BLACK IMAGING DRUM  pictureDELL 725-10263 / 331-1310 / KT74N Lamp manufactured by DELL
$216.18
DELL 725-10263 / 331-1310 / KT74N Lamp manufactured by DELL picture






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