Taken from the NFM wiki
Also known as Java Hacking or Java Editing, this kind of NFM1/2 hacking is difficult in a way because it solely depends on what the editor is doing. Need For Madness is ran by several CLASS files, containing scripts and text for ALL of the features used. These CLASS files need to be decompiled to a JAVA file before editing.
hacking tracks
The tracks are stored in text files, which can be opened with any plain text editor. Formatted programs like MSWord are NOT recommended.
For detailed instructions, see Hacking Tracks.
hacking cars
The cars are defined by .rad files that contain text, but that codes for their color and shape. These files can be found by renaming /graphics/models.zipo to ...".zip" and then extracting them. To be read by the game, however, they must then be repacked into that zip folder, which in turn must be renamed back to a .zipo.
For detail on actual editing, see Hacking Cars.
hacking music
All of the music is stored in zipo files in the "music" folder. Extract them the way you would any other .zipo. Each song is in a separate zipo. It is generally inadvisable to try to edit the music; swapping pieces will cause tempo distortions, as the game sets what speed to play each music at. More, since the music is in .mod form - a sort of hybrid between MIDI and digital audio like mp3 and wav - it is very difficult to edit. The file consists of arrays "patterns", which in turn are a series of orders to play audio samples at a given pitch. As many of the samples are themselves unmelodic or multiple pitches simultaneously, going between .mod and any third-party music is a nightmarish amount of work.
hacking scripts
This is the most powerful but also most difficult kind of hacking. It requires decompiling mad.jar and editing some of the Java code itself. This requires a special editor like NetBeans and a skilled, knowledgeable user. Do not attempt unless you know what you are doing.
Done right, this can be used to change car names, statistics, add cars and tracks, change game behavior, and alter various items. However, it cannot change "fundamental" traits. For example, you cannot turn Need For Madness into a multiplayer by editing mad.jar.