When (following http://tinyurl.com/ysqmfx ) I tried other
variant, I got back to the square one:
address@hidden kmail2tbfolders]$ cat -b test.java
1 import java.util.*;
2 import javax.mail.*;
3 public class test {
4 public static void main(String[] args) throws
MessagingException {
5 String urlStr
= ``/home/matej/.eclipse/workspace\
/kmail2tbfolders/examples/``';
6 Session session = Session.getInstance(new
Properties());
7 URLName storeURL = new
URLName(``'mbox://``'+urlStr);
8 Store store
= session.getStore(storeURL);
9 Folder test
= store.getDefaultFolder();
10 test = test.getFolder(``'test``');
11 test.open(Folder.READ_WRITE);
12 try { 13
test.open(Folder.READ_WRITE);
14 } catch (MessagingException ex) {
15 test.open(Folder.READ_ONLY);
16 }
17 }
18 }