package party3;
public class Marker
{
public static Marker instance = new Marker(){ };
}
And Fantom pod using this library:
using [java]party3
class Main
{
static Void main()
{
echo(Marker.instance.typeof->toClass->getSuperclass)
// Any other code to check that library is found and loaded
echo(Impl().typeof)
}
}
class Impl : Marker
{
}
Put jar with library anywhere it will work (e.g. $FAN_HOME/lib/java/ext/), then build and run our pod (running as script doesn't make difference). What happens is:
The first line in output class party3.Marker means that we called java.lang.Class.toString for the instance of Class representing party3.Marker. Many other things point out that class is loaded.
All in all, it's some ClassLoader issue that I didn't manage to track down. I bet it's some kind of bug.
brianMon 13 Sep 2010
Promoted to ticket #1208 and assigned to brian
I can reproduce this problem following your instructions. I will take a look.
brianMon 13 Sep 2010
Renamed from Implementing java classes to BootEnv should use ext classloader
brianMon 13 Sep 2010
Ticket resolved in 1.0.55
I changed the BootEnv to use the ext classloader instead of just the system classloader. That fixes the test case you provided. Let me know if you see anything else fishy.
vkuzkokov Mon 13 Sep 2010
Consider 3rd party library on java:
And Fantom pod using this library:
Put jar with library anywhere it will work (e.g.
$FAN_HOME/lib/java/ext/
), then build and run our pod (running as script doesn't make difference). What happens is:The first line in output
class party3.Marker
means that we calledjava.lang.Class.toString
for the instance ofClass
representingparty3.Marker
. Many other things point out that class is loaded.All in all, it's some
ClassLoader
issue that I didn't manage to track down. I bet it's some kind of bug.brian Mon 13 Sep 2010
Promoted to ticket #1208 and assigned to brian
I can reproduce this problem following your instructions. I will take a look.
brian Mon 13 Sep 2010
Renamed from Implementing java classes to BootEnv should use ext classloader
brian Mon 13 Sep 2010
Ticket resolved in 1.0.55
I changed the BootEnv to use the ext classloader instead of just the system classloader. That fixes the test case you provided. Let me know if you see anything else fishy.
changeset