[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
VM resource loading bug
From: |
S. Meslin-Weber |
Subject: |
VM resource loading bug |
Date: |
Wed, 22 Jun 2005 15:55:26 +0100 |
User-agent: |
Mutt/1.5.9i |
Hi guys,
Forwarding this to the list as I've just tested with SableVM 1.11.3 and
I get the same problem so this might be present in more VMs...
---- previous jamvm bug report ----
I have code that uses getClass().getResourceAsStream(name) in the
bootclasspath (the named file exists). The bug causes classpath to try
using the ftp provider to open the stream :)
This bug shows up easily when looking for a resource outside of a jar...
but I identified it first because it also showed before I expanded my
jars.
Here's a test case to make things easier to debug:
mkdir testdir
touch testdir/foo
./bin/jamvm -Xbootclasspath/p:testdir -cp . ResourceTest
java.lang.IllegalArgumentException: address is unresolved: testdir:21
at gnu.java.net.PlainSocketImpl.connect (PlainSocketImpl.java:243)
at java.net.Socket.connect (Socket.java:439)
at java.net.Socket.connect (Socket.java:397)
at gnu.java.net.protocol.ftp.FTPConnection.<init> (FTPConnection.java:253)
at gnu.java.net.protocol.ftp.FTPConnection.<init> (FTPConnection.java:221)
at gnu.java.net.protocol.ftp.FTPURLConnection.connect
(FTPURLConnection.java:123)
at gnu.java.net.protocol.ftp.FTPURLConnection.getInputStream
(FTPURLConnection.java:167)
at java.net.URL.openStream (URL.java:683)
at java.lang.ClassLoader.getResourceAsStream (ClassLoader.java:711)
at java.lang.Class.getResourceAsStream (Class.java:944)
at ResourceTest.<init> (ResourceTest.java:7)
at ResourceTest.main (ResourceTest.java:3)
Cheers!
Steph
--
================================================================
Stephane Meslin-Weber Email: address@hidden
Senior Software Engineer Web: http://odonata.tangency.co.uk
================================================================
ResourceTest.java
Description: Text Data
signature.asc
Description: Digital signature
- VM resource loading bug,
S. Meslin-Weber <=