Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java source code minifier? [closed]

Tags:

java

minify

Is there a tool out there for minifying java source code?

I am aware there is not much practical need for such a tool, but I am interested to reduce some students' code to 'bare bones' to show how their variable names are interpreted (sort-of -- it will heopfully re-enforce that their choice of variable names are disregarded) by the compiler. (The next step in this pedagogical process might be to show them the compiled code).

Thanks.

like image 438
jedierikb Avatar asked Nov 29 '12 21:11

jedierikb


People also ask

Why are files minified?

Minification is the process of minimizing code and markup in your web pages and script files. It's one of the main methods used to reduce load times and bandwidth usage on websites. Minification dramatically improves site speed and accessibility, directly translating into a better user experience.

What does minify means?

(ˈmɪnɪˌfaɪ ) verbWord forms: -fies, -fying or -fied. (transitive) rare. to minimize or lessen the size or importance of (something)

How to minify the Js file?

To minify JavaScript, try UglifyJS. The Closure Compiler is also very effective. You can create a build process that uses these tools to minify and rename the development files and save them to a production directory.

How does minify work?

How Minification Works. Minification works by analyzing and rewriting the text-based parts of a website to reduce its overall file size. Minification extends to scripts, style sheets, and other components that the web browser uses to render the site. Minification is performed on the web server before a response is sent ...


1 Answers

In the java world we mostly speak, due to the purpose, of obfuscation (even if in my opinion the impact on application file size can be useful, I used it a lot on Android applications a few years ago).

The best java obfuscator is probably Progard. Like all of them, it can reduce all (non exported) class and/or variable names to just a letter, which is part of the obfuscation as well as part of a minification.

You will have to decompile the bytecode afterwards if you want to show some java.

like image 199
Denys Séguret Avatar answered Oct 06 '22 13:10

Denys Séguret