[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Classpathx-javamail] Re: clueless newbie -- how to open mbox?
From: |
Matej Cepl |
Subject: |
[Classpathx-javamail] Re: clueless newbie -- how to open mbox? |
Date: |
Wed, 02 May 2007 20:39:36 +0200 |
User-agent: |
slrn/0.9.8.1pl2 (Linux) |
On 2007-05-02, 13:11 GMT, Chris Burdess wrote:
> Try it with something like
>
> Store store = session.getStore(new URLName("mbox:///home/
> matej/.eclipse/workspace/Mdir2mbox/examples/"));
> Folder test = store.getFolder("test");
> test.open(Folder.READ_WRITE);
>
> If you think the current behaviour is wrong, let me know how you
> think it should work and I'll see what I can do about it. =
OK, I got your point (and you are probably right, I just hoped it
actually works this way a minute I begun to think about set of
folders), but still no luck. However, I have a different
exception now ;-):
address@hidden kmail2tbfolders]$ gcj --version
gcj (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
address@hidden kmail2tbfolders]$ gcj -C test.java
address@hidden kmail2tbfolders]$ gij test
Exception in thread "main" javax.mail.MessagingException: Folder is read-only
at gnu.mail.providers.mbox.MboxFolder.open\
(classpathx-mail-1.3.1-monolithic-1.1.1.jar.so)
at test.main(test.java:12)
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 Properties properties = new Properties();
7 Session session = Session.getInstance(properties);
8 URLName storeURL = new URLName("mbox://"+urlStr);
9 Store store = session.getStore(storeURL);
10 Folder test = store.getFolder("test");
11 test.open(Folder.READ_WRITE);
12 }
13 }
address@hidden kmail2tbfolders]$ gij --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.1 20070105 (Red Hat 4.1.1-51)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
address@hidden kmail2tbfolders]$ ls -lh /home/matej/.eclipse\
/workspace/kmail2tbfolders/examples/test -rw-rw-rw- 1 matej matej
2,0M kvě 2 20:23
/home/matej/.eclipse/workspace/kmail2tbfolders/examples/test
address@hidden kmail2tbfolders]$
Any ideas? BTW, is there an equivalent of bash command
readlink -f (it would be very helpful)?
Best,
Matěj
- [Classpathx-javamail] clueless newbie -- how to open mbox?, Matej Cepl, 2007/05/02
- Re: [Classpathx-javamail] clueless newbie -- how to open mbox?, Chris Burdess, 2007/05/02
- [Classpathx-javamail] Re: clueless newbie -- how to open mbox?,
Matej Cepl <=
- [Classpathx-javamail] Re: clueless newbie -- how to open mbox?, Matej Cepl, 2007/05/02
- Re: [Classpathx-javamail] Re: clueless newbie -- how to open mbox?, Chris Burdess, 2007/05/03
- Re: [Classpathx-javamail] Re: clueless newbie -- how to open mbox?, Chris Burdess, 2007/05/03
- [Classpathx-javamail] Re: clueless newbie -- how to open mbox?, Matej Cepl, 2007/05/03
- Re: [Classpathx-javamail] Re: clueless newbie -- how to open mbox?, Chris Burdess, 2007/05/03