Need help converting Java file to Class.

Im not a code wizard or anything but i like to dive into minecraft mod packs are change values for better gamplay. I was trying to edit this mod and noticed that the file i was tring to edit was a CLASS file and not a Java one, so i used an online converter to change the Class into a java but now im wondering how to make the Java into the Class again. PLEASE, I NEED HELP!!!
10 Replies
JavaBot
JavaBot4w ago
This post has been reserved for your question.
Hey @LeoMisfit! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
LeoMisfit
LeoMisfitOP4w ago
this is the file i am trying to convert.
netty
netty4w ago
Not possible without the main class basically or pom General compiling is done by using javac FILENAME.java And normally if you are messing with modpacks, you do not modify the source code at all
LeoMisfit
LeoMisfitOP4w ago
dang, so the way how i would fix it is to place the file that i editied back into the mod pack, zip it, convert it into a ,jar file THAN javac it?
netty
netty4w ago
a .jar is already the compiled version of your projects structure you just do javac ResourceCosts.java but this will not work as your class does not have a main attribute You would likely take the whole source code of the modpack containing the main class and recompile it after editing the class file you would like to change
LeoMisfit
LeoMisfitOP4w ago
i think i know what you mean, ill try to do it rn
LeoMisfit
LeoMisfitOP4w ago
if i had to ask, where would i find the source code?
No description
netty
netty4w ago
I do not know brother because I do not know what modpack you are using
LeoMisfit
LeoMisfitOP4w ago
oh ok, imma fiddle around with this a little more than.
JavaBot
JavaBot4w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server