How to fix MCP crash? - minecraft

I decompiled (./decompile.sh) and recompiled (./recompile.sh) Minecraft using MCP without any error. But when I start client with ./startclient.sh, MCP will print this.
Note that I didn't modified any code.

If you are compiling with jdk9+ and running on jdk8 you need to cast.
From https://stackoverflow.com/a/67018142/16341452
(I am unable to install software in my current environment, therefore nothing is tested. Please let me know if anything is wrong)
You can try upgrading your java version or finding the code (in this case net.minecraft.client.renderer.texture.TextureUtil.java:293) and replacing it with a cast as described in the above post.

java and javac versions must be 8.

Related

How to fix problem 'Update plugin to start this course' for jetbrain's Learn Rust course?

I am trying to get jetbrain's rust course working but I have this problem:
I have installed the rust toolchain and the rust plugin. When I click update on the problem this comes up:
so I press ok and nothing happens. Does anyone know what the problem could be?
I am using Intellij community with the education version and I am on a windows machine.
This is caused by https://youtrack.jetbrains.com/issue/EDC-740/Cannot-start-Learn-Rust-Course
Please try the course again and it should work now.
The problem here is that the course published from nightly plugin version where a new version of the archive format was introduced (15).
As a result, stable plugin complains that it doesn't support the new format version but at this moment there isn't new stable version with new format support
An archive generated with the stable EduTools is uploaded, the corrupted version is hidden. It should be ok now.

How do I fix my missing dependency?

I installed jgrasp, a Java development environment. After installing it on Windows 10, I tried to start jgrasp up, which gave me this error:
java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jdk-9.0.1\bin\awt.dll: Can't find dependent libraries
The problem is, there is awt.dll in Java's bin file, but why isn't it recognizing it?
jGRASP is only a IDE tool. It will not work on its own. You need to install Java JDK which you can download here. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. I will recommend intelleJ instead of jGRASP tho.t's nicer and more functional.
Try jGRASP 2.0.4_02 which was just released. Most likely it will work. If not, install the latest Java 8 JDK and jGRASP will use that instead of Java 9 automatically.

IntelliJ: cannot find java.util.Optional

In a new project in IntelliJ I have set up a Java 8 JRE/JDK and language level 8.0.
But for some reason, the IDE cannot find java.util.Optional. The project compiles and works just fine (from within the IDE, too) but code completion does not work.
Any ideas? I'd like to ask a few other users before creating a ticket on their bugtracker...
I finally figured this out. For whatever reason, there was an entry for java.util.Optional in the exlusions under Editor, General, and Auto Import.
Removing that did the trick. No idea how or why it ended up being there. Doesn't sound like anything I would want to do.
Stupid IntelliJ.
I have a SpringBoot project which worked just fine. Then, the next day, when I want to run it, I got this error:
Caused by: java.lang.Error: Unresolved compilation problem:
The type java.util.Optional cannot be resolved. It is indirectly referenced from required .class files without changing anything!
I cleared IntelliJ cache.
Although it was a maven project it was already using JDK8,
I have changed the Project Settings, and said (again) to use JDK8,
Maven re-import, Cleaned the project, Build->Rebuild project, and it magically worked again
I had a similar problem in ubuntu. For me the problem was that I used JDK1.7 and when I changed it to JDK1.8 everything worked just fine.
Now, that makes sense, as Optional is something that was introduced in JDK1.8, before that the concept was exists only in Guava: http://onelineatatime.io/optional-guava-and-java-8/
Ran into the same problem (in IntelliJ 2017.2.7) and solved it like this:
Project Structure->Modules->Module SDK and there change it to 1.8
I've also first set Java compiler to 8 and Project Structure->Project->Project SDK and Project language level also set to 8 without success. In the end, the step I described finally fixed it.
I ran into this recently. The issue was related to my Project SDK setting. Didn't have to clear any caches.
The issue shows with my Project SDK set to 1.8 (1.8.0_202). The issue was fixed by changing it to 11 (11.0.6). Also confirmed that the issue reappears when I switched it back to 1.8.
In java 8 some functions of Optional class not supported such as isEmpty, ifPresentOrElse, or, stream, orElseThrow. You should check whether you use them or not. If you want to use these functions you can use java 11.

How to setup PHPUnit for Intellij IDEA 13.1 on Ubuntu 13.10?

I'm developing a PHP5 program using IDEA 13.1. Of course I want to cover my code using some Unit tests.
I installed phpunit via aptitude and upgraded it to 4.0.11 using pear.
Somehow IDEA seems unable to detect the installed PHPUnit... The class PHPUnit_Framework_TestCase is marked as undefined. The documentation on https://www.jetbrains.com/idea/webhelp/enabling-phpunit-support.html wants me to include either the pear directory (which does not exist) or the phpunit.phar (which does not exist, either).
So far most things went smooth with IDEA so I'm surprised that something as fundamental as setting up PHPUnit does not work :-(
Ok, after some fiddling around I got to a working solution. I downloaded phpunit-lts.phar from phpunit.de and put it directly into the project (along with the other files... meh).
Do not use the most current version (4.0 as of 21st of march 2014) of PHPUnit! Versions beyond 3.7 (or 3.8, as it seems) are not supported by IDEA or PHPStorm. You will get
PHP Fatal error: Class IDE_PHPUnit_Framework_TestListener contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PHPUnit_Framework_TestListener::addRiskyTest) in /tmp/ide-phpunit.php on line 504
So do yourself a favor and stick to the LTS version for now.
Another solution:
Set
"phpunit/phpunit": "3.7"
in composer.json
and run
composer update
Then the issue will be resolved.

Can't find java.util.stream in java8

I have installed jdk-8-ea-bin-b82-windows-x64-21_mar_2013 and IntelliJ IDEA 12.0.4. The strange thing is that I can't find java.util.stream in the intellisense provided by the IDE. I tried to compile either using the IDE or using the notepad and the compiler but it gives an error complaining that java.util.stream cannot be found! I have already set the module settings to use Java8 jdk. Any ideas about this problem?
I had the same problem with Netbeans. It seams that older versions of JDK 8 are not correctly packaged.
I had the same problem with b84, but I installed the build b116 and it is working properly.
PS: I think this is what #rmuller said in his comment
To change the JDK version, go to File --> Project Structure, and make sure both Project SDK and Project Language Level are set to JDK 8.
(I know you said you set the JDK level in the modules already, but I'm posting this here because there is relatively little information online on how to do that. Even the IDEA documentation on this issue doesn't mention it!)
Try to download from: http://jdk8.java.net/lambda/ to have lambda and stream support
As #rmuller pointed out there was no streams in the early release version that I have downloaded 5 years ago when I asked the question. Short while after I asked the question a new release was available and it contained the streams support.
YOU CAN SET PROJECT SETTING IN MODULES
THE LANGUAGE LEVEL SET 8-LAMBDAS
enter image description here
BEACUSE THE DEFAULT LANGUAGE LEVEL IS 7 -Diamonds