Fatal Error Missing Resource

I'm usingjavadoc 1.5 to write a custom doclet. The problem's that the properties file which I've modified and placed in my own Project-Package is no longer read by the Javadoc Compiler. However if I place the path to the properties file intools.jar, it gets read !

I've never had this problem withjavadoc 1.4, but now I'm stumped with this new javadoc version, and my company wants to migrate to java 1.5

Would really appreciate any help here. Has anyone used a different properties file other than the one in tools.jar ?

java.lang.Error: Fatal: Resource (novabitDoclet.resources.standardNovabit)for javadoc doclets is missing.

at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:110)

at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:92)

at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:81)

at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.notice(MessageRetriever.java:387)

at novabitDoclet.AbstractDoclet.startGeneration(AbstractDoclet.java:115)

at novabitDoclet.AbstractDoclet.start(AbstractDoclet.java:77)

at novabitDoclet.NovabitDoclet.start(NovabitDoclet.java:48)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)

at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)

at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)

at com.sun.tools.javadoc.Start.begin(Start.java:128)

at com.sun.tools.javadoc.Main.execute(Main.java:41)

at com.sun.tools.javadoc.Main.main(Main.java:31)

[2055 byte] By [chica30a] at [2007-10-2 16:15:32]
# 1
The properties files have been replaced by class files.See:Cannot find "standard.properties" file in tools.jar http://forum.java.sun.com/thread.jspa?threadID=687256&tstart=45Hope that helps-Doug
dhkramera at 2007-7-13 17:05:19 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

Thank you Doug for that quick reply !

I've found a workaround for this problem...Here goes :

(1) At the command line, cd to the directory of your Jdk version, mine's jdk 1.5.0_06

(2) Then cd again to the lib directory, that's the directory where the tools.jar is in ( mine was : C:\Programme\Java\jdk1.5.0_06\lib )

(3) Then basically all you have to do is to unjar the tools.jar file, put your modified properties file ( naturally it should be a class file, somehow the javadoc 5.0 compiler doesn't work with the .properties extension anymore, now it uses a .class extension : my tip's to have a look at how the original standard.properties have been converted to a standard.class in tools.jar ), and then re-jar the tools.jar file.

PS :

to unjar do this : jar xvf tools.jar

to re-jar do this : jar.exe cvf tools.jar com meta-inf sun

Hope this helps anyone having the same problem as I did. Since I'm currently working with the new Javadoc 5.0, I'm more than happy to share with you folks all the tricks I've learned !

chica30a at 2007-7-13 17:05:19 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

From a Sun engineer (paraphrased):

The execution of the standard.class file creates the Properties

objects in less time than it would take to parse the standard

properties file. This is done with many (all?) .properties files in the JDK.

The standard.java file is created by the program:

make/tools/CompileProperties/CompileProperties.java

in the j2se workspace. Then javac compiles it to standard.class.

-Doug

dhkramera at 2007-7-13 17:05:19 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...