This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25807 - Does not work at all in xtest_19433 branch
Summary: Does not work at all in xtest_19433 branch
Alias: None
Product: obsolete
Classification: Unclassified
Component: xtest (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: L Martinek
Depends on:
Blocks: 26126
  Show dependency tree
Reported: 2002-07-19 08:35 UTC by Jaroslav Tulach
Modified: 2003-12-11 14:17 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-07-19 08:35:08 UTC
I am working on classloading changes - the
openide.jar and core.jar will not longer be on
classpath. The work is done as part of the issue 

I have found out that the work causes major
problems to the xtest framework, which needs to be

I can try to help it happen, but I need some
initial help.
Comment 1 Jaroslav Tulach 2002-07-19 14:31:01 UTC
In order to eliminate the xtest's org.netbeans.Main class a new
property has been defined, so one can execute the IDE with
-Dnetbeans.mainclass=org.netbeans.xtest.Main (where the class is in a
jar in lib package - lib/xtest-boot.jar) and its main method will be
executed instead of org.netbeans.core.Main.

In core in xtest_19433 branch.
Comment 2 Petr Nejedly 2002-07-19 14:53:56 UTC
The patched version of the Module can be replaced by placing
the test jars into the modules/patches/<name>
see issue 9273
Comment 3 Martin Brehovsky 2002-07-19 14:59:21 UTC
I'm wondering how IDE finds out which classloader should be used for
loading the tests (e.g. java module classloder for java tests)?

Comment 4 Petr Nejedly 2002-07-19 15:17:02 UTC
Simply, when creating a classloader for java module, it will open
modules/java.jar, read the manifest, finds that it have to add
ext/javac.jar, ext/java-gj.jar, ext/javamake.jar,
takes the code base name with '.' replaced by '-':
org-netbeans-modules-java and adds also
from modules/patches/org-netbeans-modules-java/*.jar
Now it constructs the module CL from all these jars.

Look at the ant module, it uses this trick for loading ant extensions.
Comment 5 Martin Brehovsky 2002-07-22 16:48:35 UTC
For XTest, it would be much better if there could be specified a
special system property, which would define a classpath for the
module's classloader. For example for java module:

The problem of the proposed solution is, that test developers usually
depends on the standard location of test classes (they   often mount
subdirectories as filesystems to IDE, etc ...), so it is not a great
idea to copy jar file with the tests to a different place.
Comment 6 Petr Nejedly 2002-07-22 16:59:49 UTC
Do you really use folders as test class sources?
Or is the folder there only to allow usage of
File folder = getTheJavaIoFile(getResource("myfile.txt").getParent();

If you load the classes from .jars and only resources from
the folders, it should be no problem, you can copy only jars
and add the folders to the system CLASSPATH (as long as there are
no package overlaps between classes and data).
Comment 7 Martin Brehovsky 2002-07-22 18:00:05 UTC
The problem is, that resources can be in the same package as classes
(though it is recommended to use data package for resources). I would
vote for the system property ...
Comment 8 Jesse Glick 2002-07-29 20:44:23 UTC
I think this can simply be made a dupe of #19443, as the patch in that
issue is supposed to solve this problem? I don't understand why this
is filed separately.
Comment 9 Jaroslav Tulach 2002-08-01 18:00:33 UTC
Libor Martinek merged changes from this branch to the new
patchbytecode_26126_branch so I think this can be closed as fixed.
Comment 10 Jaroslav Tulach 2002-08-01 18:01:00 UTC
Comment 11 Quality Engineering 2003-07-02 12:20:11 UTC
Resolved for 3.3.x or earlier, no new info since then -> verify.
Comment 12 Quality Engineering 2003-07-02 12:21:54 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.