[Biojava-l] Using SeqIOTools in a JNLP context

Keith Turner kturner at idtdna.com
Wed Jun 22 12:07:20 EDT 2005


I've done that, and accepted the permissions, but it still doesn't seem to like having streams passed between classes.  It works fine if I am working with the stream in the same method that I got it in (by creating the FileOpenService), but when I try to pass a FileContents, or its associated InputStream or Readers as a parameter in a method call, it does not like it.  For example, when trying to write data to a file, the file will get created, but no data is written to it.  Maybe this is a more appropriate question for the JNLP developer community, but if any of you have any insight I'd appreciate it.  Thanks for your reply, Andreas.


-----Original Message-----
From:	biojava-l-bounces at portal.open-bio.org on behalf of Andreas Prlic
Sent:	Tue 6/21/2005 5:08 PM
To:	<biojava-l at biojava.org> <biojava-l at biojava.org>
Cc:	
Subject:	Re: [Biojava-l] Using SeqIOTools in a JNLP context
Hi Keith,

You should get  an java.security.AccessControlException: access denied  
from webstart.
To access the filesystem from an application started with webstart 
requires special permission. This means you have to sign your 
application and the user has to permit the execution.

see e.g.
http://java.sun.com/docs/books/tutorial/security1.2/toolsign/signer.html
Cheers,
Andreas

On 21 Jun 2005, at 20:17, Keith Turner wrote:

> Hello-
>
> I am new to the list.  I enjoy working with the Biojava API, but a 
> problem has arisen for me, and I need some help with it.  I am 
> developing an application to be used in the Java Webstart framework, 
> and this brings with it some interesting file permission issues.  
> Basically, you use the JNLP interface FileOpenService to open a file 
> from within the secure "sandbox" environment, and then you can get an 
> InputStream out of that.
>
> So I want to take this InputStream (which presumably is from a Fasta 
> file), and read a DNA sequence from it.  However, all the methods that 
> worked when I was running my software as a Java application no longer 
> work in the JNLP environment.  In the past, I was doing:
>   InputStreamReader fr = new InputStreamReader(in);
>   BufferedReader br = new BufferedReader(fr);
>   SequenceIterator stream = SeqIOTools.readFastaDNA(br);
>   Sequence seq = stream.nextSequence();
> But the program freezes on the SeqIOTools.readFastaDNA(br) call.  No 
> exception is thrown back, it just does nothing.  Does anyone have any 
> suggestions as to how I can solve or work around this problem?  Thank 
> you very much
>
> -Keith Turner
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>
>
-----------------------------------------------------------------------

Andreas Prlic      Wellcome Trust Sanger Institute
                               Hinxton, Cambridge CB10 1SA, UK
			 +44 (0) 1223 49 6891

_______________________________________________
Biojava-l mailing list  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l






More information about the Biojava-l mailing list