Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename jar package name

I have a jar file but unfortunately I lost source code due to my disk crash. I just want to change its package name to some meaningful name.

Is there any way that I can change package name of jar file and of course I need to update this package name in class files.

I know about Java Decompiler but I just want to change its package name.

like image 450
AZ_ Avatar asked Dec 17 '22 08:12

AZ_


1 Answers

jarjar might be able to do this.

It's designed to build a single big jar containing an application and its supporting libraries. It supports moving the libraries into different packages to avoid naming conflicts (for example you could use two different versions of the same library with different package name prefixes).

It can probably be configured to do what you want.

like image 151
Joachim Sauer Avatar answered Jan 02 '23 00:01

Joachim Sauer