Patch: issue RT-14177

Kevin Rushforth kevin.rushforth at
Mon Jun 4 17:01:12 PDT 2012

I ended up facing a similar issue when testing out the context class 
loader changes I made for 
(among other similar issues). I ended up creating two jar files in two 
separate netbeans projects: one for the support classes (in your case 
FakeSkin and FakeControlBase) and one for the unit test itself. The 
support jar is not on the classpath when I run the unit test.

-- Kevin

Richard Bair wrote:
> I've pushed the latest patch we agreed to over the weekend:
> Changeset: ba58ca4a265f
> Author:    rbair
> Date:      2012-06-04 10:40 -0700
> URL: 
> Now I am having some difficulty devising a unit test for this. I need 
> to replicate (in as simple a manner as possible) the test scenario. I 
> created a custom ClassLoader which only loads the FakeSkin, 
> FakeControl, or FakeControlBase classes as necessary (so that class 
> loader A only loads the FakeSkin and FakeControlBase, class loader B 
> loads the FakeControl and delegates to A if necessary, etc). However 
> the problem is that the original Class.forName("...FakeSkin") call 
> always succeeds because the system class loader knows how to find and 
> load it. How do I hide the class from the system class loader?
> Richard
> On Jun 1, 2012, at 1:54 PM, Richard Bair wrote:
>> OK, now for the tricky part. Writing the tests! I figure I might also 
>> add a sample to Ensemble showing how to use -fx-skin (feeling a 
>> little ambitious for a Friday afternoon :-)).
>> Richard

More information about the openjfx-dev mailing list