Resolved Need help with dev setup... (gradlew eclipse using wrong Java version)

JumboDS64

New Member
So I was told here (see comments) that I should start a thread here so they could help me get going. Sooooooo I did. Anyhow, does anyone know how to fix THIS?

The gradlew eclipse command is using Java 6 (when it needs Java 7), but Java's website says I have Java 7! I really don't know how I should fix this, as I'm very new to this...Help!
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
Here's a unix way to set a new path for java, while leaving java 6 as the default for most other things, providing you can figure out where your java 7 installation is.

Code:
JAVA_HOME=/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/
export JAVA_HOME
alias java=$JAVA_HOME/bin/java
You can put this into a java-setup.sh file, and the type ". java-setup.sh" to have the bash shell internalize it.
(That's dot, followed by a space, followed by the path to the shell script).

"whereis java" will tell you where java is currently installed as an executable.
"echo $JAVA_HOME" might give you a clue as to where java 6 (and thus, java 7) might be installed.

One thing to keep in mind is that there is a difference between a java runtime (jre) and a java software development kit (jdk). You are going to need a jdk to compile java code rather than a jre to run compiled java code.

you might also want to take a look at this google search to determine if there's something special you need to install the Java 7 JDK.

https://www.google.com/search?q=google mac os x install jdk
 

JumboDS64

New Member
One thing to keep in mind is that there is a difference between a java runtime (jre) and a java software development kit (jdk). You are going to need a jdk to compile java code rather than a jre to run compiled java code.
Wow why the heck didn't I think of that‽‽ ('cuz i'm a newbie) I tried downloading the latest version of JDK, and it worked like a charm! Thank you! Now, on to the next step...
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
Since you referenced Eclipse, be sure that Java 7 is listed as your installed jdk, and preferably, your default and only installed jdk for your Terasology workspace. Be aware that most people on this project (other than myself and a couple others) are using IntelliJ, and you're more likely to have things work out of the box and get more generalized help if you use IntelliJ. If you haven't used Eclipse before, you might as well use IntelliJ to start with.
 

JumboDS64

New Member
Since you referenced Eclipse, be sure that Java 7 is listed as your installed jdk, and preferably, your default and only installed jdk for your Terasology workspace. Be aware that most people on this project (other than myself and a couple others) are using IntelliJ, and you're more likely to have things work out of the box and get more generalized help if you use IntelliJ. If you haven't used Eclipse before, you might as well use IntelliJ to start with.
I think I will, as when I used Eclipse, I realized I had NO idea where the workspace would be/should be/is, so I just got a subprojectless screen... and generalized help is good... so IntelliJ it is! (gradlew idea got the needed file much quicker than gradlew eclipse, to!)
EDIT: There's no Enable Version Control Integration option under the CVS menu......what do I do? (I'm using the community edition by the way.)
EDIT2: Is Integrate Project the same thing? It's grayed out.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
As long as you git clone Terasology then gradlew idea then version control should be fully set up already :geek:

Just be sure that you "Open existing project" in IntelliJ and outright pick and open the Terasology.ipr file. Don't import the project or open it as a Gradle project :)

The integrate thing doesn't ring a bell so I'm wondering if you can confirm how you loaded the project first - doesn't sound like it worked right. Community Edition is fine
 

JumboDS64

New Member
Um, when I try to run it, it tells me that javax.vecmath is sealed. After some research, I'm pretty sure that:
1. "sealed" means that the package's library needs all its classes loaded from one source, and
2. the error means that there's a conflict between different loaded versions of the package
What I don't know is how to fix it. Here's the console thingie:
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java -Xms256m -Xmx1024m -Didea.launcher.port=7534 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 13 CE.app/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Users/(name)/Terasology/facades/PC/build/classes:/Users/(name)/Terasology/engine/build/classes:/Users/(name)/.gradle/caches/artifacts-26/filestore/com.google.guava/guava/15.0/bundle/ed727a8d9f247e2050281cb083f1c77b09dcb5cd/guava-15.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/com.google.code.gson/gson/2.2.4/jar/a60a5e993c98c864010053cb901b7eab25306568/gson-2.2.4.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/com.google.protobuf/protobuf-java/2.5.0/bundle/a10732c76bfacdbd633a7eb0f7968b1059a65dfa/protobuf-java-2.5.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/net.sf.trove4j/trove4j/3.0.3/jar/42ccaf4761f0dfdfa805c9e340d99a755907e2dd/trove4j-3.0.3.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/com.projectdarkstar.ext.jorbis/jorbis/0.0.17/jar/b9e006d604d268a3e1cb1b4dd3e91c1434837fde/jorbis-0.0.17.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.lwjgl.lwjgl/lwjgl/2.9.0/jar/5654d06e61a1bba7ae1e7f5233e1106be64c91cd/lwjgl-2.9.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.lwjgl.lwjgl/lwjgl_util/2.9.0/jar/a778846b64008fc7f48ead2377f034e547991699/lwjgl_util-2.9.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/io.netty/netty/3.6.5.Final/bundle/c3385a7138f5a3e91439e358547febc5028a4589/netty-3.6.5.Final.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.reflections/reflections/0.9.9-RC1/jar/b78b545f452a6b7d4fab2641dd0b0147a0f4fd5e/reflections-0.9.9-RC1.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/java3d/vecmath/1.5.2/jar/79846ba34cbd89e2422d74d53752f993dcc2ccaf/vecmath-1.5.2.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/net.java.dev.jna/jna/3.5.2/jar/f1bf9fe267e17c1a8f7d1aa2c985e7fe81a06da6/jna-3.5.2.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/net.java.dev.jna/platform/3.5.2/jar/beac07d13858ef3697ceeab43897d70aeb5113c9/platform-3.5.2.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.newdawn.slick/slick/237/jar/d59834341d858e866ba52e11ac1d18db5be940d0/slick-237.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.terasology.bullet/tera-bullet/1.0.0/jar/81be015da72931aff2910ece2b667651381eba50/tera-bullet-1.0.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/com.esotericsoftware.reflectasm/reflectasm/1.07/jar/761028ef46da8ec16a16b25ce942463eb1a9f3d5/reflectasm-1.07.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/ec.util/MersenneTwister/20/jar/9998e5d452a20402ee6161a5da01dc06b1b5e385/MersenneTwister-20.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/ch.qos.logback/logback-classic/1.0.13/jar/6b56ec752b42ccfa1415c0361fb54b1ed7ca3db6/logback-classic-1.0.13.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.slf4j/slf4j-api/1.7.5/jar/6b262da268f8ad9eff941b25503a9198f0a0ac93/slf4j-api-1.7.5.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/net.java.jutils/jutils/1.0.0/jar/e12fe1fda814bd348c1579329c86943d2cd3c6a6/jutils-1.0.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/net.java.jinput/jinput/2.0.5/jar/39c7796b469a600f72380316f6b1f11db6c2c7c4/jinput-2.0.5.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.javassist/javassist/3.16.1-GA/jar/315891b371395271977af518d4db5cee1a0bc9bf/javassist-3.16.1-GA.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/xml-apis/xml-apis/1.0.b2/jar/3136ca936f64c9d68529f048c2618bd356bf85c9/xml-apis-1.0.b2.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/dom4j/dom4j/1.6.1/jar/5d3ccc056b6f056dbf0dddfdf43894b9065a8f94/dom4j-1.6.1.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/com.jcraft/jogg/0.0.7/jar/8d79e2bf312278ed077054d620631755851b8a8/jogg-0.0.7.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.ow2.asm/asm/4.0/jar/659add6efc75a4715d738e73f07505246edf4d66/asm-4.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/ch.qos.logback/logback-core/1.0.13/jar/dc6e6ce937347bd4d990fc89f4ceb469db53e45e/logback-core-1.0.13.jar:/Users/(name)/Terasology/engine/libs/tera-ovr.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.codehaus.groovy/groovy/2.1.7/jar/9ff37f8fc304611085e38a763c4172c6a1e4801/groovy-2.1.7.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/antlr/antlr/2.7.7/jar/83cd2cd674a217ade95a4bb83a8a14f351f48bd0/antlr-2.7.7.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.ow2.asm/asm-tree/4.0/jar/67bd266cd17adcee486b76952ece4cc85fe248b8/asm-tree-4.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.ow2.asm/asm-commons/4.0/jar/a839ec6737d2b5ba7d1878e1a596b8f58aa545d9/asm-commons-4.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.ow2.asm/asm-util/4.0/jar/d7a65f54cda284f9706a750c23d64830bb740c39/asm-util-4.0.jar:/Users/(name)/.gradle/caches/artifacts-26/filestore/org.ow2.asm/asm-analysis/4.0/jar/1c45d52b6f6c638db13cf3ac12adeb56b254cdd7/asm-analysis-4.0.jar:/Applications/IntelliJ IDEA 13 CE.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.terasology.engine.Terasology -homedir
codeLocation: /Users/(name)/Terasology/engine/build/classes
installPath was null, running from IDE. Setting it to: /Users/(name)/Terasology
Found the natives dir: /Users/(name)/Terasology/natives
18:47:30,077 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@58f0fa12 - Added status listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
18:47:30,109 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@58f0fa12 - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
18:47:30,109 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@58f0fa12 - Naming appender as [FILE]
18:47:30,243 |-INFO in ch.qos.logback.core.FileAppender[FILE] - File property is set to [logs/Terasology.log]
18:47:30,253 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@58f0fa12 - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
18:47:30,255 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@58f0fa12 - Naming appender as [CONSOLE]
18:47:30.330 [main] INFO o.terasology.engine.TerasologyEngine - Initializing Terasology...
18:47:30.339 [main] INFO o.terasology.engine.TerasologyEngine - [buildNumber=, buildId=, buildTag=, buildUrl=, gitBranch=, gitCommit=, dateTime=, displayVersion=, engineVersion=]
18:47:30.340 [main] INFO o.terasology.engine.TerasologyEngine - Platform: Mac OS X
18:47:30.340 [main] INFO o.terasology.engine.TerasologyEngine - Home path:
18:47:30.340 [main] INFO o.terasology.engine.TerasologyEngine - Install path: /Users/(name)/Terasology
18:47:30.340 [main] INFO o.terasology.engine.TerasologyEngine - Java version: 1.7.0_45
18:47:30.737 [main] INFO o.terasology.engine.TerasologyEngine - Video Settings: {"pixelFormat":24,"windowPosX":-1,"windowPosY":-1,"windowWidth":1280,"windowHeight":720,"fullscreen":false,"viewDistance":"near","flickeringLight":true,"animateGrass":true,"animateWater":false,"fieldOfView":90.0,"cameraBobbing":true,"renderPlacingBox":true,"blurIntensity":2,"reflectiveWater":false,"vignette":true,"motionBlur":false,"ssao":false,"filmGrain":true,"outline":true,"lightShafts":false,"eyeAdaptation":true,"bloom":false,"dynamicShadows":false,"oculusVrSupport":false,"maxTextureAtlasResolution":4096,"maxChunksUsedForShadowMapping":1024,"shadowMapResolution":1024,"normalMapping":false,"parallaxMapping":false,"dynamicShadowsPcfFiltering":false,"volumetricFog":true,"cloudShadows":false,"renderNearest":true,"particleEffectLimit":10,"meshLimit":20,"volumetricLighting":false,"inscattering":true,"localReflections":true,"vSync":false,"debug":{"enabled":false,"stage":"opaque_color","firstPersonElementsHidden":false,"hudHidden":false,"wireframe":false,"renderChunkBoundingBoxes":false,"renderSkeletons":false}}
18:47:31.089 [main] DEBUG org.reflections.Reflections - going to scan these urls:
jar:file:/Users/(name)/Terasology/engine/libs/tera-ovr.jar!/
file:/Users/(name)/Terasology/facades/PC/build/classes/
file:/Users/(name)/Terasology/engine/build/classes/
18:47:36.370 [main] INFO org.reflections.Reflections - Reflections took 5281 ms to scan 3 urls, producing 369 keys and 1801 values
18:47:36.793 [main] ERROR o.terasology.engine.TerasologyEngine - Failed to initialise Terasology
java.lang.ExceptionInInitializerError: null
at org.terasology.asset.sources.AbstractSource.getUri(AbstractSource.java:103) ~[classes/:na]
at org.terasology.asset.sources.AbstractSource.getUri(AbstractSource.java:94) ~[classes/:na]
at org.terasology.asset.sources.DirectorySource.scanAssets(DirectorySource.java:78) ~[classes/:na]
at org.terasology.asset.sources.DirectorySource.scanAssets(DirectorySource.java:75) ~[classes/:na]
at org.terasology.asset.sources.DirectorySource.scanAssets(DirectorySource.java:75) ~[classes/:na]
at org.terasology.asset.sources.DirectorySource.<init>(DirectorySource.java:40) ~[classes/:na]
at org.terasology.engine.module.ModuleManagerImpl.processModDirectory(ModuleManagerImpl.java:287) ~[classes/:na]
at org.terasology.engine.module.ModuleManagerImpl.refresh(ModuleManagerImpl.java:214) ~[classes/:na]
at org.terasology.engine.module.ModuleManagerImpl.<init>(ModuleManagerImpl.java:105) ~[classes/:na]
at org.terasology.engine.module.ModuleManagerImpl.<init>(ModuleManagerImpl.java:85) ~[classes/:na]
at org.terasology.engine.TerasologyEngine.initModuleManager(TerasologyEngine.java:508) ~[classes/:na]
at org.terasology.engine.TerasologyEngine.initManagers(TerasologyEngine.java:490) ~[classes/:na]
at org.terasology.engine.TerasologyEngine.init(TerasologyEngine.java:169) ~[classes/:na]
at org.terasology.engine.Terasology.main(Terasology.java:54) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) [idea_rt.jar:na]
Caused by: java.lang.SecurityException: sealing violation: package javax.vecmath is sealed
at java.net.URLClassLoader.getAndVerifyPackage(URLClassLoader.java:388) ~[na:1.7.0_45]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:417) ~[na:1.7.0_45]
at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0_45]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.7.0_45]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_45]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_45]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_45]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_45]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[na:1.7.0_45]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_45]
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_45]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_45]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[na:1.7.0_45]
at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0_45]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.7.0_45]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_45]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_45]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_45]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_45]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[na:1.7.0_45]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_45]
at org.terasology.rendering.assets.atlas.AtlasLoader.<init>(AtlasLoader.java:50) ~[classes/:na]
at org.terasology.asset.AssetType.<clinit>(AssetType.java:76) ~[classes/:na]
... 19 common frames omitted

Process finished with exit code 0
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Top