Link to home
Start Free TrialLog in
Avatar of valleytech
valleytechFlag for United States of America

asked on

integration

hi,
I have several small programs work perfectly. Now i want to integrate them by using NetBean. I jus wonder where i place  import java.io.*;
    import java.util.*;
      import java.lang.String.*;


import java.lang.reflect.Method;
import java.util.prefs.Preferences;

Thanks a lot for your patience.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of valleytech

ASKER

tks Objects.

one more :)

just wonder how i can pop up a windows to ask user to select Yes or No. Also obtain that value as the condition for my code. Thanks.
when i compile my java program in command line, I can type  the option -Xlint such as javac example.java -Xlint. However, when I put that working code to my project ( using Netbean), I have failed build. Please help me on this.

Note: E:\Java_t\InstallGUI\Installation\src\osDetect.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Compiling 1 source file to E:\Java_t\InstallGUI\Installation\build\classes
E:\Java_t\InstallGUI\Installation\src\osDetect.java:273: unreported exception java.io.IOException; must be caught or declared to be thrown
        listDirContents1();
Note: E:\Java_t\InstallGUI\Installation\src\osDetect.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
BUILD FAILED (total time: 0 seconds)
try
{
        listDirContents1();
}
catch (IOException ex)
{
   ex.printStackTrace();
}

it works. could you please explain the reasons behind it? why do i have trouble in netbean, not in command line? Thanks a lot.
if a method is declared to throw an exception, you need to either catch and handle the exception, or declare that the method making the call may throw the exception.
I suggested the former above.

one more thing, i just start using ECLIPSE. It doesn't have GUI click drag, Netbean has that feature. However, people say Eclipse better than Netbean. Why? how? Tks.
PS: i used to use texpad -> painful.