Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile structorizers due to javadoc. #1077

Open
laalsaas opened this issue Dec 14, 2022 · 12 comments
Open

can't compile structorizers due to javadoc. #1077

laalsaas opened this issue Dec 14, 2022 · 12 comments
Labels

Comments

@laalsaas
Copy link

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
Copy link
Owner

fesch commented Dec 14, 2022

Didn't you try the ./makeStructorizer script?

@laalsaas
Copy link
Author

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
Copy link
Owner

fesch commented Dec 14, 2022

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

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

@laalsaas
Copy link
Author

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
Copy link
Owner

fesch commented Dec 14, 2022

... 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
Copy link
Author

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
Copy link
Owner

fesch commented Dec 15, 2022

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
Copy link
Author

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
Copy link
Owner

fesch commented Dec 15, 2022

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

@laalsaas
Copy link
Author

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

@fesch
Copy link
Owner

fesch commented Dec 17, 2022

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
Copy link
Collaborator

Missing deprecation annotations added to avoid the 8 reported JavaDoc warnings (#1077 (comment)) for future versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants