Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[SOLVED][1.7.2][IntelliJ Idea 13.1.3] JDK files not reading correctly


Vtec234
 Share

Recommended Posts

Hello!

Originally, I posted this issue on Minalien's blog, but I was told to repost here, so here I am.

 

I ALREADY SOLVED THIS ONE, BUT REPORTING IT ANYWAY, BECAUSE IT'S CONNECTED TO THE SECOND PROBLEM

This issue is all about using the IntelliJ Idea IDE, because everything I am trying in order to get it work runs just fine on Eclipse.

Using the new Gradle system, I input two commands. First "gradlew.bat setupDecompWorkspace". Gradle says "BUILD SUCCESSFUL". Then "gradlew.bat idea". This is succesfull as well. After the set up, I can normally open the project in IntelliJ, and nearly everything compiles. However, the console also outputs a ton of errors, and the “ExampleMod” is not compiled (Minecraft only shows 3 mods – FML, Forge, and MCP). I also tried only setting up the DecompWorkspace, then opening build.gradle in Idea, and then running “gradlew.bat genIntellijRuns” for the run configurations. Same thing – Minecraft compiles, Mod doesn’t, I get a ton of errors. Another thing I did was running a local Gradle, instead of the wrapper – errors again. Therefore I think something might be wrong with my Idea IDE, because, as forementioned, Eclipse works OK. Specifically, it fails to read some .jar files. I am using IntelliJ Idea Community Edition 13.1.3. I tried running on x86 and x64 – same on both. Here is the console log:

https://gist.github.com/anonymous/244f3f1f410843091741

 

I WASN'T ABLE TO SOLVE THIS ONE

So, I managed to fix nearly all the errors. Previously there were 20 of those, now there’s just one. I used JDK 7 instead of JDK 8, and nearly all files loaded – except rt.jar, which still outputs some nasty exceptions. This is really odd, because in Eclipse JDK 8 worked just fine, and what fails here is the Forge file loading mechanism. It seems that IntelliJ messes it up in some way. I finally got all 4 mods (including ExampleMod) to load. Still, one file is not loading correctly. Here is the console log:

https://gist.github.com/anonymous/6a0b447f904efe892ca9

 

This does not seem to break anything for now, but it worries me that it might in the future, so I’m still asking for insight on what I could do to fix the loading of rt.jar. To remind, a lot of files (including this one) failed to load in JDK 8, and in JDK 7 only this one fails. Any ideas?

 

BTW, sorry for not formatting this post at all, but the formatting buttons are not working for some reason.

Link to comment
Share on other sites

Ok, so your first issue is that Forge uses the ASM library to inspect (almost) all classes that are loaded to e.g. find the @Mod annotation. The version of ASM that is currently being used doesn't support Java 8 yet, and thus all the inspections fail.

 

The 2nd issue is caused by Intellij putting the Java Standard Library jars onto the classpath explicitly, instead of letting the JRE handle it automatically, like everyone else does.

That causes Forge (or rather FML actually) to try and look through all those classes, trying to find @Mod classes (see above). For some reason the rt.jar file fails to be read by the default zip reader, but there is nothing to worry about here.

Link to comment
Share on other sites

Ok, so what I understood is that rt.jar is not actually needed for any Forge operations, and it's simply inspected by FML to check if it is a mod, but FML fails to read the archive. Therefore nothing bad is happening, just a random error. Am I correct on this, or is rt.jar needed for some stuff in Forge?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.