fesch / Structorizer.Desktop

Structorizer is a little tool which you can use to create Nassi-Schneiderman Diagrams (NSD).
https://structorizer.fisch.lu
GNU General Public License v3.0
65 stars 20 forks source link

can't compile structorizers due to javadoc. #1077

Open laalsaas opened 1 year ago

laalsaas commented 1 year ago

I am trying to compile structorizer on linux. I've tried with both jdk 19 and jdk 11. I just cded into the structorizer directory and ran ant. It failed due to javadoc errors. I uploaded the full output here. My question is: how do i build structorizer? I haven't found any info on it so i just tried running ant.

fesch commented 1 year ago

Didn't you try the ./makeStructorizer script?

laalsaas commented 1 year ago

i did, this failed with the following error:

javac 11.0.15
Removing old files...
Done

Compiling non-dependant classes...
./lu/fisch/structorizer/elements/DetectedError.java:98: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public String getError()
                      ^
./lu/fisch/turtle/TurtleBox.java:2522: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    public double getAngleToHome()
                  ^
./lu/fisch/utils/BString.java:225: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static String cutOut(String str)
                             ^
./lu/fisch/utils/BString.java:236: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static boolean containsSomething(String str)
                              ^
./lu/fisch/utils/BString.java:260: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static String replace(String str, String substr, String with)
                             ^
./lu/fisch/utils/BString.java:342: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static boolean isPrefixOf(String pre, String str)
                              ^
./lu/fisch/utils/BString.java:400: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static StringList explodeWithDelimiter(String _source, String _by)
                                 ^
./lu/fisch/structorizer/parsers/D7Parser.java:917: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    public String filterNonAscii(String inString)
                  ^
Note: ./lu/fisch/structorizer/gui/InputBoxRoot.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 warnings
Done

Compiling Structorizer...
./lu/fisch/structorizer/elements/DetectedError.java:98: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public String getError()
                      ^

./lu/fisch/turtle/TurtleBox.java:2522: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    public double getAngleToHome()
                  ^
./lu/fisch/utils/BString.java:225: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static String cutOut(String str)
                             ^
./lu/fisch/utils/BString.java:236: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static boolean containsSomething(String str)
                              ^
./lu/fisch/utils/BString.java:260: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static String replace(String str, String substr, String with)
                             ^
./lu/fisch/utils/BString.java:342: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static boolean isPrefixOf(String pre, String str)
                              ^
./lu/fisch/utils/BString.java:400: warning: [dep-ann] deprecated item is not annotated with @Deprecated
        public static StringList explodeWithDelimiter(String _source, String _by)
                                 ^
./lu/fisch/structorizer/parsers/D7Parser.java:917: warning: [dep-ann] deprecated item is not annotated with @Deprecated
    public String filterNonAscii(String inString)
                  ^
Note: ./lu/fisch/structorizer/gui/InputBoxRoot.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 warnings
Done

Compiling Structorizer Applet...
error: file not found: StructorizerApplet.java
Usage: javac <options> <source files>
use --help for a list of possible options
fesch commented 1 year ago

8 warnings, no errors (StructorizerApplet can be ignored).

Didn't it produce any output in the build directory?

laalsaas commented 1 year ago

oh, it did. I assumed the last 3 lines meant the entire build failed.

However, when i now try to run the structorizer.sh script, I get:

Error: /home/me/srcs/Structorizer.Desktop/Structorizer.app/Contents/Java/Structorizer.jar not found.
fesch commented 1 year ago

... which is normal, as the structorizer.sh script does not start your build but the one I do ;-) Please inspect the "build" directory or "dist" directory for any JAR file.

laalsaas commented 1 year ago

Neither the build nor the dist directory exist. There is a bin directory, but it doesn't contain any JARs, only some .class files.

fesch commented 1 year ago

Okay, if there are .class files, so everything got at least compiled. You should be able to start the class files too, but honestly, I do not remember how to do that 😔😔

laalsaas commented 1 year ago

I cded into the bin directory and executed java Structorizer. It opened a new window, but the new window had no content (just a window with my gtk background color). The command-line output was:

Dez. 15, 2022 9:56:34 VORM. lu.fisch.structorizer.gui.IconLoader getIconImage
SEVERE: *** Unable to retrieve the requested icon null!
java.lang.NullPointerException
    at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)
    at lu.fisch.structorizer.gui.IconLoader.getIconImage(IconLoader.java:835)
    at lu.fisch.structorizer.gui.IconLoader.<clinit>(IconLoader.java:263)
    at lu.fisch.structorizer.gui.Mainform.loadFromINI(Mainform.java:658)
    at lu.fisch.structorizer.gui.Mainform.create(Mainform.java:254)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1299)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1283)
    at Structorizer.main(Structorizer.java:376)

Dez. 15, 2022 9:56:34 VORM. lu.fisch.structorizer.gui.IconLoader getIconImage
SEVERE: *** Unable to retrieve the requested icon null!
java.lang.NullPointerException
    at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)
    at lu.fisch.structorizer.gui.IconLoader.getIconImage(IconLoader.java:835)
    at lu.fisch.structorizer.gui.IconLoader.getIconImage(IconLoader.java:813)
    at lu.fisch.structorizer.gui.IconLoader.<clinit>(IconLoader.java:270)
    at lu.fisch.structorizer.gui.Mainform.loadFromINI(Mainform.java:658)
    at lu.fisch.structorizer.gui.Mainform.create(Mainform.java:254)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1299)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1283)
    at Structorizer.main(Structorizer.java:376)

Dez. 15, 2022 9:56:34 VORM. lu.fisch.structorizer.gui.IconLoader getIconImage
SEVERE: *** Unable to retrieve the requested icon null!
java.lang.NullPointerException
    at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)
    at lu.fisch.structorizer.gui.IconLoader.getIconImage(IconLoader.java:835)
    at lu.fisch.structorizer.gui.IconLoader.getIconImage(IconLoader.java:813)
    at lu.fisch.structorizer.gui.IconLoader.setScaleFactor(IconLoader.java:527)
    at lu.fisch.structorizer.gui.Mainform.loadFromINI(Mainform.java:658)
    at lu.fisch.structorizer.gui.Mainform.create(Mainform.java:254)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1299)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1283)
    at Structorizer.main(Structorizer.java:376)

Exception in thread "main" java.lang.NullPointerException
    at java.base/java.io.Reader.<init>(Reader.java:167)
    at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:93)
    at lu.fisch.structorizer.locales.Locale.<init>(Locale.java:112)
    at lu.fisch.structorizer.locales.Locales.getLocale(Locales.java:250)
    at lu.fisch.structorizer.locales.Locales.setLocale(Locales.java:495)
    at lu.fisch.structorizer.locales.LangFrame.setVisible(LangFrame.java:93)
    at lu.fisch.structorizer.gui.Mainform.create(Mainform.java:273)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1299)
    at lu.fisch.structorizer.gui.Mainform.<init>(Mainform.java:1283)
    at Structorizer.main(Structorizer.java:376)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at java.base/java.io.Reader.<init>(Reader.java:167)
    at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:93)
    at lu.fisch.structorizer.locales.Locale.<init>(Locale.java:112)
    at lu.fisch.structorizer.locales.Locales.getLocale(Locales.java:250)
    at lu.fisch.structorizer.locales.Locales.setLocale(Locales.java:495)
    at lu.fisch.structorizer.locales.Locales.register(Locales.java:357)
    at lu.fisch.structorizer.locales.Locales.register(Locales.java:329)
    at lu.fisch.structorizer.locales.LangFrame$1.windowOpened(LangFrame.java:85)
    at java.desktop/java.awt.AWTEventMulticaster.windowOpened(AWTEventMulticaster.java:347)
    at java.desktop/java.awt.Window.processWindowEvent(Window.java:2075)
    at java.desktop/javax.swing.JFrame.processWindowEvent(JFrame.java:298)
    at java.desktop/java.awt.Window.processEvent(Window.java:2037)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at java.base/java.io.Reader.<init>(Reader.java:167)
    at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:93)
    at lu.fisch.structorizer.locales.Locale.<init>(Locale.java:112)
    at lu.fisch.structorizer.locales.Locales.getLocale(Locales.java:250)
    at lu.fisch.structorizer.locales.Locales.setLocale(Locales.java:495)
    at lu.fisch.structorizer.locales.LangFrame.setVisible(LangFrame.java:93)
    at java.desktop/javax.swing.JFrame.processWindowEvent(JFrame.java:303)
    at java.desktop/java.awt.Window.processEvent(Window.java:2037)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
fesch commented 1 year ago

... because the resources are probably not being found because in some other directory. :-(

laalsaas commented 1 year ago

How do you generate your "release builds", i.e. the Structorizer.app directory in the released zip archives?

fesch commented 1 year ago

I generate the JAR file using NetBeans and then apply a script that does the packaging, but I won't share, because it contains sensitive data. Sorry.

Anyway, you do not need the Structorizer.app directory to run your compiled version. That directory simply has that name because of OSX ;)

codemanyak commented 1 year ago

Missing deprecation annotations added to avoid the 8 reported JavaDoc warnings (https://github.com/fesch/Structorizer.Desktop/issues/1077#issuecomment-1351372060) for future versions.

codemanyak commented 2 days ago

Further missing deprecation annotations added.