# trouble with games/minecraft after openjdk7 reinstallation



## dominik (Jun 6, 2014)

Hello FreeBSD Community,

I updated my packages via `pkg upgrade` what replaced my prior java/openjdk7 with java/openjdk6. I want to use java/openjdk7 so I removed openjdk6 via `pkg delete openjdk6` and reinstalled all ports which became dependent on openjdk6. That worked for every application except games/minecraft-client which gives me the following error message now:


```
[09:27:03 INFO]: Job 'Version & Libraries' finished successfully (took 0:00:01.555)
[09:27:03 INFO]: Launching game
[09:27:03 INFO]: Unpacking natives to /home/dominik/.minecraft/versions/1.7.2-freebsd/1.7.2-freebsd-natives-4033060566164
[09:27:03 INFO]: Reconstructing virtual assets folder at /home/dominik/.minecraft/assets/virtual/legacy
[09:27:03 INFO]: Launching in /home/dominik/.minecraft
[09:27:03 INFO]: Half command: /usr/local/openjdk7/jre/bin/java -Xmx1G2 # -Djava.library.path=/home/dominik/.minecraft/versions/1.7.2-freebsd/1.7.2-freebsd-natives-4033060566164 -cp /home/dominik/.minecraft/libraries/java3d/vecmath/1.3.1/vecmath-1.3.1.jar:/home/dominik/.minecraft/libraries/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar:/home/dominik/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/dominik/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar:/home/dominik/.minecraft/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar:/home/dominik/.minecraft/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar:/home/dominik/.minecraft/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar:/home/dominik/.minecraft/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar:/home/dominik/.minecraft/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar:/home/dominik/.minecraft/libraries/io/netty/netty-all/4.0.10.Final/netty-all-4.0.10.Final.jar:/home/dominik/.minecraft/libraries/com/google/guava/guava/15.0/guava-15.0.jar:/home/dominik/.minecraft/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar:/home/dominik/.minecraft/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/dominik/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/dominik/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/dominik/.minecraft/libraries/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/home/dominik/.minecraft/libraries/com/mojang/authlib/1.3/authlib-1.3.jar:/home/dominik/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar:/home/dominik/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar:/home/dominik/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0.jar:/home/dominik/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0.jar:/home/dominik/.minecraft/versions/1.7.2-freebsd/1.7.2-freebsd.jar net.minecraft.client.main.Main
[09:27:03 ERROR]: Couldn't launch game
java.io.IOException: Cannot run program "/usr/local/openjdk7/jre/bin/java" (in directory "/home/dominik/.minecraft"): error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041) ~[?:1.7.0_55]
	at com.mojang.launcher.game.process.direct.DirectGameProcessFactory.startGame(DirectGameProcessFactory.java:14) ~[launcher.jar:?]
	at net.minecraft.launcher.game.MinecraftGameRunner.launchGame(MinecraftGameRunner.java:205) [launcher.jar:?]
	at com.mojang.launcher.game.runner.AbstractGameRunner.onDownloadJobFinished(AbstractGameRunner.java:177) [launcher.jar:?]
	at com.mojang.launcher.updater.download.DownloadJob.popAndDownload(DownloadJob.java:122) [launcher.jar:?]
	at com.mojang.launcher.updater.download.DownloadJob.access$000(DownloadJob.java:12) [launcher.jar:?]
	at com.mojang.launcher.updater.download.DownloadJob$1.run(DownloadJob.java:86) [launcher.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_55]
	at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_55]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_55]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_55]
	at java.lang.Thread.run(Thread.java:745) [?:1.7.0_55]
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method) ~[?:1.7.0_55]
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:191) ~[?:1.7.0_55]
	at java.lang.ProcessImpl.start(ProcessImpl.java:130) ~[?:1.7.0_55]
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022) ~[?:1.7.0_55]
	... 11 more
[09:27:03 INFO]: Deleting /home/dominik/.minecraft/versions/1.7.2-freebsd/1.7.2-freebsd-natives-4033060566164
```

Could it have something to do with the following error message which I got while reinstalling games/lwjgl or with the fact that lwjgl was updated to 2.9.1?


```
pkg-static: (lwjgl-2.9.1) /usr/ports/games/lwjgl/work/stage//usr/local/lib/lwjgl2.9.1/liblwjgl64.so - shared library libjawt.so not found
```

Thanks for reading, Dominik


----------



## talsamon (Jun 6, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*

Maybe, this could be the solution:

`cd /usr/local/lib`
`ln -s /usr/local/openjdk7/jre/lib/amd64/libjawt.so libjawt.so`
or
`ln -s /usr/local/openjdk7-jre/lib/amd64/libjawt.so libjawt.so`


----------



## EmeraldBot (Jun 6, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*

Hello! I have this exact same problem. Unfortunately, I don't know how to solve it, and the given solution didn't work for me. But given that we both have it, I don't think it's an isolated event.


----------



## dominik (Jun 8, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*



			
				talsamon said:
			
		

> Maybe, this could be the solution:
> 
> `cd /usr/local/lib`
> `ln -s /usr/local/openjdk7/jre/lib/amd64/libjawt.so libjawt.so`
> ...



Actually that fixed the error I got reinstalling games/lwjgl. But games/minecraft-client still doesn't work. Maybe even more shared libraries are missing?


----------



## talsamon (Jun 8, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*

Try make a check with `pkg_libchk` from sysutils/bsdadminscripts


----------



## wblock@ (Jun 8, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*

Again: making fake symlinks to system libraries to "fix" problems is highly likely to cause mysterious failures in the future.  It usually means something needs to be rebuilt, or possibly indicates a bug.


----------



## EmeraldBot (Jun 9, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*

I've tried running pkg_libchk, but it didn't report any errors. I'm kinda stumped, to be honest :/. Minecraft works fine on Windows with Java 1.7, so it's not a problem from 6-7... Unless something major in openjdk, specifically, changed?


----------



## EmeraldBot (Jun 9, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*

I've found something promising! Take a look: http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2014-April/276962.html It's the same issue here, and the fix is apparently to use java/openjdk8 for minecraft-client. The patch is at the website.


----------



## dominik (Jun 11, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*



			
				EmeraldBot said:
			
		

> I've found something promising! Take a look: http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2014-April/276962.html It's the same issue here, and the fix is apparently to use java/openjdk8 for minecraft-client. The patch is at the website.



Awsome, that patch works just fine! How can I help so that it will be merged into the ports tree as soon as possible?


----------



## EmeraldBot (Jun 11, 2014)

*Re: trouble with games/minecraft after openjdk7 reinstallati*

I'm not sure. I think, the best way would be to contact the ports maintainer. That is, the person whose responsibility it is to watch over the Minecraft port, and direct them to this thread. If the ports maintainer accepts it (if there is one, which I'm pretty sure there is), they'll take care of everything. Also note, the exact process I had to use was to start the client with java/openjdk8, and then direct the launcher to start minecraft with java/linux-sun-jdk-17. Crazy, I know :e


----------

