in cmd try typing "javac" if that gives an error and your path variable has something like this "C:\Java\jdk1.7.0\bin;" in it then you should try re-downloading/installing the jdk. And make sure tor remove the old one.
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
Okay, now a seemingly unrelated problem, the JDK refuses to download for me. It fails at 1 second remaining every time. I wanted to install the latest version/reinstall to ensure it was correct but now I can't even seem to download it...Internet connection isn't the problem, any idea what is?
Okay, now a seemingly unrelated problem, the JDK refuses to download for me. It fails at 1 second remaining every time. I wanted to install the latest version/reinstall to ensure it was correct but now I can't even seem to download it...Internet connection isn't the problem, any idea what is?
Things that shouldn't make a difference but worth checking just in case:
and that you are selecting the appropriate one for your system.
depending on what browser you use you might be timing out on the download, so if you can find a timeout variable somewhere in the settings, try increasing that.
Otherwise I'm not sure about that one. Seems like one of those flucky things that you just need to restart your computer to get working.
Rollback Post to RevisionRollBack
"If It Is To Be It Is Up To Me" simple quote and I don't know where it comes from but I enjoy it.
Current Mod: Armerger | Light Drafter
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
Okay, Got the newest JDK reinstalled, and now when I go to run the gradlew command, it says something like "Error, JAVA_HOME is set to an invalid directory: (it gives the location of the JDK), Please set the JAVA_HOME variable in your environment to match the location of you java installation."
EDIT: It seems to be working now...waiting for it to finish the process.
The error clearly shows that the JAVA_HOME isn't set to the JDK. I'm surprised you even had trouble with this. The amount of people coming here to complain when the JAVA_HOME isn't set is unfortunately large, yet I suggest putting it in the first post.
The error clearly shows that the JAVA_HOME isn't set to the JDK. I'm surprised you even had trouble with this. The amount of people coming here to complain when the JAVA_HOME isn't set is unfortunately large, yet I suggest putting it in the first post.
Yes, that much is clear. I just needed to know how to fix that problem because all the things I had tried didn't work. Seems that reinstalling the JDK was the key, but I actually tried that first and the download was failing, which was a different problem I had to solve mostly on my own.
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
I'm just finishing the tutorial on Main Class, but there's still one error I'm getting showing up. It says "Package annotations must be in file package-info.java" next to the first "@Mod(...)" before the public class with the mod name.
EDIT: I'm downgrading, going back to 1.7 as it seems those tutorials are better, and though I've had to start from scratch, it's helped me to do it better I think xD and I've gone so far with almost no errors! Woo!
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
Okay I ran into some problems. I try to run the mod to test out my new item I just added, but I get Fatal Errors when I do so. There are some unresolved errors in the code it seems...
Firstly, in the LogHelper class, in the first part, the "log(...){...}" I get this error:
"The method log(String, Level, String, Object...) in the type FMLLog is not applicable for the arguments (String, Level, String)"
And in most of the rest of it, the all(...), debug(...), error(...), etc., I get errors saying:
"ERROR cannot be resolved or is not a field" or
"FATAL cannot be resolved or is not a field" etc
Code:
package com.gmail.drdoom347.theop.helpers;
import java.util.logging.Level;
import com.gmail.drdoom347.theop.Reference;
import net.minecraftforge.fml.common.FMLLog;
public class LogHelper {
public static void log(Level logLevel, Object object){FMLLog.log(Reference.NAME, logLevel, String.valueOf(object));}
public static void all(Object object) {log(Level.ALL, object);}
public static void debug(Object object){log(Level.DEBUG, object);}
public static void error(Object object){log(Level.ERROR, object);}
public static void fatal(Object object){log(Level.FATAL, object);}
public static void info(Object object){log(Level.INFO, object);}
public static void off(Object object){log(Level.OFF, object);}
public static void trace(Object object){log(Level.TRACE, object);}
public static void warn(Object object){log(Level.WARN, object);}
}
Also, in the .init package, in the ModItems.java class, it says I have an error, yet none show up in the code there...
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
UPDATE:
It Works! I did it, I added an item to minecraft! cx although I can't seem to get the texture to load? The png file is in the items folder/package...yet it shows up as missing texture in game.
It Works! I did it, I added an item to minecraft! cx although I can't seem to get the texture to load? The png file is in the items folder/package...yet it shows up as missing texture in game.
In your LogHelper class, change your Level import to this:
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
EDIT:Found the problem, I'm actually building and running Minecraft 1.8, which needs JSON files to render items apparently. So off to the 1.8 item tutorial to fix my code xD
EDIT2: So, I don't know what I messed up, but now the item doesn't even show in the creative inventory at all...Yes, I called the item renderer in the main class, as well as redoing the bits of code appropriate to the 1.8 basic item tutorial. No errors show and the game loads fine, but, no item....
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI already have the PATH variable set to the location of the JDK and it still isn't working.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIs it still giving the same error as before when you run gradlew?
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYes, saying makestart/build failed and saying that it cannot find a javac compiler
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumin cmd try typing "javac" if that gives an error and your path variable has something like this "C:\Java\jdk1.7.0\bin;" in it then you should try re-downloading/installing the jdk. And make sure tor remove the old one.
Some useful references:
http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571599-1-7-x-modding-with-forge-1-jdk-eclipse-forge-and
https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOkay, now a seemingly unrelated problem, the JDK refuses to download for me. It fails at 1 second remaining every time. I wanted to install the latest version/reinstall to ensure it was correct but now I can't even seem to download it...Internet connection isn't the problem, any idea what is?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThings that shouldn't make a difference but worth checking just in case:
disable pop-up/ad blocker on that site
remove any previous versions from your downloads
make sure it is from this site: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
and that you are selecting the appropriate one for your system.
depending on what browser you use you might be timing out on the download, so if you can find a timeout variable somewhere in the settings, try increasing that.
Otherwise I'm not sure about that one. Seems like one of those flucky things that you just need to restart your computer to get working.
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOkay, Got the newest JDK reinstalled, and now when I go to run the gradlew command, it says something like "Error, JAVA_HOME is set to an invalid directory: (it gives the location of the JDK), Please set the JAVA_HOME variable in your environment to match the location of you java installation."
EDIT: It seems to be working now...waiting for it to finish the process.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSeeing as you haven't come back with more problem's I'm going to assume that one of the references helped. I'm glad it's working now!
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIs there a specific place I should extract the zip file that Downloading Eclipse gives me?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumDoesn't matter where, but when you are in eclipse you will have to set your workspace to where ever your mod files are/where you want them to be.
Current Mod: Armerger | Light Drafter
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThe error clearly shows that the JAVA_HOME isn't set to the JDK. I'm surprised you even had trouble with this. The amount of people coming here to complain when the JAVA_HOME isn't set is unfortunately large, yet I suggest putting it in the first post.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYes, that much is clear. I just needed to know how to fix that problem because all the things I had tried didn't work. Seems that reinstalling the JDK was the key, but I actually tried that first and the download was failing, which was a different problem I had to solve mostly on my own.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI'm just finishing the tutorial on Main Class, but there's still one error I'm getting showing up. It says "Package annotations must be in file package-info.java" next to the first "@Mod(...)" before the public class with the mod name.EDIT: I'm downgrading, going back to 1.7 as it seems those tutorials are better, and though I've had to start from scratch, it's helped me to do it better I think xD and I've gone so far with almost no errors! Woo!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOkay I ran into some problems. I try to run the mod to test out my new item I just added, but I get Fatal Errors when I do so. There are some unresolved errors in the code it seems...
Firstly, in the LogHelper class, in the first part, the "log(...){...}" I get this error:
"The method log(String, Level, String, Object...) in the type FMLLog is not applicable for the arguments (String, Level, String)"
And in most of the rest of it, the all(...), debug(...), error(...), etc., I get errors saying:
"ERROR cannot be resolved or is not a field" or
"FATAL cannot be resolved or is not a field" etc
Code:
package com.gmail.drdoom347.theop.helpers;
import java.util.logging.Level;
import com.gmail.drdoom347.theop.Reference;
import net.minecraftforge.fml.common.FMLLog;
public class LogHelper {
public static void log(Level logLevel, Object object){FMLLog.log(Reference.NAME, logLevel, String.valueOf(object));}
public static void all(Object object) {log(Level.ALL, object);}
public static void debug(Object object){log(Level.DEBUG, object);}
public static void error(Object object){log(Level.ERROR, object);}
public static void fatal(Object object){log(Level.FATAL, object);}
public static void info(Object object){log(Level.INFO, object);}
public static void off(Object object){log(Level.OFF, object);}
public static void trace(Object object){log(Level.TRACE, object);}
public static void warn(Object object){log(Level.WARN, object);}
}
Also, in the .init package, in the ModItems.java class, it says I have an error, yet none show up in the code there...
Code:
package com.gmail.drdoom347.theop.init;
import com.gmail.drdoom347.theop.helpers.RegisterHelper;
import com.gmail.drdoom347.theop.items.ItemTheop;
import net.minecraft.item.Item;
public class TheopItems {
public static Item kryptoniteIngot = new ItemTheop("kryptoniteIngot");
public static void registerItems()
{
RegisterHelper.registerItem(kryptoniteIngot);
}
}
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumUPDATE:
It Works!
I did it, I added an item to minecraft! cx although I can't seem to get the texture to load? The png file is in the items folder/package...yet it shows up as missing texture in game.
In your LogHelper class, change your Level import to this:
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOkay, that resolved the last of the errors, but I still cannot for the life of me get the texture to load in game...
Post your code in pastebin or gist - easier for me, and others.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWhich part(s) of the code do you need to see? The main class, or all of them, or a specific one?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumEDIT:Found the problem, I'm actually building and running Minecraft 1.8, which needs JSON files to render items apparently. So off to the 1.8 item tutorial to fix my code xDEDIT2: So, I don't know what I messed up, but now the item doesn't even show in the creative inventory at all...Yes, I called the item renderer in the main class, as well as redoing the bits of code appropriate to the 1.8 basic item tutorial. No errors show and the game loads fine, but, no item....
RegisterHelper Class:
http://pastebin.com/bpUAvC1G
Main Class:
http://pastebin.com/9QdsC2jj
ItemMod Class:
http://pastebin.com/rhZnz93E
ModItems Class:
http://pastebin.com/cQ4x2R2k