How to integrate ProGuard in Jar Project using maven shade plugin

I have a project use maven shade plugin to package file. Now, I found proguard can obfuscate code. But proguard package .class file to a new jar file.
I need integrate ProGuard and maven shade plugin.
Can you give me some tips or help me do this?
My environment:
1. web project (use maven fronted plugin to package .js and css file).
2. use maven shade plugin package file to jar.
3. jar file use guice and jesery construct web server.

How can I let a user input their info?

Is it possible to let a user input their first, middle initial, and last name in one method and then return all the fields?

    import java.util.Scanner;

    public class name {
        // firstName middleInitial and lastName
        // toUpperCase for names

    String firstName, midddleInitial, lastName;

    public name(String firstName, String middleInitial, String lastName) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Enter First Name:");
        String firstName = scanner.nextLine();

        System.out.println("Enter Middle Initial:");


        System.out.println("Enter Last Name:");

        return firstName;
        return middleInital;
        return lastName;
    }
} // end of name class

How to avoid memory leaks when using arraylist with for each on android?

private ArrayList<OutputInputPair> pairs = new ArrayList<OutputInputPair>();
public void process() {
    while (!stopped) {
        for (OutputInputPair pair : pairs) {
            processCommandPairs(pair);
        }
    }
}

first when user click stop button, stopped = true so, if user not click button,
always execute processCommandPairs method.

when stop button click

@Override
public void stop() {
    Log.d(TAG, "STOP memory leak");
    pairs.clear();
    pairs = null;
    stopped = true;
}

I have only 1 question, if user does not not click button, occur memory leak in array list is right?

if not, how to avoid memory leak on arraylist?

thanks.
enter image description here

Is it possible to exclude all the bugs reported by findbugs using Regex?

I am completely new to Maven. I am trying to exclude all the bugs reported by the findbugs plugin from all the classes in a project by a regex in findbugs filter file which matches everything such as ~.* as shown in the below code, but it isn’t working. Is this possible at first place? if so how? Thanks in advance!

<FindBugsFilter>
    <Class name="~.*"/>
    <Bug pattern="~.*"/>
</FindBugsFilter>

Code for setIconImage() won’t work

I am new to Java and NetBeans. However, I have done some C/C++ before.

I wanted to change the icon of my application. So, I had a look on the internet and I found this: Changing the icon of my java application. But when I put in the code (e.g., into the constructor of my JFrame) I always get an error saying “Cannot find symbol: Class Image”. Even when I add “import Image” in the beginning of the file.

What’s wrong here?

rectangle collision detections processing

i would like to be able to create small linees (that look like bugs) to bounce off rectangle i have created in a for loop that creates random rectangles on screen.

the logic i have isnt quit right yet
r[] is an array of rectangles that i have randomly created and position is the line(bug) that is moving across the screen

for(int i = 0 ; i < r.length ; i++)
{
 if (position.x >r[i].x && position.y > r[i].y && position.y < r[i].x+r[i].w 
 && position.y < r[i].y+r[i].h  ) 
   {
     velocity.x *= -1;
   }
   else if (position.y > r[i].y && position.x > r[i].x && position.x < r[i].y +r[i].h && 
   position.x < r[i].x+r[i].w) 
   {
     velocity.y *= -1;
   }
    if (position.x <r[i].x && position.y < r[i].y && position.y > r[i].x+r[i].w 
 && position.y > r[i].y+r[i].h  ) 
   {
     velocity.x *= -1;
   }
   else if (position.y < r[i].y && position.x < r[i].x && position.x > r[i].y +r[i].h && 
   position.x > r[i].x+r[i].w) 
   {
     velocity.y *= -1;
   }
}