Skip to main content

Timeline for No changes after I edit a jar file

Current License: CC BY-SA 3.0

23 events
when toggle format what by license comment
Jun 27, 2017 at 20:20 comment added Evan I went into 7zip, took the folder for all the java files, and copied it to somewhere else, but it won't let me import that as a netbeans project- it just tries importing the folder that i pasted it into.
Jun 27, 2017 at 20:13 comment added MMAdams The file that you edited in Notepad in the first place. That one and any others that it needs to be compiled without errors.
Jun 27, 2017 at 20:06 comment added Evan So I need to put in the files of the jar rather than the jar itself? Where can I find the files? When I look for them all I find are the jars, and nothing happens when I try opening them
Jun 27, 2017 at 20:00 comment added MMAdams it sounds like your project's not set up right. Try creating a new project, copying into it all the java files from the jar. Then make your change to Templates.java and then export a new jar.
Jun 27, 2017 at 19:56 comment added Evan How exactly do I export as a jar? Usually i follow the steps here but it doesn't seem to be working for this project, and the "export" dropdown box under file only lets me export to zip, which doesn't seem to make a jar.
Jun 27, 2017 at 19:46 comment added MMAdams the class file should update automatically when you export your project as a jar.
Jun 27, 2017 at 19:40 comment added Evan Hey I think I might know what the problem is. Before I imported the jar into netbeans I edited the java file I wanted to edit using 7zip, which had me edit it in notepad. I know you said that that doesn't update the class file, but does that still hold true if I import the jar into a new project? If so, how can I edit it so that the class file updates?
Jun 23, 2017 at 20:08 comment added Evan Damn that sucks. Thanks for your help anyway, I really appreciate the effort. Hopefully I'll find a way to get it fixed.
Jun 23, 2017 at 20:07 comment added MMAdams Honestly, that is exactly what I thought would fix the problem. Maybe something else is wrong? Without more information I'm afraid I can help you no further, perhaps try reaching out to the person you got the original code from and see if they have had similar issues. Good luck and have a nice weekend.
Jun 23, 2017 at 20:04 comment added Evan Okay, I imported the jar into netbeans into a new project, edited the java file I wanted to edit, cleaned and built the project, made it into a jar, then replaced the old jar on my previous project with the one I just made, but my project has no difference in execution. What did I do wrong?
Jun 23, 2017 at 19:39 comment added MMAdams I'm sorry I don't know netbeans, maybe you should try looking for how to import a new netbeans project from a jar with source code in it.
Jun 23, 2017 at 19:37 comment added Evan I did that and got a message saying "No netbeans projects added". I went to my netbeans folder and saw a new folder named "META-INF" that had a 1 KB file named MANIFEST.MF inside it
Jun 23, 2017 at 19:20 comment added MMAdams there should be a way to import an entire jar into netbeans if it contains the source files, which yours does. Import it as a project, edit your one file, and export it as a jar again.
Jun 23, 2017 at 19:12 comment added Evan There's a lot of java files in the jar though, like literally 100 at least. Is there a way I can copy them all at once or do I have to individually create a java file for each and then pack them all into a jar?
Jun 23, 2017 at 18:42 comment added MMAdams Notepad doesn't make a new .class file for you. That's why I was saying the best thing to do is copy all the java files into netbeans and create a new .jar so new class files are created.
Jun 23, 2017 at 18:41 comment added Evan When I used 7zip I was able to go into the jar file and found a notepad of the Templates.java file. Is it a problem that it was done in notepad?
Jun 23, 2017 at 18:31 comment added MMAdams Where did you edit your Templates.java file? If you did it in anything other than notepad or some kind of text editor, it should have made you a .class file when it compiled it. I don't know netbeans and I'm sorry I can't be more helpful other than to tell you to just look for it.
Jun 23, 2017 at 17:42 comment added Evan I found the class folder but it only has .class files for the java file itself rather than any .class files for my jars. Am I looking in the wrong place or did I do something wrong? I'm using netbeans by the way
Jun 23, 2017 at 17:31 history edited MMAdams CC BY-SA 3.0
added 402 characters in body
Jun 23, 2017 at 17:06 comment added Evan Where would I find the Templates.class file?
Jun 23, 2017 at 16:47 history edited MMAdams CC BY-SA 3.0
added 451 characters in body
Jun 23, 2017 at 16:22 comment added Evan I didn't make the jar myself unfortunately, I got it from somewhere else so I don't have the code used to make it, just the jar itself. What should I do?
Jun 23, 2017 at 16:03 history answered MMAdams CC BY-SA 3.0