JWildfire icon indicating copy to clipboard operation
JWildfire copied to clipboard

Several errors compiling on windows, resources folder classpath incompatibility and more

Open istinnstudio opened this issue 1 year ago • 6 comments

I get several errors when trying to compile source (NetBeans 17, Windows 10, Java 17 LTS ), it looks like there is some kind of incompatibility on "recourses" classpath name between windows and linux/mac systems

ERROR 1 - SOLVED there are 6 special character errors on ANSI/UTF8 conversion in NetBeans. A simple copy paste from Notepad++ gives the correct character in UTF8


...\JWildfire-master\src\js\glsl\glslFuncRunner.java:1208: error: unmappable character (0xF1) for encoding UTF-8
	//  Function from I?igo Quiles
	                   ^
...\JWildfire-master\src\org\jwildfire\create\tina\variation\CutKleinianFunc.java:94: error: unmappable character (0xB0) for encoding UTF-8
			//If above the separation line, rotate by 180? about (-b/2, a/2)
			                                             ^
...\JWildfire-master\src\org\jwildfire\create\tina\variation\CutKleinianFunc.java:113: error: unmappable character (0xE9) for encoding UTF-8
	        //Store pr?vious iterates
	                  ^
...\JWildfire-master\src\org\jwildfire\create\tina\variation\DC_KaleidoscopicFunc.java:113: error: unmappable character (0xFC) for encoding UTF-8
		  // Fractal Colors by Robert Sch?tze (trirop): http://glslsandbox.com/e#29611
		                                 ^
...\JWildfire-master\src\org\jwildfire\create\tina\variation\DC_PoincareDiscFunc.java:79: error: unmappable character (0xF6) for encoding UTF-8
	vec2 mbtpc(vec2 z){//M?bius Transform Peserving (unit) Circle
	                      ^
...\JWildfire-master\src\org\jwildfire\create\tina\variation\DC_TrianTessFunc.java:309: error: unmappable character (0xE9) for encoding UTF-8
			return backGroundColor;//We are outside Poincar? disc.
			                                               ^
6 errors
BUILD FAILED (total time: 1 second)

ERROR 2 - (CLEAN & BUILD IS SUCCESSFULL) Altought there is a manifest tag in built.xml, built is successful, but the created jar does not include it no main manifest attribute, in jwildfire-ant1.jar

ERROR 3 - (RUN main Launcher class in IDE IS SUCCESSFULL with errors and start does not work) -> no image in Launcher window


run:
java.lang.NullPointerException: Cannot invoke "java.io.InputStream.close()" because "is" is null
	at org.jwildfire.launcher.Launcher.getImagedata(Launcher.java:470)
	at org.jwildfire.launcher.Launcher.getImage(Launcher.java:441)
	at org.jwildfire.launcher.Launcher.loadImages(Launcher.java:165)
image067.jpg
	at org.jwildfire.launcher.Launcher.<init>(Launcher.java:114)
	at org.jwildfire.launcher.Launcher$1.run(Launcher.java:90)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
	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)
java.lang.NullPointerException: Cannot invoke "java.io.InputStream.close()" because "is" is null
	at org.jwildfire.launcher.Launcher.getImagedata(Launcher.java:470)
	at org.jwildfire.launcher.Launcher.getImage(Launcher.java:441)
	at org.jwildfire.launcher.Launcher.loadImages(Launcher.java:196)
	at org.jwildfire.launcher.Launcher.<init>(Launcher.java:114)
	at org.jwildfire.launcher.Launcher$1.run(Launcher.java:90)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
	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)
Mar 29, 2023 1:13:14 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0xffffffff80000002. Windows RegCreateKeyEx(...) returned error code 5.
java.lang.NoSuchMethodException: java.util.prefs.WindowsPreferences.WindowsRegOpenKey(int,[B,int)
	at java.base/java.lang.Class.getDeclaredMethod(Class.java:2675)
	at org.jwildfire.launcher.JDKScanner.<clinit>(JDKScanner.java:143)
	at org.jwildfire.launcher.Launcher.scanForJDKs(Launcher.java:211)
	at org.jwildfire.launcher.Launcher.<init>(Launcher.java:115)
	at org.jwildfire.launcher.Launcher$1.run(Launcher.java:90)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
	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)
BUILD SUCCESSFUL (total time: 14 seconds)

istinnstudio avatar Mar 28 '23 22:03 istinnstudio

if you just want to use it in your project, you can import the pre-built artifacts (7.55 is latest, 8.10 coming soon):

   <repositories>
        <repository>
            <id>github</id>
            <url>https://raw.github.com/thargor6/artifacts/mvn-repo</url>
        </repository>
    </repositories>

   <dependencies>
        <dependency>
            <groupId>org.jwildfire</groupId>
            <artifactId>jwildfire-lib</artifactId>
            <version>7.55.0-SNAPSHOT</version>
        </dependency>
   </dependencies>

thargor6 avatar Mar 29 '23 00:03 thargor6

Thanks.. I actually tried to build source in order to see if I can contribute a bit of code.. but indeed at the end I will use the jar as a lib. I will try to see if there is a way to resolve this resource classpath issue, I think I have seen this in other cases also.

istinnstudio avatar Mar 29 '23 13:03 istinnstudio

Yeah, I will try to fix the build soon in a way that one get just can clone the repo and build it using maven or gradle. will let this issue open as a reminder

thargor6 avatar Mar 29 '23 21:03 thargor6

Everything seems to work, it was a missing resources folder statement in classpath settings on my side.. sorry for missing that out. Inside IDE launcher runs OK and the start button works OK and the main program starts as it should be.

The only error now is ONLY when running the created jar after clean and build (no need for a fix for me as I do not use this. this just a note) :

So you can close the issue, or keep it alive for a future build process.

Mar 31, 2023 4:43:41 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0xffffffff80000002. Windows RegCreateKeyEx(...) returned error code 5.
java.lang.NoSuchMethodException: java.util.prefs.WindowsPreferences.WindowsRegOpenKey(int,[B,int)
        at java.base/java.lang.Class.getDeclaredMethod(Class.java:2675)
        at org.jwildfire.launcher.JDKScanner.<clinit>(JDKScanner.java:143)
        at org.jwildfire.launcher.Launcher.scanForJDKs(Launcher.java:211)
        at org.jwildfire.launcher.Launcher.<init>(Launcher.java:115)
        at org.jwildfire.launcher.Launcher$1.run(Launcher.java:90)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
        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)

istinnstudio avatar Mar 31 '23 14:03 istinnstudio

Also just in case for the new build system, now I have to manually copy the Denoiser folder to build/classes in order to use it when running from NetBeans IDE, I guess it is missing from the ant build.xml Also GPU renderer is missing, I will check this

istinnstudio avatar Mar 31 '23 19:03 istinnstudio

"GPU renderer is missing" I am noting this here because is not that obvious, solution is to copy FARenderJWF in IDE's build directory. so Denoiser, FARenderJWF (and maybe other folders also) need to be placed there with all their contents in order to enable this functionality while running the app from an IDE (NetBeans tested). There could be a note in readme for this.

istinnstudio avatar Apr 03 '23 10:04 istinnstudio