Page 15 of 18

Re: How to get started?

PostPosted: 10 Mar 2014, 14:21
by drdev
excessum wrote:I need some basic help with understanding the codebase. I am completely unfamiliar with Java programming so bear with me if all this is really trivial.

Is there a way to insert breakpoints within forge-ai to study the call-stack? I was inserting the breakpoints in Eclipse and doing the "run as Java application" on forge-gui and fail to trigger any of the breakpoints. Specifically, I was studying "CurseAI" and inserting breakpoints in "pumpTgtAI" in PumpAI.java.
You need to use "Debug As" instead of "Run As" if you want to hit breakpoints.

Re: How to get started?

PostPosted: 20 Apr 2014, 20:51
by xbon
I keep getting

RA layer request failed
svn: REPORT of '/forge/!svn/vcc/default': Could not read response body: connection was closed by server (http://svn.slightlymagic.net)

on trying to import from svn checkout at random points.

Re: How to get started?

PostPosted: 21 Apr 2014, 16:11
by moomarc
I found I had better luck with avoiding timeouts with the checkout when I used command line instead of Eclipse for the initial checkout. Perhaps give that a try xbon.

Re: How to get started?

PostPosted: 22 Apr 2014, 00:18
by xbon
moomarc wrote:I found I had better luck with avoiding timeouts with the checkout when I used command line instead of Eclipse for the initial checkout. Perhaps give that a try xbon.
on svn i get an error as well w/o subclipse, e120106: ra_serf: The server sent a truncated HTTP response body. at random points. i can't complete the checkout in subclipse or svn right now.

should I be using the latest version of sliksvn, or 1.6?


edit: got tortoisesvn and did a clean up and update to pick up from where it left off; I'll see if this works.


So I checked out with tortoiseSVN successfully, however now when I try to run as java application, it can't find the main class file....

"Selection does not contain a main type."

Re: How to get started?

PostPosted: 22 Apr 2014, 06:33
by Sloth
xbon wrote:So I checked out with tortoiseSVN successfully, however now when I try to run as java application, it can't find the main class file....

"Selection does not contain a main type."
The new main class is in forge-gui-desktop.

Re: How to get started?

PostPosted: 26 Jun 2014, 15:15
by timmermac
Trying to run from SVN, when performing the run-as command as described, I get the following error

Code: Select all
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
   Cannot switch on a value of type String. Only convertible int values or enum constants are permitted

   at forge.view.Main.main(Main.java:58)

Re: How to get started?

PostPosted: 26 Jun 2014, 16:15
by drdev
timmermac wrote:Trying to run from SVN, when performing the run-as command as described, I get the following error

Code: Select all
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
   Cannot switch on a value of type String. Only convertible int values or enum constants are permitted

   at forge.view.Main.main(Main.java:58)
Do you have Java 7 installed? Java 7 is required for switching on strings to be supported.

Re: How to get started?

PostPosted: 26 Jun 2014, 16:39
by timmermac
Yep. Java 7 is running on my computer.

Re: How to get started?

PostPosted: 01 Jul 2014, 20:33
by moomarc
Is Java 7 set as your compiler though? If you were using java 6 when you first set up your svn, you possibly need to change that

Re: How to get started?

PostPosted: 08 Jul 2014, 22:39
by troyready
I've been having trouble getting m2e & Eclipse setup, so I thought I'd take up friarsol's suggestion and try IntelliJ. It seems to be working properly, but I'm not quite sure how to get started with building the project (specifically the desktop app).

I configured the global SDKs to point to my Android SDK install and my system install of JDK 7:
platformsdks.png
Platform SDKs


I then configured my forge project SDK to 1.7. However, when trying to build the project with the following settings, I get the message "Error:Android Pre Dex: [forge] Android SDK is not specified".
buildoptions.png
Build/Run options


I've tried changing the SDK for the top level forge module (see next pic), but then builds quickly fail with the following output:
Code: Select all
/usr/lib/jvm/default-java/bin/java -Didea.launcher.port=7534 -Didea.launcher.bin.path=/home/troyr1/code/idea-IC-135.909/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/default-java/jre/lib/charsets.jar:/usr/lib/jvm/default-java/jre/lib/management-agent.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jsse.jar:/usr/lib/jvm/default-java/jre/lib/resources.jar:/usr/lib/jvm/default-java/jre/lib/compilefontconfig.jar:/usr/lib/jvm/default-java/jre/lib/rhino.jar:/usr/lib/jvm/default-java/jre/lib/javazic.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/ext/localedata.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/default-java/jre/lib/ext/zipfs.jar:/usr/lib/jvm/default-java/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/default-java/jre/lib/ext/dnsns.jar:/usr/lib/jvm/default-java/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/default-java/jre/lib/ext/sunjce_provider.jar:/home/troyr1/magic/intellij/forge/forge-gui-desktop/target/classes:/home/troyr1/magic/intellij/forge/forge-core/target/classes:/home/troyr1/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar:/home/troyr1/.m2/repository/org/apache/commons/commons-lang3/3.3/commons-lang3-3.3.jar:/home/troyr1/magic/intellij/forge/forge-game/target/classes:/home/troyr1/.m2/repository/com/googlecode/minlog/1.2/minlog-1.2.jar:/home/troyr1/magic/intellij/forge/forge-ai/target/classes:/home/troyr1/magic/intellij/forge/forge-net/target/classes:/home/troyr1/.m2/repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-websocket/8.1.14.v20131031/jetty-websocket-8.1.14.v20131031.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-util/8.1.14.v20131031/jetty-util-8.1.14.v20131031.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-io/8.1.14.v20131031/jetty-io-8.1.14.v20131031.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-http/8.1.14.v20131031/jetty-http-8.1.14.v20131031.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-server/8.1.14.v20131031/jetty-server-8.1.14.v20131031.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-continuation/8.1.14.v20131031/jetty-continuation-8.1.14.v20131031.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-servlet/8.1.14.v20131031/jetty-servlet-8.1.14.v20131031.jar:/home/troyr1/.m2/repository/org/eclipse/jetty/jetty-security/8.1.14.v20131031/jetty-security-8.1.14.v20131031.jar:/home/troyr1/magic/intellij/forge/forge-gui/target/classes:/home/troyr1/.m2/repository/com/thoughtworks/xstream/xstream/1.4.7/xstream-1.4.7.jar:/home/troyr1/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar:/home/troyr1/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar:/home/troyr1/.m2/repository/org/freemarker/freemarker/2.3.20/freemarker-2.3.20.jar:/home/troyr1/.m2/repository/com/miglayout/miglayout/3.7.4/miglayout-3.7.4.jar:/home/troyr1/.m2/repository/com/mortennobel/java-image-scaling/0.8.5/java-image-scaling-0.8.5.jar:/home/troyr1/.m2/repository/com/jhlabs/filters/2.0.235/filters-2.0.235.jar:/home/troyr1/.m2/repository/junit/junit/4.10/junit-4.10.jar:/home/troyr1/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/home/troyr1/.m2/repository/com/googlecode/soundlibs/jlayer/1.0.1-1/jlayer-1.0.1-1.jar:/home/troyr1/code/idea-IC-135.909/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain forge.view.Main
FSkin > can't find skins directory!
main > java.lang.ExceptionInInitializerError
   at forge.Singletons.initializeOnce(Singletons.java:50)
   at forge.view.Main.main(Main.java:48)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.RuntimeException: Cannot find default skin.
   at forge.toolbox.FSkin.loadLight(FSkin.java:1006)
   at forge.toolbox.FSkin.loadLight(FSkin.java:1008)
   at forge.view.SplashFrame.<init>(SplashFrame.java:70)
   at forge.view.FView.<init>(FView.java:66)
   at forge.view.FView.<clinit>(FView.java:38)
   ... 7 more

Exception: java.lang.ExceptionInInitializerError thrown from the UncaughtExceptionHandler in thread "main"

Process finished with exit code 1
forgemodule-android.png
forge module settings


Not sure if I'm messing up something Android specific or missing something else entirely. Would greatly appreciate anyone's direction and assistance here!

Re: How to get started?

PostPosted: 08 Jul 2014, 23:05
by KrazyTheFox
"FSkin > can't find skins directory!"
That's the problem that you need to fix. I'm away from my computer and haven't tried setting up Forge in IntelliJ yet (just started using it recently) so I'm not sure what to do off the top of my head.

Re: How to get started?

PostPosted: 08 Jul 2014, 23:36
by friarsol
KrazyTheFox wrote:"FSkin > can't find skins directory!"
That's the problem that you need to fix. I'm away from my computer and haven't tried setting up Forge in IntelliJ yet (just started using it recently) so I'm not sure what to do off the top of my head.
I believe you need to set both your working directory and the classpath of the configuration to ..\forge\forge-gui-desktop

the main Class should be forge.view.Main

Re: How to get started?

PostPosted: 09 Jul 2014, 00:13
by troyready
That was it -- thank you so much!

Re: How to get started?

PostPosted: 24 Jul 2014, 17:14
by jestervlc
Hi, I have downloaded the project and installed it according to the instructions. I have been able to build the typical jar file (via Maven) correctly. But if I want to run/debug with Eclipse, once I click the run as Java application, Eclipse doesn't provide me a list of classes to choose from.

If I download just the forge-gui-desktop module, then the expected textbox with the classes appear and I can choose, but possibly I lack an additional folder or library and I get an error similar to the "can't find skins directory".

What do you recomend me to try next? I have mostly worked with JDeveloper rather than eclipse, and the project management (compilation,...) is somehow different.

Re: How to get started?

PostPosted: 16 Aug 2014, 18:20
by PeterPrins
Hi, I'm trying to set up my development tools using the 'Forge: How to Get Started Developing Forge' page on the wiki. I have a question about Subversion: Should I compile it myself, or can I use one of the third party binaries, and if so, which one would you recommend? (Edit: By Subversion I mean SVN, not the card :p )