From what I can read on the net, the team is working on the plugin rewriting it, and this will take a while.
Semi-broken solution
There is another way to install it, but beware, the plugin will be semi-broken, so jump down to another solution if you like to generate a pretty UML diagram from your code:- by the menu navigate to Tools -> Plugins;
- select the "Settings" tab;
- click the "Add" button;
- as URL copy the following into the textbox:
http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/catalog.xml
Now on the tab "Available Plugins" there should be UML in category UML.
The problems are:
- "reverse engineering" command seem to work but you can't open the files;
- you can write a class diagram and work on it, but when you open your project next time you will unable to open the diagram again.
Another solution
You can use yWorks UML Doclet community edition.This solution will only let you generate a pretty UML diagram from your code.
- Download the library from here;
- right click on your java project in project explorer within NetBeans;
- click on "Properties";
- select Build => Documenting;
- on "Additional Javadoc Options" textbox paste the following (beware, I'm under windows):
-docletpath "<yworks-uml-doclet-path>\lib\ydoc.jar" -resourcepath "<yworks-uml-doclet-path>\resources" -doclet ydoc.doclets.YStandard -umlautogen
Where <yworks-uml-doclet-path> is the path of the yworks-uml-doclet folder.
In my case <yid> is:
E:\Users\retek\dev\lib\java\yworks-uml-doclet\yworks-uml-doclet-3.0_01-jdk1.5 - click "OK";
- right click on your java project in project explorer within NetBeans;
- click Generate Javadoc;
Thanks to Matthew W. Johnson for this solution.
Thank you!!!
ReplyDeleteYou are welcome =)
ReplyDeleteI got and error
ReplyDeletejavadoc: error - Cannot find doclet class ydoc.doclets.YStandard
Its giving me an error
ReplyDeletejavadoc: error - Illegal package name: "\lib\ydoc.jar"
My Additional Javadoc Option is
\lib\ydoc.jar
Hello Isu San!
ReplyDeleteHave you tried to use a full path? (like c:\yourDirectories\lib\ydoc.jar)
Let me know how it goes :)
Still having the same error.. :(
ReplyDeleteCan you post your full "Additional Javadoc Options" please?
ReplyDeleteThank youuuuuuuuuuuuuuuuuuuuuuuuuuu
ReplyDeleteThank you very muuuuuuuuuuuuuuuuuuuucccccccchhhhhhhhhhhhh
ReplyDelete10x MAN!!!
ReplyDeleteThanks Michele Lepri!!!
DeleteBut when i generate javadoc, i got this error/warning:
javadoc: warning - Could not locate class file for package.class.java
Please ensure that the directory, JAR archiv, or ZIP archive, which contains the compiled, unobfuscated class XML.XML, is included in the docletpath option.
How can i fix it??It doesn't allow to view the link between some packages in overview and in so many other views;
Thanks for the answers.
Hi Insidemyhead!
DeleteCan you please post your "Additional Javadoc Options" text?
thanks
michele
so it is:
Delete-docletpath "/home/insidemyhead/Documents/Software/yworks-uml-doclet-3.0_02-jdk1.5/lib/ydoc.jar" -resourcepath "/home/insidemyhead/Documents/Software/yworks-uml-doclet-3.0_02-jdk1.5/resources" -doclet ydoc.doclets.YStandard -umlautogen
Thanks!!
between all words there is only one space.
DeleteWell, the command seems to be correct.
DeleteWhat jump to my mind is to ensure that your file and directory exist.
Try to do a
ls /home/insidemyhead/Documents/Software/yworks-uml-doclet-3.0_02-jdk1.5/lib/ydoc.jar
and a
ls /home/insidemyhead/Documents/Software/yworks-uml-doclet-3.0_02-jdk1.5/resources
to see if they are correct.
Let me know how it will go!
=)
the output is:
Delete/home/insidemyhead/Documents/Software/yworks-uml-doclet-3.0_02-jdk1.5/lib/ydoc.jar (for the first command)
styles taglet_definitions.xml taglet_templates.xml ydoc.license
taglet_definitions.dtd taglet_templates.dtd ydoc.cfg
(for the second one)
Maybe i have to add some rules in additional Options about libraries that i used in project development?
Maybe you have to do, but first..
DeleteAre you using OSX or some GNU/Linux distribution?
Sorry for this "simple" question, but have you installed JDK 1.5.0 or JDK 1.6.0 ?
Another tip to try: remove all quotation marks because you don't have any spaces in your paths, so you don't need them.
DeleteAlso in answer to the error where it says about the classes not being there, you have to include the path to your compiled jar file in the -docletpath switch argument. So after adding the path to the doclet just include a path to your compiled jar as it shows on the ydocs documentation site.
DeleteImportant:
If you want to use the yDoc UML generation, docletpathlist must also contain the path to your compiled, unobfuscated Java class files (*.class), for which you want to generate the API documentation, and to all libraries needed to compile your Java source files.
eg.
-docletpath <YID>/lib/ydoc.jar;<YID>/resources;<some path>/myapp.jar
Hello, I have the same problem that Isu San:
ReplyDeletejavadoc: error - Cannot find doclet class ydoc.doclets.YStandard
this is my Additional Javadoc Option:
-docletpath "/Users/eoportus/Downloads/yworks-uml-doclet-3.0_02-jdk1.5\lib\ydoc.jar" -resourcepath "/Users/eoportus/Downloads/yworks-uml-doclet-3.0_02-jdk1.5\resources" -doclet ydoc.doclets.YStandard -umlautogen
I'm running JDK 1.6 in MacOSX 10.7.4.
Thanks,
Hello eoportus,
Deletecan you try use this command (I have simply changed "\" with "/" when needed and removed unneeded quotation marks).
-docletpath /Users/eoportus/Downloads/yworks-uml-doclet-3.0_02-jdk1.5/lib/ydoc.jar -resourcepath /Users/eoportus/Downloads/yworks-uml-doclet-3.0_02-jdk1.5/resources/ -doclet ydoc.doclets.YStandard -umlautogen
Let me know how it will go!
Thank you very much
ReplyDeleteYou are welcome =)
ReplyDeletewow!!!!!!!!!!
ReplyDeleteThank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You are welcome!
ReplyDeleteHow can I use it within Maven based project? It doesnt have that build => Documenting settings there.. please help!
ReplyDeleteHi Saifullah Ansari,
ReplyDeleteI never used Maven project management and I don't know how to help you: have you try to ask to Maven support mailing list?
Regards
thank u so much!
ReplyDeleteYou're welcome =)
ReplyDeletethank youu sooo much!!
ReplyDeleteYou're welcome ;)
DeleteHi im trying to use yWorks UML Doclet but it doesnt generate any uml diagram. Im missing something? Thanks
ReplyDeleteHello, I'm assuming you have followed the procedure.
DeleteAre you getting some sort of error message?
Can you please give me more details?
Let me know =)
Thanks for your reply, nope im not getting any errors Im able to generate the javadoc with the html info but theres no diagram at all.
DeleteThanks
You are welcome,
Deleteare you sure you have configured it fine?
Without any other clues on your problem is really hard to try to help you from here, sorry.
Thank you for this post. It works great.
ReplyDeleteYou are welcome =)
Deleteand you should add the following css to the file /dist/javadoc/stylesheet.css
ReplyDelete.UmlTable{
width:0% !important;
border-collapse: collapse;
border:0px;
}
.UmlTableCell{
padding:0px !important;
}
Then it looks great!
Thanks for the the reply! =)
Delete-docletpath "C:\Users\Chip\yworks-uml-doclet-3.0_01-jdk1.5\lib\ydoc.jar" -doclet ydoc.dockets.YStandard -umlautogen -resourcepath "C:\Users\Chip\yworks-uml-doclet-3.0_01-jdk1.5\resources"
ReplyDeletedoesnt work for me :(
Generating Javadoc
Javadoc execution
javadoc: error - Cannot find doclet class ydoc.dockets.YStandard
1 error
try this: -docletpath C:/Users/Chip/yworks-uml-doclet-3.0_01-jdk1.5/lib/ydoc.jar -resourcepath C:/Users/Chip/yworks-uml-doclet-3.0_01-jdk1.5/resources -doclet ydoc.doclets.YStandard -umlautogen
Delete1 error
ReplyDeleteC:\Users\nys\Documents\NetBeansProjects\SistemPenjualan\nbproject\build-impl.xml:1195: Javadoc returned 1
BUILD FAILED (total time: 0 seconds)
can you help me ?
Hi =)
Deletecan you get more details about this error?
It works like a charm :), thank you. If you get a BUILD FAILED, just put it on C: or D: in a folder, like C:\yourfilder. It will work.
ReplyDeleteYou are welcome and thanks for your comment =)
DeleteWOWW Thank you very much!!
ReplyDeleteYou're welcome =)
DeleteThank you!!! A curiosity...when it generates some images, it splits them in two. Does exist any configuration to avoid this issue? I've read a bit of user guide, but i could not find any solution.
ReplyDeleteSorry I don't know any solution for this.
DeleteIf you go into this directory <your path to extracted doclet>\yworks-uml-doclet-3.0_02-jdk1.5\yworks-uml-doclet-3.0_02-jdk1.5\resources and edit ydoc.cfg using notepad or whatever search for the tiling group tag and set it to false... It should look something like this:
Delete<group name="tiling">
<property name="enabled" value="false"/>
<property name="width" value="600"/>
<property name="height" value="600"/>
</group>
this stops the images from being split.
PS great post Michele thanks :)
DeleteWarning: Leaving out empty argument '-windowtitle'
ReplyDeleteGenerating Javadoc
Javadoc execution
1 error
java.lang.NoClassDefFoundError: com/sun/javadoc/DocErrorReporter
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getMethod0(Class.java:2685)
at java.lang.Class.getMethod(Class.java:1620)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:257)
at com.sun.tools.javadoc.DocletInvoker.optionLength(DocletInvoker.java:184)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:347)
at com.sun.tools.javadoc.Start.begin(Start.java:167)
at com.sun.tools.javadoc.Main.execute(Main.java:59)
at com.sun.tools.javadoc.Main.main(Main.java:49)
Caused by: java.lang.ClassNotFoundException: com.sun.javadoc.DocErrorReporter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 10 more
javadoc: error - fatal error
C:\Users\Roger\Desktop\ProjectX\nbproject\build-impl.xml:1388: Javadoc returned 1
BUILD FAILED (total time: 1 second)
Maybe you have a wrong setup: try to review it or post some more details please.
DeleteIm getting this error
ReplyDeleteWarning: Leaving out empty argument '-windowtitle'
C:\Users\Aled\Desktop\NetBeans java\Lab5\nbproject\build-impl.xml:1195: No source files and no packages have been specified.
BUILD FAILED (total time: 0 seconds)
Any help out there?
Tahnks.
This is a generic error.. try to review your set up: can't help you mutch, sorry
Deletei had 15 mins to make a UML diagram as i had to meet a deadline . Think link did it . Thanks so much :-) Live Strong !
ReplyDeleteYou are welcome =)
DeleteThank you! Very helpful for experts. I installed this in netbeans, and i'm from switzerland and i'm 48. Im a teacher in St.gallen.
ReplyDeleteSt.Gallen is a very nice place to be. I like it so much.You are the best! Peace and Love for you Guys. Best Regards your Jenny.
You are welcome =)
Deletei dont getting class diagram of project
ReplyDeleteHi, are you getting some sort of errors?
DeleteI had the same problem as Isu San but I realised, stupidly, my yworks-uml-doclet-3.0_02-jdk1.5 was still compressed which is why I was getting the error 'javadoc: error - Cannot find doclet class ydoc.dockets.YStandard'. After I sorted this all out and changed the , it worked perfectly. Thank you!
ReplyDeleteVery good =)
DeleteYou are welcome and thanks to share your experience!
when I run the Javadoc gerador I get this error line
ReplyDeleteC:\Users\AMOR ETERNO\Desktop\RRHH\nbproject\build-impl.xml:850: Javadoc returned 1
GENERACIÓN INCORRECTA (total time: 1 second)
init:
Warning: Leaving out empty argument '-windowtitle'
Generating Javadoc
Javadoc execution
Loading source file C:/Users/AMOR ETERNO/Desktop/RRHH/src/accion/DeptAction.java...
Loading source file C:/Users/AMOR ETERNO/Desktop/RRHH/src/accion/EmpAction.java...
Loading source file C:/Users/AMOR ETERNO/Desktop/RRHH/src/accion/ProdAction.java...
Loading source file C:/Users/AMOR ETERNO/Desktop/RRHH/src/accion/UsAction.java...
Loading source file C:/Users/AMOR ETERNO/Desktop/RRHH/src/accion/VentaAction.java...
Loading source file C:/Users/AMOR ETERNO/Desktop/RRHH/src/coleccion/ColDept.java...
warning: [options] bootstrap class path not set in conjunction with -source 1.5
javadoc: error - Illegal package name: "C:\yourfilder\yworks-uml-doclet-3.0_02-jdk1.5"
I can help,,,, thanks
Hello Ronnal,
DeleteI think you miss the full path of "-docletpath" argument.
The path should be something like "C:\yourfilder\yworks-uml-doclet-3.0_02-jdk1.5\lib\ydoc.jar".
Let me know