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

Lot x 10 2N3055 TRANS 2N3055 NPN 115W TO-3
$270.0
Lot  x 10 2N3055   TRANS 2N3055 NPN 115W TO-3 picture1PCS PM50RVA120 New Best Offer TRANSISTOR Power Module
$88.5
1PCS PM50RVA120 New Best Offer TRANSISTOR Power Module picture3PCS BU406 BJT, NPN Transistor 200V 7,0A 60W TO220 Motorola
$3.2
3PCS BU406  BJT, NPN Transistor  200V 7,0A 60W TO220  Motorola picture5pcs 100x25x10mm Heatsink Aluminum Heat Sink Chip for IC LED Power Transistor
$7.65
5pcs 100x25x10mm Heatsink Aluminum Heat Sink Chip for IC LED Power Transistor picture5PCS PN3566 Encapsulation:TO-92,Small Signal Transistors
$4.99
5PCS PN3566 Encapsulation:TO-92,Small Signal Transistors picture






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