Can't build project

Forum for alternative clients, mods & discussions on the same.

Can't build project

Postby 524u » Fri Oct 20, 2023 6:14 pm

Hey I just downloaded apache ant, hafen repo etc.
Made build using "ant" command
> built successfully
run "java -jar build/hafen.jar" and there are errors:

xception in thread "Haven main thread" java.lang.Error: java.lang.reflect.InvocationTargetException
at haven.MainFrame.javabughack(MainFrame.java:400)
at haven.MainFrame.main2(MainFrame.java:417)
at haven.MainFrame.lambda$main$0(MainFrame.java:460)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371)
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346)
at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
at haven.MainFrame.javabughack(MainFrame.java:391)
... 3 more
Caused by: java.lang.ExceptionInInitializerError
at haven.LoginScreen.<clinit>(LoginScreen.java:34)
at haven.MainFrame$5.run(MainFrame.java:394)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
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: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)
Caused by: haven.Resource$NoSuchResourceException: Failed to load resource ui/fraktur (v-1)
at haven.Resource$Pool$Queued.get(Resource.java:522)
at haven.Resource$Pool$Queued.get(Resource.java:490)
at haven.Loading.waitforint(Loading.java:123)
at haven.Loading.waitfor(Loading.java:136)
at haven.Resource$Pool.loadwait(Resource.java:791)
at haven.Resource$Pool.loadwait(Resource.java:795)
at haven.Text.<clinit>(Text.java:39)
... 15 more
Caused by: haven.Resource$LoadException: Load error in resource ui/fraktur(v-1), from local res source (res)
at haven.Resource$Pool.handle(Resource.java:583)
at haven.Resource$Pool.access$1200(Resource.java:467)
at haven.Resource$Pool$Loader.run(Resource.java:713)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.FileNotFoundException: Could not find resource locally: /res/ui/fraktur.res
at haven.Resource$JarSource.get(Resource.java:304)
at haven.Resource$Pool.handle(Resource.java:568)
... 3 more

It seems like I am missing some files?
> Caused by: java.io.FileNotFoundException: Could not find resource locally: /res/ui/fraktur.res
I have read the README, and there is nothing about it, it should work after "ant" command, but it doesn't
B)
User avatar
524u
 
Posts: 86
Joined: Wed Nov 17, 2010 2:23 pm

Re: Can't build project

Postby eliminoid » Fri Oct 20, 2023 6:22 pm

Hi! Make sure you use the ant target 'deftgt' to build client
Hi
eliminoid
 
Posts: 150
Joined: Tue Oct 25, 2011 6:04 pm

Re: Can't build project

Postby 524u » Fri Oct 20, 2023 6:41 pm

It seems that there is already in build.xml

<target name="deftgt" depends="jars, bin" />
B)
User avatar
524u
 
Posts: 86
Joined: Wed Nov 17, 2010 2:23 pm

Re: Can't build project

Postby 524u » Fri Oct 20, 2023 6:51 pm

Okey, nevermind, I'm dumb, i just wrote "ant run" and it works
B)
User avatar
524u
 
Posts: 86
Joined: Wed Nov 17, 2010 2:23 pm

Re: Can't build project

Postby loftar » Fri Oct 20, 2023 8:02 pm

524u wrote:run "java -jar build/hafen.jar" and there are errors:

You're supposed to run bin/hafen.jar rather than build/hafen.jar, so that's probably your main problem. The README has more details.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 8926
Joined: Fri Apr 03, 2009 7:05 am

Re: Can't build project

Postby 524u » Fri Oct 20, 2023 8:15 pm

loftar wrote:
524u wrote:run "java -jar build/hafen.jar" and there are errors:

You're supposed to run bin/hafen.jar rather than build/hafen.jar, so that's probably your main problem. The README has more details.


Right :D
B)
User avatar
524u
 
Posts: 86
Joined: Wed Nov 17, 2010 2:23 pm


Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 71 guests