Decompiling MCP error (version 9.18) returns 'Decompile Failed' - minecraft

I have decided to take on MCP and have downloaded it, however, when running the decompile.bat, it returns an error.
(I'm running 32-bit Windows 10)
Here is what it returned:
'"C:\Program Files\Java\jdk1.8.0_65\bin\java" -jar runtime\bin\fernflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=WARN "-e=jars\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar" "-e=jars\libraries\com/ibm/icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar" "-e=jars\libraries\tv/twitch\twitch-external-platform\4.5\twitch-external-platform-4.5-natives-windows-32.jar" "-e=jars\libraries\org/apache/httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar" "-e=jars\libraries\org/apache/commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar" "-e=jars\libraries\net/java/jutils\jutils\1.0.0\jutils-1.0.0.jar" "-e=jars\libraries\net/java/dev/jna\jna\3.4.0\jna-3.4.0.jar" "-e=jars\libraries\com/paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar" "-e=jars\libraries\net/sf/jopt-simple\jopt-simple\4.6\jopt-simple-4.6.jar" "-e=jars\libraries\com/google/guava\guava\17.0\guava-17.0.jar" "-e=jars\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar" "-e=jars\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar" "-e=jars\libraries\org/apache/commons\commons-compress\1.8.1\commons-compress-1.8.1.jar" "-e=jars\libraries\net/java/dev/jna\platform\3.4.0\platform-3.4.0.jar" "-e=jars\libraries\com/paulscode\codecjorbis\20101023\codecjorbis-20101023.jar" "-e=jars\libraries\com/paulscode\soundsystem\20120107\soundsystem-20120107.jar" "-e=jars\libraries\com/paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl_util\2.9.4-nightly-20150209\lwjgl_util-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-codec\commons-codec\1.9\commons-codec-1.9.jar" "-e=jars\libraries\org/apache/httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl\2.9.4-nightly-20150209\lwjgl-2.9.4-nightly-20150209.jar" "-e=jars\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar" "-e=jars\libraries\com/mojang\realms\1.7.39\realms-1.7.39.jar" "-e=jars\libraries\com/mojang\authlib\1.5.21\authlib-1.5.21.jar" "-e=jars\libraries\com/google/code/gson\gson\2.2.4\gson-2.2.4.jar" "-e=jars\libraries\tv/twitch\twitch\6.5\twitch-6.5.jar" "-e=jars\libraries\com/paulscode\codecwav\20101023\codecwav-20101023.jar" "-e=jars\libraries\tv/twitch\twitch-platform\6.5\twitch-platform-6.5-natives-windows-32.jar" "-e=jars\libraries\net/java/jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar" "-e=jars\libraries\io/netty\netty-all\4.0.23.Final\netty-all-4.0.23.Final.jar" temp/minecraft_ff_in.jar temp\src\minecraft' failed : 1
Decompile failed

This is caused by the decompilation system running out of RAM. I'm not entirely sure why it's happening, but it also was happening to me.
If you're using Minecraft Forge's ForgeGradle, see this. You can either edit the gradle options file ( .gradle/gradle.properties in your user folder) and add org.gradle.jvmargs=-Xmx2G to it, or you can set the options variable to -Xmx2G (in a command prompt, run set GRADLE_OPTS=-Xmx2G and then gradlew setupDecompWorkspace).
However, given that you referenced decompile.bat, you probably are using MCP without Forge. (Which is fine but forge does make mods easier/more compatible; you may want to consider doing this if you're making a more permanent mod rather than just messing about.) In this case, you can edit MCP's configuration to increase the given RAM.
In the MCP folder, open the conf folder and then open mcp.cfg with a text editor of your choice. Then, find this line (near the bottom)
CmdFernflower = %s -jar %s -din=1 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
and replace it with this:
CmdFernflower = %s -Xmx2G -jar %s -din=1 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
(You may need to change other lines also adding -Xmx2G before -jar but it doesn't seem to be needed from my experience).
This will run the decompiler with additional RAM.
Alternatively, if you don't want to mess around with the MCP configuration, MCP910 doesn't seem to have this issue. It works with 1.8.0 instead of 1.8.8, but should still do everything you want.

I know, this answer comes very late, but you should install the 64-bit Version of Java. With the 32-Bit Version, it doesn't work...
I don't know if you can install this on your 32-Bit System, but you can try it. On my 86-Bit System (Windows 8) it works!

Related

WSL can't detect VS code

At first, I tried to fix my problem of npm instruction
so I added
[interop]
appendWindowsPath = false
to /etc/wsl.conf
It works, but another problem happen.
When I type code .
Command 'code' not found, did you mean:
command 'node' from deb nodejs (12.22.9~dfsg-1ubuntu3)
command 'cdde' from deb cdde (0.3.1-1build1)
command 'ode' from deb plotutils (2.6-11)
command 'tcode' from deb emboss (6.6.0+dfsg-11ubuntu1)
command 'cde' from deb cde (0.1+git9-g551e54d-1.2)
Try: sudo apt install <deb name>
The above Error message appear.
I tried the following instruction
export PATH=$PATH:"/mnt/c/Users/%USERNAME%/AppData/Local/Programs/Microsoft VS Code/bin"
It also works properly.
Whenever I restarted WSL, npm instruction still worked well, but code instruction lost its function again.
What should I do to fix the problem?
Thanks in advance!
My main suggestion would be to not use appendWindowsPath = false to fix your NPM problem. That's like using a sledgehammer as a flyswatter. As I said in this answer:
Please do not follow the recommendations (like this answer) to completely remove all Windows paths from WSL, as that will severely limit your ability to run Windows applications in WSL (one of its great features).
You'll also lose access to the ability to run PowerShell scripts and commands in WSL easily. You won't have direct access to wsl.exe itself from inside WSL (which comes in handy).
You can type the full paths to these commands, of course, but most instructions and other answers you find here are going to assume that you've left the Windows path intact.
Instead, figure out where npm is installed in your WSL distribution and then determine why it is further toward the end of the PATH than your Windows directories. Windows paths are added at the end of the Linux PATH for a reason. If something in your startup files is adding to the path, it should put it at the beginning, so it has precedence. E.g.:
export PATH="newdir:$PATH"
Note that I'm not saying that you should change your export statement above since, as mentioned, that Windows path would normally come at the end anyway. It's really not going to matter unless you put another code executable somewhere else in your path.
Whenever I restarted WSL, npm instruction still worked well, but code instruction lost its function again.
If you do want the "quick and dirty" (not recommended) solution, then you can simply add that export command that "makes it work" to your ~/.bashrc. That file is processed each time the Bash shell starts interactively.

Docker build fails always with error hcsshim::PrepareLayer - failed failed in Win32: Incorrect function. (0x1) Windows Containers

Steps to reproduce are very easy.
Create a Dockerfile.
My Dockerfile has many more lines, but I have trimmed them so we can focus in the source of the problem.
Said that, these two lines alone (without anything more) show the problem.
FROM microsoft/iis
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $VerbosePreference = 'Continue'; "]
Run docker build . and you get hcsshim::PrepareLayer - failed failed in Win32: FunciĆ³n incorrecta. (0x1).
Windows 10 Pro 1909 (but it happened too in 1903)
Docker version: 2.1.0.5
Engine: 19.03.5
Machine: 0.16.2
I have found the solution to the problem.
Reading all the https://github.com/docker/for-win/issues/3884 bug, some have found a simple solution: rename C:\windows\system32\driver\cbfsconnect2017.sys so it isn't loaded the next boot.
Disabling that driver enables me to do a docker build for the first time in windows containers in almost a year.
In my case Box Sync was the one using that driver.
EDIT: #GustavoTM have found that pCloud raises the same problem.
EDIT2: #VonC have noticed that some people in the issue in GitHub has solved it deleting this other file: C:\Windows\System32\drivers\cbfs6.sys. I haven't tried that, but i put it if it helps others.
The good thing is that I don't need to uninstall Box, but only rename that file.
This is still an issue (still open) with Win10.
Looks like uninstalling cloud storage providers with file system filters like Dropbox, Box, etc. as a workaround is an option for some users.
Deinstall cloud storage providers or virus scanners; if you identify which one is not working please share in https://github.com/docker/for-win/issues/3884
In my case was the problem similar but the file cbfs6.sys was placed somewhere in the rest of uninstalled application Jungle disk, somewhere in the folder c:\Program files\Jungle disk .... It's part of Callback File System signed by EldoS Corporation.
The folder could be rename only and not delete directly. So I could delete its immediately after the PC restart, before running the Docker. So it could be delete during the Docker service restart too.

jackrabbit - There is an error in invoking javac. A full JDK (not just JRE) is required

I'm learning Jackrabbit and following the documentation to run a standalone server. When I run the command java -jar jackrabbit-standalone-2.16.2.jar and access localhost:8080 on my browser, I get a 500 error saying:
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
What am I doing wrong?
Note: I have set my jdk/bin path in my environment variables.Also, my javac command is working properly. I've jdk version 1.8.0_74 and Jackrabbit version 2.16.2
Edit: According to this answer, I tried setting my jdk to my installed jres in eclipse but that didn't solve my problem.
Running the latest jackarabit standalone jar(2.17.3) in my machine(windows 10 and java home pointing in java8 jdk) produced the same errors.
I then executed the rar with java -Djava.home="%JAVA_HOME%" -jar jackrabbit-standalone-2.17.3.jar. Although I got the same error in browser I was able to see errors in the console where I invoked the running command.
One of these error was
can't open C:\Progra~1\Java\jdk1.8.0_144\lib\tzmappings.
Searching my java installation I found that the missing files, are located under jre's installation folder.
So I eventually made the standalone jar to work with:
java -Djava.home="%JAVA_HOME%\jre" -jar jackrabbit-standalone-2.17.3.jar
The initial error is a bit misleading as it refers to javac and not to the missing files.
The whole thing seems to be a bug for me. Please give a try to my workaround and if it works for you consider filing a bug in Jackrabbit's issue tracker platform.
jackrabbit-standalone uses JSP. JSP needs compilation. Compilation needs JDK.
Before running java -jar jackrabbit-standalone-2.16.2.jar do you check your JAVA_HOME, and make sure it refers to a fully-fledged JDK? In short, the bin directory should have javac.
I found that there was another variable in the Path environment System variable preceding my %JAVA_HOME%\bin variable.
You don't have to delete the other variable, but move it down (or move %JAVA_HOME\bin up) to correct the load order.

XOpenDisplay(NULL) fails to connect to X

I was given a fairly large program to compile and run with extremely vague instructions on how to properly configure my system and install the program. I was told to use a Windows, install Cygwin, navigate to the program's base directory, and type "make". I installed Cygwin on a 64-bit Windows 7 in C:\cygwin64 as the main user (I also installed all of the default packages, plus a few extras) and then ran the makefile included with the program (this worked with no problems). When trying to run the executable with a required file argument, I was simply given the error message "cannot connect to X server." Upon examination of the code, it appears that this error was caused by a line setting display=XOpenDisplay(NULL) and then exiting when this resulted in display == NULL. Earlier, "display" had been declared as a variable of type Display. Is there any way I can get the program to connect to the X server? I have been assured that the installation of the program is extremely easy, but I'm not so sure... Thanks in advance.

I am trying to open Jmeter by the batch file but it gives me a Windows error

Here is the related error its showing:
java.exe is not a recognized file as an internal or external command,
operable or external command
errorlevel=9009
i was getting the same error on WIndows 8.1(64 bit) and checked java path but it was ok
so i just run my jmeter.bat with Run as Administrator and it worked for me
Many operating systems have an environment variable such as PATH that contains a list of directories (or folders) to be searched when looking for a command to execute. Commands that can be found via the PATH are commonly called external commands. The program that reads the command line or the batch file and invoked the commands may have a number of built in commands, these are commonly called internal commands.
I suggest you examine the PATH (or equivalent) set when your java command executes from the command line and also when execution is attempted from the batch file. Compare the two and make sure the directory containing your java.exe is in the PATH.
Does not work with Java 9 beta:
Running:
C:\java -version
Gives:
java version "9-ea"
Just go into command line and run:
java -jar ApacheJMeter.jar
Set the correct Java Path (installed in your system) in Computer -> Advanced System settings -> Environment Variables -> Ok -> System Variables -> Path
I got the same issue and resolved by following the above steps.
I tried everything, this eventually worked.
Within System Variables:
PATH = "C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_101\bin"
May help someone.
This error occurs due to the path has not been set properly.
Either you can set it in environmental varialables or right click jmeter .bat file,choose edit set the path their,for reference see the jmeter.apache.org user manuals.
For me, my Java path has a space in it and jmeter said it can't find Java
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
.. I looked at the jmeter.sh script and saw it got the path from "Plugin-Ins" .. onward. I tried just commenting out the exit command after that check in the script .. and then I was able to run jmeter.
So apparently the validation logic has a bug, where the error message about can't find java is in fact not true (if Java is indeed set up correctly), so it can be ignored.
For windows 8.1 Users:
Error when trying to run jmeter.bat
Error message:
Not able to find Java executable or version. Please check your Java installation. errorlevel=2
Press any Key to continue
Resolution:
Right Click jmeter.bat and Run as Administrator.
This worked for me, hope this helps. Good luck
Set the correct JM_LAUNCH variable to java.exe
For Windows XP users set Java environment by following the steps here:
http://www.tutorialspoint.com/jmeter/jmeter_environment.htm
Note the path depends on your installed JDK.
And download the file from:
https://svn.apache.org/repos/asf/jmeter/trunk/bin/jmeter.bat
Then replace your jmeter.bat with the downloaded file.
If you have installed Java and still you get this error, please set the java_home path to below using typing below command in terminal:
export JAVA_HOME="/Library/InternetPlugIns/JavaAppletPlugin.plugin/Contents/Home"
Since I run many versions of Java.. I modified jmeter.bat.
rem JM_START - set this to "start" to launch JMeter in a separate window
rem this is used by the jmeterw.cmd script.
rem
rem =====================================================
setlocal
rem Minimal version to run JMeter
set MINIMAL_VERSION=1.8.0
set PATH=%PATH%;C:\Program Files (x86)\IBM\Java80\jre\bin <<< add This line to jmeter.bat
Copied the JAVA executable from Installed version of Java from C:\Program FilesJava\jdk1.8.0_191\bin and pasted in the folder where the jmeter bat resides and it worked for me.
Not exactly the same issue but somebody might find it helpful
Do not double click jmeter.bat but instead ApacheJMeter.jar in the same directory
For me jmeter.bat run but for a brief moment closing almost immediately and not prompting any error. Above workaround allowed me to start working
if JAVA -version shows as blank or empty in the command prompt (CMD) then you need to clear the all java paths in environment variable and again add JAVA_HOME=C:\Program Files\Java\jdk-11.0.15.1
path= C:\Program Files\Java\jdk-11.0.15.1\bin;
if you see C:\Program Files\Common Files\Oracle\Java\javapath; like this remove this
and try in new CMD prompt then Java -version will work.