|
this often happens when a socket is closed in a loop or the socket just exists in a loop. check you code on this behavior or post your code (using the codeblock tags!)
regards
Torsten
I never finish anyth...
|
|
|
|
|
Hi,
This problem usually occurs when the server socket was closed , if you are the one writing the server socket also , please ensure that the client closes the connection first . otherwise the said problem will POP up.
|
|
|
|
|
(SORRY FOR MY BAD ENGLISH)
hi for all
first i have this exception
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
then i add commons-logging-1.1.1.jar
to my library in Netbeans
after that i find this error
Exception in thread "Thread-7" java.lang.NoClassDefFoundError: org/apache/http/params/HttpParams
what will i do
and if any one have that jar for free please put it for me and thank you all
|
|
|
|
|
thank you all
i have just found it
i am sorry
|
|
|
|
|
Good for you. When this happens, it is polite to modify the subject line of your original post to add [SOLVED] or something like that.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
thank you
is your replay about my new question socket?
and if it is
how can if modify the subject line ?
|
|
|
|
|
My reply is about this thread. Open your original message, and you will see an Edit link at the bottom. Click that and away you go.
You can modify any of your own messages this way.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
hi
i am working with JML (java MSN library)
i found this code
but it doesn't work with me
any one help me please
this is the code
package example1;
import net.sf.jml.MsnMessenger;
import net.sf.jml.impl.MsnMessengerFactory;
public class BasicMessenger {
private String email;
private String password;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
protected void initMessenger(MsnMessenger messenger) {
}
public void start() {
MsnMessenger messenger = MsnMessengerFactory.createMsnMessenger(email,
password);
messenger.setLogIncoming(true);
messenger.setLogOutgoing(true);
initMessenger(messenger);
messenger.login();
}
public static void main(String[] arg) throws Exception {
String args[]=new String[3];
args[0]="william";
args[1]="rojjffjjj887hghgma@hotmail.com";
args[2]="uullro33";
BasicMessenger messenger = (BasicMessenger) Class.forName(args[0])
.newInstance();
messenger.setEmail(args[1]);
messenger.setPassword(args[2]);
messenger.start();
}
}
|
|
|
|
|
williamroma wrote: but it doesn't work with me
That is not very helpful; try explaining what you think it should do and what results you get.
I must get a clever new signature for 2011.
|
|
|
|
|
|
i have to make a chat messenger
so i think that a JML is a good API to connect with MSN
i begin to learn about it and i find that code
but it doesn't work with me
any one know tutorial to use this API
any one konw where is the wrong in that code
thanks you all
(SORRY FOR MY BAD ENGLISH )
|
|
|
|
|
A quick Google located this site[^].
I must get a clever new signature for 2011.
|
|
|
|
|
yes i found that website
and the code i put here is the first example on that site
but in that site there is no explain for the code
i am realy thank you but i have to learn this API
|
|
|
|
|
williamroma wrote: but i have to learn this API
Well the logical place is the site I gave you the link for. If there is no documentation provided then you will have to do it the hard way by working through the code. If there is a forum on the site then post your question there as you are much more likely to find someone who understands it on that site.
I must get a clever new signature for 2011.
|
|
|
|
|
really thank you
but there is no place in that side to ask
any way i am realy thank you and sorry to loose your time
|
|
|
|
|
williamroma wrote: and sorry to loose your time
I think you misunderstand, you are not wasting my time. I am merely trying to help you find the best place to get support for your problem. In the case of open source projects like this then the site that owns the product is always the best place. If you go back to that site and look around you will find that there are a number of links to help you, including a support forum.
I must get a clever new signature for 2011.
|
|
|
|
|
thank you again
i understand some of the code but i have this java question
this code:
B k = (A) Class.forName("X").newInstance();
that code associated the k object with the class X
when i run that code i make an exception (CLASS X NOT FOUND )
how can i make the code right?
(SORRY FOR MY BAD ENGLISH )
|
|
|
|
|
See this[^]. Class X not found means just what it says. In your first code snippet you were passing args[0] , which value was "william". It is telling you that class with "william" as fully qualified name does not exist.
|
|
|
|
|
The MSN Messenger Protocol Torn Apart[^]
this should bring some more information.
On the Sourceforge-Code - did you load the complete trunk or just this bit of code? Please go for the complete trunk.
Otherwise you've just ripped the engine hood off - which is obviously not a complete car
regards
Torsten
I never finish anyth...
|
|
|
|
|
Hello!
I have designed a website where a student reads a prompt aloud and words they miss are clicked by a teacher, parent or tutor.
I would like to add a speech recognition aspect to my program to allow for self administration by students, which will most likely involve a standalone client. I figured Java would probably be the most likely language to have convenient, inexpensive (or free) libraries available.
The student is presented with a prompt, such as "I want to eat ice cream.", the program records the user reading the prompt and then tells them every word they missed and has them say the word correctly.
Any library suggestions? I would need access to intermediary information - it would not be appropriate for the library to pick a "closest word" if the user mispronounces something, for example.
|
|
|
|
|
The Java Sound API[^] may be a good starting point.
I must get a clever new signature for 2011.
|
|
|
|
|
|
Thanks - I will look into this. If I can define my own grammar then I should be able to customize this to return syllables rather than words - which would enable me to parse the output myself - and hence check for mistakes.
|
|
|
|
|
Hi all,
I am writing a small 2D platform game and currently working on EventListeners. When the user clicks the 'blackSquare' JButton it is removed from the screen and placed within a different JPanel (the inventory). However once this event has occoured the player sprite no longer responds to the user input, can anyone help.
package com.brackeen.javagamebook.input;
import com.brackeen.javagamebook.graphics.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.EtchedBorder;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
public class InvItems extends MenuScreen implements ActionListener
{
public static void main(String[] args)
{
new InvItems().run();
}
private JPanel panelZero;
private JPanel panelOne;
private JPanel panelTwo;
private JPanel panelThree;
private JPanel panelFour;
private JPanel panelFive;
private JButton quitButton;
private JButton blackSquare;
private JTextArea textArea;
private JLabel inventoryLabel;
private JList dropDown;
String [] items ={"Take", "Examine"};
String textOne = ("Text Area");
String textTwo = ("Its Just a black square");
public void init()
{
super.init();
NullRepaintManager.install();
inventoryLabel = new JLabel("Inventory");
dropDown = new JList(items);
panelZero = new JPanel();
panelOne = new JPanel();
panelTwo = new JPanel();
panelThree = new JPanel();
panelFour = new JPanel();
panelFive = new JPanel();
inventoryLabel.setFont(new Font("Blackadder ITC", Font.ITALIC, 16));
inventoryLabel.setForeground(Color.RED);
textArea = new JTextArea();
textArea.setText(textOne);
textArea.setFont(new Font("Blackadder ITC", Font.ITALIC, 16));
textArea.setBackground(new Color(0, 0, 0, 0));
textArea.setForeground(Color.RED);
panelFive.setBackground(new Color(0, 0, 0, 0));
quitButton = createButton("quit", "Quit");
quitButton.setBounds(50, 50, 64, 64);
quitButton.setVisible(true);
blackSquare = createButton("test", "Test");
blackSquare.setVisible(true);
JFrame frame = super.screen.getFullScreenWindow();
Container contentPane = frame.getContentPane();
Cursor cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
frame.setCursor(cursor);
if (contentPane instanceof JComponent)
{
((JComponent)contentPane).setOpaque(false);
}
contentPane.setLayout(null);
panelZero.setBounds(0, 0, 75, 75);
panelOne.setOpaque(true);
panelOne.setBounds(300, 10, 150, 30);
panelOne.setOpaque(false);
panelTwo.setBounds(190, 35, 378, 75);
panelTwo.setOpaque(false);
panelThree.setBounds(300, 200, 100, 100);
panelThree.setOpaque(false);
panelThree.setVisible(true);
panelFour.setBounds(400, 200, 100, 100);
panelFour.setOpaque(false);
panelFour.setVisible(false);
panelFive.setBounds(10, 550, 775, 40);
panelFive.setOpaque(true);
panelFive.setVisible(true);
panelFive.setBorder(new EtchedBorder());
panelZero.add(quitButton);
panelOne.add(inventoryLabel);
panelThree.add(blackSquare);
panelFour.add(dropDown);
panelFive.add(textArea);
contentPane.add(panelZero);
contentPane.add(panelOne);
contentPane.add(panelTwo);
contentPane.add(panelThree);
contentPane.add(panelFour);
contentPane.add(panelFive);
frame.validate();
blackSquare.addMouseListener(new MouseWatcher());
dropDown.addMouseListener(new MouseWatcher());
}
public class MouseWatcher extends JFrame implements MouseListener
{
public synchronized void mouseClicked(MouseEvent e)
{
panelFour.setVisible(true);
}
public void mouseEntered(MouseEvent e)
{
}
public void mouseReleased(MouseEvent e)
{
}
public synchronized void mousePressed(MouseEvent e)
{
if (dropDown.getSelectedIndex() == 0)
{
panelThree.setVisible(false);
panelTwo.add(blackSquare);
panelFour.setVisible(false);
}
else if (dropDown.getSelectedIndex() == 1)
{
textArea.setText(textTwo);
}
}
public void mouseExited(MouseEvent e)
{
}
}
public void actionPerformed(ActionEvent e)
{
Object src = e.getSource();
if (src == quitButton)
{
super.exit.tap();
}
}
public void draw(Graphics2D g)
{
super.draw(g);
JFrame frame = super.screen.getFullScreenWindow();
frame.getLayeredPane().paintComponents(g);
}
}
|
|
|
|
|
- don't use syncronized in Mousewatcher. You're not using Thread.
- dont let MouseWatcher extend JFrame (why does it do so? there should be no need to extend JFrame)
- do not override mouseEntered() , mouseReleased() and mouseExited() until you really need to modify them.
regards
Torsten
I never finish anyth...
|
|
|
|