How to compile client?

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

How to compile client?

Postby GladiatoR » Fri Dec 04, 2015 10:43 am

Was trying to build hafen project downloaded from git in Eclipse, but always getting new errors after finding new & new solution to fix them, but tired of getting them all the time...

Can someone please describe how to properly build project in Eclipse or IDEA? (I'm .net coder and never used such IDE for java...)
User avatar
GladiatoR
 
Posts: 213
Joined: Fri Aug 28, 2015 11:04 pm

Re: How to compile client?

Postby shubla » Fri Dec 04, 2015 11:26 am

Maybe send us your build.xml ?
If you just say " I have problem "
Its quite hard to solve
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13043
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: How to compile client?

Postby GladiatoR » Fri Dec 04, 2015 11:38 am

I have used build.xml from Armber client (https://github.com/romovs/amber)
User avatar
GladiatoR
 
Posts: 213
Joined: Fri Aug 28, 2015 11:04 pm

Re: How to compile client?

Postby GladiatoR » Fri Dec 04, 2015 12:10 pm

shubla wrote:If you just say " I have problem "
Its quite hard to solve


Atm errors in Eclipse:
Code: Select all
Exception in thread "main" java.lang.ExceptionInInitializerError
   at haven.MainFrame.<clinit>(MainFrame.java:41)
Caused by: java.lang.RuntimeException: Delayed error in resource gfx/icons/bram (v-1), from local res source
   at haven.Resource$Pool$Queued.get(Resource.java:338)
   at haven.Resource$Pool$Queued.get(Resource.java:1)
   at haven.Loading.waitforint(Loading.java:87)
   at haven.Loading.waitfor(Loading.java:99)
   at haven.Resource$Pool.loadwait(Resource.java:603)
   at haven.Resource$Pool.loadwait(Resource.java:607)
   at haven.Resource.loadtex(Resource.java:1651)
   at haven.Config$1.<init>(Config.java:174)
   at haven.Config.<clinit>(Config.java:173)
   ... 1 more
Caused by: haven.Resource$LoadException: Load error in resource gfx/icons/bram(v-1), from local res source
   at haven.Resource$Pool.handle(Resource.java:395)
   at haven.Resource$Pool.access$5(Resource.java:376)
   at haven.Resource$Pool$Loader.run(Resource.java:524)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Could not find resource locally: gfx/icons/bram
   at haven.Resource$JarSource.get(Resource.java:188)
   at haven.Resource$Pool.handle(Resource.java:379)
   ... 3 more
User avatar
GladiatoR
 
Posts: 213
Joined: Fri Aug 28, 2015 11:04 pm

Re: How to compile client?

Postby shubla » Fri Dec 04, 2015 12:20 pm

GladiatoR wrote:
shubla wrote:If you just say " I have problem "
Its quite hard to solve


Atm errors in Eclipse:
Code: Select all
Exception in thread "main" java.lang.ExceptionInInitializerError
   at haven.MainFrame.<clinit>(MainFrame.java:41)
Caused by: java.lang.RuntimeException: Delayed error in resource gfx/icons/bram (v-1), from local res source
   at haven.Resource$Pool$Queued.get(Resource.java:338)
   at haven.Resource$Pool$Queued.get(Resource.java:1)
   at haven.Loading.waitforint(Loading.java:87)
   at haven.Loading.waitfor(Loading.java:99)
   at haven.Resource$Pool.loadwait(Resource.java:603)
   at haven.Resource$Pool.loadwait(Resource.java:607)
   at haven.Resource.loadtex(Resource.java:1651)
   at haven.Config$1.<init>(Config.java:174)
   at haven.Config.<clinit>(Config.java:173)
   ... 1 more
Caused by: haven.Resource$LoadException: Load error in resource gfx/icons/bram(v-1), from local res source
   at haven.Resource$Pool.handle(Resource.java:395)
   at haven.Resource$Pool.access$5(Resource.java:376)
   at haven.Resource$Pool$Loader.run(Resource.java:524)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Could not find resource locally: gfx/icons/bram
   at haven.Resource$JarSource.get(Resource.java:188)
   at haven.Resource$Pool.handle(Resource.java:379)
   ... 3 more

For me it looks like youre not even running build.xml ¦]
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13043
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: How to compile client?

Postby GladiatoR » Fri Dec 04, 2015 12:33 pm

I have added existing project to eclipse, then right clicked on build.xml and used Build As -> 1 Ant Build. After that it build:
Code: Select all
Buildfile: C:\Workspace\hafen\build.xml
build-env:
hafen-client:
buildinfo:
lib-classes:
jar:
res-jar:
jars:
deftgt:
BUILD SUCCESSFUL


But when Im trying to run it it's says:
Image

Then I trying to debug it and saw this error that I posted before.
User avatar
GladiatoR
 
Posts: 213
Joined: Fri Aug 28, 2015 11:04 pm

Re: How to compile client?

Postby borka » Fri Dec 04, 2015 12:59 pm

Caused by: java.io.FileNotFoundException: Could not find resource locally: gfx/icons/bram


Do you have
Code: Select all
amber-res.jar
in your build?

-> amber-res.jar\res\gfx\icons\bram.res

in amber build.xml you'll find amber-res.jar "build instructions" from line 68 on

a fast try to fix would be to grab amber-res.jar from precompiled build ...
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: How to compile client?

Postby pedorlee » Fri Dec 04, 2015 3:28 pm

Why eclipse?


I hate it.
User avatar
pedorlee
 
Posts: 1291
Joined: Sat Feb 04, 2012 10:36 pm

Re: How to compile client?

Postby lachlaan » Fri Dec 04, 2015 3:44 pm

Apache ant is pretty straightforward to use as well. Either way both mediums should easily point to what's wrong. Just practice reading into the error codes and what they might mean. Didn't quite get if you're trying to compile the default client with the Amber client's build.xml and if so why? o.o Or at least why without checking for discrepancies first.
lachlaan
 
Posts: 472
Joined: Sat Apr 06, 2013 9:32 pm

Re: How to compile client?

Postby stya » Fri Dec 04, 2015 4:01 pm

GladiatoR wrote:Was trying to build hafen project downloaded from git in Eclipse, but always getting new errors after finding new & new solution to fix them, but tired of getting them all the time...

Can someone please describe how to properly build project in Eclipse or IDEA? (I'm .net coder and never used such IDE for java...)


For IDEA : download, run the ant build ¦]

Ok I had an encoding error on my machine, something about UTF-8 not being recognized/used but it was easy to fix and it might be a windows specific error (was too lazy to open my linux VM, mea culpa)
Image
User avatar
stya
 
Posts: 943
Joined: Wed May 21, 2014 3:13 pm

Next

Return to The Wizards' Tower

Who is online

Users browsing this forum: KingMav, Naylok and 85 guests