Jump to content

How about if I use JDK 1.7?


imadnsn

Recommended Posts

I'm not asking whether I can use Java 7 (JDK 1.7) when compiling my mod, I actually want to know about how much the forge modding community is using Java 7, and whether mods actually compile using Java 7, because I prefer to use it but I don't want to keep telling people to download JRE 7 in order to use my mod. Will this thing make me encounter this problem frequently?

Link to comment
Share on other sites

EDIT: If you read what I had said here, forget it. I was thinking of the compiler, not JVM. The below statement should still be true, though.

 

It shouldn't matter which JRE the end user has installed. So long as you're only using functions that exist among all Java versions, any JRE that can run Minecraft will also run your mod just fine. Your project given to you by gradle should be set to compile in 1.6 compatibility regardless of which JDK you're using, and all JVMs are backwards compatible when running code. So 1.7 code -> compiled in 1.6 compatiblity -> runs on 1.6+.

 

Java 9 might change this, but it's still 2 years away and hopefully Mojang/Forge will both have updated to 1.8 (the only other version the 1.9 JVM will be compatible with) by then.

Or we can just have multiple JREs installed, which there really isn't any harm in aside from the usual "older versions are always less secure" crap.

Link to comment
Share on other sites

My mod is compiled with Java 7 and I didn't told the community that and no one have a problem with it. But I have no idea how many people have downloaded it, because the 1.7 version is only as a Development build avaible and the only version were I know how often it was/is downloaded. But I think using Java 7 would be no problem, because I have really no idea who's still using Java 6.

Developer of Primeval Forest.

Link to comment
Share on other sites

My mod is compiled with Java 7 and I didn't told the community that and no one have a problem with it. But I have no idea how many people have downloaded it, because the 1.7 version is only as a Development build avaible and the only version were I know how often it was/is downloaded. But I think using Java 7 would be no problem, because I have really no idea who's still using Java 6.

targetCompatibility = '1.6' is the normal setting of build.gradle, and so it isn't shown. That makes the compiler generate code that is java 1.6 compatible in any JDK.  If you change it to 1.7, then nobody without 1.7 or higher will be able to use your mod.

BTW, I've already had to deal with mods that secretly require Forge 1205 or some other non-recommended version of it. I find this kind of thinking reprehensible if it isn't spelled out clearly in the mod page with bold letters.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.