Can't find any jar files in the library

Discuss issues specific the Java port of Box2D
savail
Posts: 3
Joined: Thu Jul 09, 2015 9:36 am

Can't find any jar files in the library

Postby savail » Thu Jul 09, 2015 9:47 am

Hey,
I downloaded direct zip from https://github.com/jbox2d/jbox2d. I'm using eclipse so I followed these steps:
file->import->maven->existing maven project and pointed to the root dir of the library. The import seems to complete successfuly because I can start the testBed application but I can't find any jars of jBox2D. I searched whole my computer for them and the only jars connected with jBox2D I found were:
    jbox2d-testbed-2.3.1-SNAPSHOT.jar
    jbox2d-serialization-2.3.1-SNAPSHOT.jar
    jbox2d-library-2.3.1-SNAPSHOT.jar
All of them however have size of 0 so they're surely not what I'm looking for.

I also tried to right click the jbox2d-library project -> run as -> maven build or install but the following errors appear:

Code: Select all

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building jbox2d-library 2.3.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jbox2d-library ---
[INFO] Deleting C:\Moje biblioteki\jbox2d-master\jbox2d-library\target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ jbox2d-library ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Moje biblioteki\jbox2d-master\jbox2d-library\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ jbox2d-library ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 137 source files to C:\Moje biblioteki\jbox2d-master\jbox2d-library\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.450s
[INFO] Finished at: Thu Jul 09 18:44:16 CEST 2015
[INFO] Final Memory: 7M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project jbox2d-library: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


What am I doing wrong? I would be really grateful for any help!

savail
Posts: 3
Joined: Thu Jul 09, 2015 9:36 am

Re: Can't find any jar files in the library

Postby savail » Fri Jul 10, 2015 1:22 am

Turned out that I was using java 1.6 while jBox2D requires 1.7. This should be stated somewhere in the quickstart quide ;(. Took me some time to figure out. After changing project settings to use java 1.7 I managed to maven install the project jbox2d-library and in the "target" folder appeared jar: jbox2d-library-2.3.1-SNAPSHOT.jar. What worries me a bit is the suffix - "snapshot", is that normal file name and is that the only jar I need to use jBox2D in my android app for example?


Return to “Java”



Who is online

Users browsing this forum: Bing [Bot] and 1 guest