26 |
import java.lang.reflect.*; |
import java.lang.reflect.*; |
27 |
import java.text.Collator; |
import java.text.Collator; |
28 |
|
|
29 |
|
import gnu.classpath.tools.FileSystemClassLoader; |
30 |
|
|
31 |
/** |
/** |
32 |
* Class that will launch the gjdoc tool. |
* Class that will launch the gjdoc tool. |
33 |
*/ |
*/ |
225 |
|
|
226 |
Debug.log(1, "loading doclet class..."); |
Debug.log(1, "loading doclet class..."); |
227 |
|
|
228 |
Class docletClass = Class.forName(option_doclet); |
Class docletClass; |
229 |
|
|
230 |
|
if (null != option_docletpath) { |
231 |
|
try { |
232 |
|
FileSystemClassLoader docletPathClassLoader |
233 |
|
= new FileSystemClassLoader(option_docletpath); |
234 |
|
System.err.println("trying to load class " + option_doclet + " from path " + option_docletpath); |
235 |
|
docletClass = docletPathClassLoader.findClass(option_doclet); |
236 |
|
} |
237 |
|
catch (Exception e) { |
238 |
|
docletClass = Class.forName(option_doclet); |
239 |
|
} |
240 |
|
} |
241 |
|
else { |
242 |
|
docletClass = Class.forName(option_doclet); |
243 |
|
} |
244 |
//Object docletInstance = docletClass.newInstance(); |
//Object docletInstance = docletClass.newInstance(); |
245 |
|
|
246 |
Debug.log(1, "doclet class loaded..."); |
Debug.log(1, "doclet class loaded..."); |
329 |
|
|
330 |
if (optlen <= 0) |
if (optlen <= 0) |
331 |
{ |
{ |
332 |
|
if (!option.startsWith("-J")) { |
333 |
|
//--- Complain if not found |
334 |
|
|
335 |
//--- Complain if not found |
reporter.printError("Unknown option " + option); |
336 |
|
shutdown(); |
337 |
reporter.printError("Unknown option " + option); |
} |
|
shutdown(); |
|
338 |
} |
} |
339 |
else |
else |
340 |
{ |
{ |
555 |
|
|
556 |
TemporaryStore tstore = new TemporaryStore(Main.rootDoc); |
TemporaryStore tstore = new TemporaryStore(Main.rootDoc); |
557 |
|
|
558 |
|
Thread.currentThread().setContextClassLoader(docletClass.getClassLoader()); |
559 |
|
|
560 |
if (null != startTempMethod) |
if (null != startTempMethod) |
561 |
{ |
{ |
562 |
startTempMethod.invoke(null, new Object[] |
startTempMethod.invoke(null, new Object[] |