Help coderanch get a
new server
by contributing to the fundraiser

shailesh Jammie

Greenhorn
+ Follow
since Nov 14, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by shailesh Jammie

My test case will pass when some line throw exception. how to write Assert statement in such situation?
18 years ago
Hi Ashwin,
good effort.
but i think it will not work properly more or equal to 6 digit.
i know we can do this by adding more into String array.
but the question is there can be general way to convert any number of any length.
18 years ago
Hi,
When we will use the approach of extending Thread class where we need a class fully dedicated to the particular thread operation.
let us take an example:
for an application we have to show progress bar according to the
progress of a work like fetching large data from database.

So what we will do is we can create two classes:
one main class fetching the data from db and according to the status of fetched data it will send this progress to the another class dedicated
to display the progess bar in the screen.
By this way the second class is fully dedicated thread of displaying progress bar diffrent from main operation of fetching data.

i hope you understood.

regards
Shailesh
hi all,
i m new to java. I have a doubt a snipplet. weather it will work fine or not ?
can some one suggest me?


private Object[] a;

public synchronized void find(Object key)
{
find(key);
}


in this code i m using the method synchronized and calling the same method
recursivly. my doublt is weather this code will run fine or run with some run time exception.


thanks in advace..
Shailesh
[ January 27, 2006: Message edited by: shailesh Jammie ]
18 years ago
hi
all,
i have some basic questions i want to know the concept:
1: where we are using Void class or what is the use of Void class can any one give an example?
2: in Collection classes what is the diffrence between the methods
removeAll() and clear(). give all diffrences..
3: i have a class A, in the constructor of the class A i m passing the A class object only ,
for what purpose we can use this concept?
i mean
class A
{
public A(A a)
{
//do something
}
}
where is this technique useful?

bye
thnks
shailesh
18 years ago
thanks to all of u for ur effort
18 years ago
hi
ashish u can use JDIC(java desktop integration component) where this API is giving facility to create your own web browser.
regards
shailesh chandra jamloki
uttranchal
18 years ago
i want to ask
what is the default layout manager for Toolbar?

regards
shailesh
18 years ago
hi
i checked my pop3 server is mail.e-smartsystems.com.
and checked by my code also. but stil it is not working?
any other problem may be there?

rgds
shailesh



Originally posted by Seetesh Hindlekar:
Check if e-smartsystems.com is a POP3 server or not?

If yes try this code

String provider = "pop3";
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
Store store = session.getStore(provider);
store.connect(host, username, password);
Folder inbox = store.getFolder("INBOX");
inbox.open(Folder.READ_ONLY);
.....

Rgds,

seetesh

18 years ago

Originally posted by Paul Clapham:
Your comments disagree with your code:Maybe that is the problem?



ya i try with that also
store = session.getStore("pop3");
but it is still giving the same problem
18 years ago
hi i m using the following code to get the messages from inbox, authentication is ok,
try
{
// -- Get hold of the default session --
Properties props = System.getProperties();
Session session = Session.getDefaultInstance(props, null);

// -- Get hold of a POP3 message store, and connect to it --
store = session.getStore("imap");
store.connect("e-smartsystems.com", "shailesh.jamloki@e-smartsystems.com",
"sailesh");
System.out.println(store.isConnected());

// -- Try to get hold of the default folder --
folder = store.getDefaultFolder();
if (folder == null) throw new Exception("No default folder");

// -- ...and its INBOX --
folder = folder.getFolder("INBOX");
if (folder == null) throw new Exception("No POP3 INBOX");
System.out.println(folder.getMessageCount());
// -- Open the folder for read only --
folder.open(Folder.READ_ONLY);
System.out.println(folder.getMessageCount());
// -- Get the message wrappers and process them --
Message[] msgs = folder.getMessages();
System.out.println("msg array length..."+msgs.length);
for (int msgNum = 0; msgNum < msgs.length; msgNum++)
{

printMessage(msgs[0]);
}

}
catch (Exception ex)
{
ex.printStackTrace();
}
finally
{
// -- Close down nicely --
try
{
if (folder!=null) folder.close(false);
if (store!=null) store.close();
}
catch (Exception ex2)
{
ex2.printStackTrace();
}
But i m not getting any messages in the message array?
can any one help me ? what the problem is?
my mail id is shailesh.jamloki@e-smartsystems.com

regards
shailesh
18 years ago