Results 1 to 5 of 5
Thread: Edit Executable .jar files?
- 11-03-2010, 03:08 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 2
- Rep Power
- 0
Edit Executable .jar files?
So, I have a .jar executable file and I don't have the source code. As far as I know I can rename it with .zip, extract it, and modify the source. But, how do I make it a .jar executable with the modifications? Is it possible without the original source (Isn't all the source in the .jar executable?)
Thanks for your help!
- 11-03-2010, 03:24 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
Generally the source is not included in an executable. (It might be if the author intended that. Such files usually include "src" in their name).
You don't need to rename anything. Any decent archive reader will read the jar file and extract stuff fine.
If you don't have the source you have to decompile the class files. Google is your friend but note: this may be unfriendly towards the author of the software and it very probably *will* be no easy task (decompilers make mistakes, class and variable names are mangled, comments missing etc).
Once you have the changed code you have to build the jar file again. If it doesn't have the build script (like it doesn't have the java source files) this is going to be more fun. There are lots of details on building executable jar files in the Packaging Programs in Jar Files section of Oracle's Tutorial.
-----
Basically if the code is of any complexity and it isn't yours or for any other reason you can't involve the author, my advice would be don't bother. You can post questions about it in forums like this but their nature is pretty obvious to everyone and there will be little positive response.
- 11-03-2010, 03:41 AM #3
Member
- Join Date
- Nov 2010
- Posts
- 2
- Rep Power
- 0
Actually, it was released under GNU Public License so I'm not doing anything illegal. Actually, all I was planning on doing was translating this program into english from german. I also looked and couldn't find any contact info for the author.
[EDIT]
Yeah, I looked through the jar, it's just a bunch of class files and some xml. I hope I can find a good decompiler =)Last edited by jaydubeww; 11-03-2010 at 03:46 AM.
- 11-03-2010, 06:16 AM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
I thought (but haven't read through the license) that availability of the source code was part of the GPL - I would dig around to see what's available on the web in case that lessens the pain of decompiling. I've had a little experience (with my own code!) of decompilers with mixed results.
- 11-03-2010, 09:06 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
Converting installed java files (.jar.#/.jar.$) back to executable java
By merridge642 in forum Java GamingReplies: 1Last Post: 10-03-2010, 06:29 AM -
Packaging all files into a single executable .jar
By ichwar in forum New To JavaReplies: 5Last Post: 01-27-2010, 01:31 AM -
Problem Jar executable files
By Manfizy in forum New To JavaReplies: 6Last Post: 08-13-2009, 01:15 PM -
About Executable JAR files
By paluee in forum New To JavaReplies: 4Last Post: 03-31-2009, 07:03 PM -
executable files
By akinpam in forum Advanced JavaReplies: 10Last Post: 01-06-2009, 04:01 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks