Java Illegal Argument: n must be positive     Please help

hi guys. I have a program that creates random word squares that are true; meaning, it spells a word that exists in a text file of words in each column and row. I am getting a really annoying exception though.
sometimes i get
Error: java.lang.IllegalArgumentException: n must be positiveand someteimes i get
Error: java.lang.ArrayIndexOutOfBoundsException: 2where the number 2 is always the size of the square (strLength)
here is my code.
import java.io.*;
import java.util.*;
import javax.swing.*;
import java.lang.*;
class WordSquare
     public static void main(String[] args)
          String textFile,input,line,sWord="",goWord="";;
          int strLength,decision,testAvail=-1;
          textFile = "newwords.txt";
          input = JOptionPane.showInputDialog("How many characters would you like each word to be?");
          strLength = Integer.parseInt(input);
          input = JOptionPane.showInputDialog("Would you like to have a specific starting word?\n1. Yes\n2. No");
          decision = Integer.parseInt(input);
          try
               BufferedReader inputFile = new BufferedReader(new FileReader(textFile));
               ArrayList data = new ArrayList();
               line=inputFile.readLine();
               char[][] sq = new char[strLength][strLength];     
               while(line != null)
                    if(line.length()==strLength)
                         data.add(line);
                    line=inputFile.readLine();
               System.out.println("List contains " + data.size() + " " + strLength + "-letter words.");
               if(decision == 1)
                    sWord = JOptionPane.showInputDialog("Enter your desired " + strLength +"-letter word.");
                    String testPref = Character.toString(sWord.charAt(0));
                    testAvail = bSearchPref(data, testPref);
                    if(testAvail==-1)
                         System.out.println("Word square with provided word is not possible!");
               boolean completeSquare = false;
               while(completeSquare==false)
                    for(int m=0; m<strLength; m++)
                         for(int n=0; n<strLength; n++)
                              sq[m][n] = '*';
                    if(decision == 1)
                         if(testAvail==-1)
                              int rNumber = getRandom(0,data.size()-1);
                              goWord = (String)data.get(rNumber);
                              for(int k=0;k<strLength;k++)
                                   sq[0][k] = goWord.charAt(k);
                         else
                              for(int j=0;j<strLength;j++)
                                   sq[0][j] = sWord.charAt(j);
                    else
                         int rNumber = getRandom(0,data.size()-1);
                         goWord = (String)data.get(rNumber);
                         for(int q=0;q<strLength;q++)
                              sq[0][q] = goWord.charAt(q);
                    String prefix = Character.toString(sq[0][0]);
                    int prefIndex,first,last,randIndex;
                    prefIndex=bSearchPref(data,prefix);
                    first = getFirst(data,prefix,prefIndex);
                    last = getLast(data,prefix,prefIndex);
                    randIndex = getRandom(first,last);
                    goWord = (String)data.get(randIndex);
                    for(int z=0; z<strLength; z++)
                         sq[z][0] = goWord.charAt(z);
                    for(int a=1; a<strLength; a++)
                         int b=0;
                         prefix="";
                         while(sq[a]!='*' && b<strLength)
                              prefix += Character.toString(sq[a][b]);
                              b++;
                         prefIndex=bSearchPref(data,prefix);
                         if(prefIndex==-1)
                              a = strLength;
                         else
                              first = getFirst(data,prefix,prefIndex);
                              last = getLast(data,prefix,prefIndex);
                              randIndex = getRandom(first,last);
                              goWord = (String)data.get(randIndex);
                              for(int x=0; x<strLength; x++)
                                   sq[a][x] = goWord.charAt(x);
                              b=0;
                              prefix="";
                              while(sq[b][a]!='*' && b<strLength)
                                   prefix += Character.toString(sq[b][a]);
                                   b++;
                              prefIndex=bSearchPref(data,prefix);
                              if(prefIndex==-1)
                                   a = strLength;
                              else
                                   first = getFirst(data,prefix,prefIndex);
                                   last = getLast(data,prefix,prefIndex);
                                   randIndex = getRandom(first,last);
                                   goWord = (String)data.get(randIndex);
                                   for(int y=0; y<strLength; y++)
                                        sq[y][a] = goWord.charAt(y);
                    String testSquare="";
                    for(int h=0;h<strLength;h++)
                         testSquare += Character.toString(sq[h][strLength-1]);
                    int squareResult = bSearchFull(data, testSquare);
                    if(squareResult!=-1)
                         completeSquare=true;
               if(completeSquare==true)
                    System.out.println("Found a complete Square!");
                    displaySquare(sq);
          catch (Exception e)
               System.out.println("Error: " + e);
          System.exit(0);
     public static void displaySquare(char[][] square)
          for(int i=0; i<square.length; i++)
               for(int j=0; j<square.length; j++)
                    System.out.print(square[i][j]);
               System.out.println();
     public static int getRandom(int start, int end)//generates random int between 2 numbers
          Random rNum = new Random();
          int num = rNum.nextInt(end-start + 1) + start;
          return num;
     public static int bSearchPref(ArrayList list, String pref)
          int result = -1;
          int low = 0;
          int high = list.size()-1;
          String s="";
          while(low <= high && result==-1)
               int mid = (low + high)/2;
               s = (String)list.get(mid);
               if(s.startsWith(pref)==true)
                    result = mid;
               else if(pref.compareTo(list.get(mid))<0)
                    high = mid - 1;
               else
                    low = mid + 1;
          return result;
     public static int bSearchFull(ArrayList list, String word)
          int result = -1;
          int low = 0;
          int high = list.size()-1;
          while(low <= high && result==-1)
               int mid = (low + high)/2;
               if(word.compareTo(list.get(mid))==0)
                    result = mid;
               else if(word.compareTo(list.get(mid))<0)
                    high = mid - 1;
               else
                    low = mid + 1;
          return result;
     public static int getFirst(ArrayList list, String pref, int curr)
          int first=curr;
          boolean goodpref = true;
          while(goodpref==true && curr>=0)
               String s = (String)list.get(curr);
               if(s.startsWith(pref)==false)
                    goodpref=false;
                    curr++;
               else
                    curr--;
          if(curr<0)
               first=0;
          else
               first = curr;
          return first;
     public static int getLast(ArrayList list, String pref, int curr)
          int last=curr;
          boolean goodpref = true;
          while(goodpref==true)
               String s = (String)list.get(curr);
               if(s.startsWith(pref)==false)
                    goodpref=false;
                    curr--;
               else
                    curr++;
          if(curr<list.size())
               last = curr-1;
          else
               last = curr;
          return last;

It would help if you'd indicate exactly where these errors are ocurring. However...
sometimes i get
Error: java.lang.IllegalArgumentException: n must be
positive
So, whatever method you're calling there, you're passing a parameter that's zero or negative, when it must be positive.
and someteimes i get
Error: java.lang.ArrayIndexOutOfBoundsException: 2where the number 2 is always the size of the square
(strLength)It means you're trying to access an element at index 2 of an array that has at most two elements.
int[] arr = new int[2];
arr[0] = 0;
arr[1] = 1;
arr[2] =2 ; // OUT OF BOUNDS

Similar Messages

  • I am using Mandriva Linux now and I have installed Firefox 6 but I could not install Java plugin with it. Can anyone please help me how to install it?

    I am using Mandriva Linux now.
    But I am using Firefox 3.6.8, but I cannot install java plugin in it.
    Can anyone please help me how to install it?

    The plugins folder in the Firefox installation folder doesn't exist by default. There is no default plugin in Firefox 4, so that folder would be empty and in thus not included. If you want to use that location then you need to create a plugins folder.
    Did you try /usr/lib/mozilla/plugins ?

  • After Installing the OS x Mountain Lion some o the softwares are asking for Java SE 6 Runtime. Can someone please help me find a solution.

    After Installing the OS x Mountain Lion some o the softwares are asking for Java SE 6 Runtime. Can someone please help me find a solution.

    By default, ML no longer comes with the Java runtime preinstalled. I believe the route to enabling Java if you are going to need it is to run the Java Preferences app found in Utilities. It will inform you of Java's absence and offer to install the latest version and activate it. On subsequent runs, the Preferences app will allow you to fine tune how the runtime operates.
    Note that the new default operation is for the applet plugin to be disabled. You need to enable it as needed and it self-deactivates if unused in awhile. Also important to note that Java comes in both 32 and 64 bit versions and you can set the preferred order. Default is 64-bit but I've had issues with some applets failing to run and have had to switch the order.

  • Java and MS SQL Server 2000 problem, please help

    please help me. I am using java and MS SQL Server 2000, and I'm trying to access and verify the login. I'm getting the following error message: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
    Can any please help in this regard.
    String userNumber = (String)userNumField.getValue();
    char[] userPasswordArray = userPasswordField.getPassword();
    String userPassword = new String(userPasswordArray);
         try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Dikolobe_Data");
                java.sql.PreparedStatement statement = connection.prepareStatement(
                        "SELECT USER_NUMBER, USER_PASSWORD, USER_CLASS, USER_STATUS " +
                        "FROM SYS_USER " +
                        "WHERE (USER_NUMBER = ? AND USER_PASSWORD = ?);");
                statement.setString(1, userNumber);
                statement.setString(2, userPassword);
                java.sql.ResultSet result = statement.executeQuery();
                if(result.next()) {
                    String userStatus = result.getString(4);
                    if(userStatus.equals("logged on")) {
                        String loginErrorMessage = "User with number: " + userNumber + " is already logged on.";
                        javax.swing.JOptionPane loginErrorPane = getNarrowOptionPane(72);
                        loginErrorPane.setMessage(loginErrorMessage);
                        loginErrorPane.setMessageType(javax.swing.JOptionPane.ERROR_MESSAGE);
                        javax.swing.JDialog loginErrorDialog = loginErrorPane.createDialog(null, "Login Error");
                        loginErrorDialog.setVisible(true);
                    else {
                        String userClassification = result.getString(3);
                        if(userClassification.equals("Administrator")) {
                            AdminHomePage newAdminHomePage = new AdminHomePage();
                            newAdminHomePage.setVisible(true);
                        else if(userClassification.equals("Educator")) {
                            EduHomePage newEduHomePage = new EduHomePage();
                            newEduHomePage.setVisible(true);
                        statement = connection.prepareStatement(
                                "UPDATE SYS_USER SET USER_STATUS = ? " +
                                "WHERE USER_NUMBER = ?");
                        statement.setString(1, "logged on");
                        statement.setString(2, userNumber);
                        statement.executeUpdate();
                        dispose();
                }

    Doesn't the following link give you enough information?
    http://www.google.com/search?q=invalid+descriptor+index
    Anyway .. This error means that the given ResultSet column index which you're trying to retrieve the value from is out of the range.

  • How to use chinese big5 fonts in Linux with Java 2 1.4.0.01? Please help me

    Hello
    I just trying to run a java program in Mandrake Linux 8.2. Everythings work well except the fonts. I did read this page
    http://java.sun.com/j2se/1.3/docs/guide/intl/fontprop.html
    but the problem still there.
    Because I don't know how to modify the fonts.properties file. Java seem not support a world language version in Linux. (Although it support in Windows.)
    Then I tired to use the windows file, fonts.properties.xh_TW, to replace the fonts.properties in j2sdk in Linux. But it doesn't work.
    Please help me by either show me how to modify the fonts.properties file or direct me where to download a Big5 fonts in Linux version. Thanks a lot!!!

    Sorry I have been out of for a long time.
    If you already follow all the step of Locale help online,
    may be your font.dir in your /usr/lib/X11/fonts/TrueType/fonts.dir is not as
    the alias it was expected.
    take a look of that file.
    In xtt for chinese, there may be short cut like vl=y as such, because java
    render the font directly getting info from the fonts.dir so if the font filename
    is not as expected, you will not able to load the fonts. What you need to do is
    ln -s realfont vl=y:realfont
    to link the font to the make java think the name of the font is actually vl=y:realfont.
    Let me know you get it.
    [email protected]

  • How to merge two java files with InputDialog to select?Please help me!?

    //Addition Java application
    import javax.swing.JOptionPane; // import the class
    public class Addition {
    // main method
    public static void main(String[] args)
    String firstNumber, secondNumber;
    int number1, number2, sum;
    // read the first number
    firstNumber = JOptionPane.showInputDialog("Please enter a integer: ");
    // read the second number
    secondNumber = JOptionPane.showInputDialog("Please enter another integer: ");
    // data type conversion
    number1 = Integer.parseInt(firstNumber);
    number2 = Integer.parseInt(secondNumber);
    sum = number1 + number2;
    // display the result
    JOptionPane.showMessageDialog(null, "The sum is " + sum + ".", "Results", JOptionPane.PLAIN_MESSAGE);
    System.exit(0);
    //Multiplication Java Application
    import javax.swing.JOptionPane;
    public class Multiplication5
    public static void main(String args[])
    int number1, number2, number3, number4, number5, product;
    String firstNumber, secondNumber, thirdNumber, forthNumber, fifthNumber ;
    firstNumber =
    JOptionPane.showInputDialog("Please input an integer");
    secondNumber =
    JOptionPane.showInputDialog("Please input another integer");
    thirdNumber =
    JOptionPane.showInputDialog("Please input the third integer");
    forthNumber =
    JOptionPane.showInputDialog("Please input the forth integer");
    fifthNumber =
    JOptionPane.showInputDialog("Please input the fifth integer");
    number1 = Integer.parseInt(firstNumber);
    number2 = Integer.parseInt(secondNumber);
    number3 = Integer.parseInt(thirdNumber);
    number4 = Integer.parseInt(forthNumber);
    number5 = Integer.parseInt(fifthNumber);
    product = number1 * number2 * number3 * number4 * number5;
    JOptionPane.showMessageDialog(null, "The product is " + product, "Results", JOptionPane.PLAIN_MESSAGE);
    System.exit(0);
    I seek for help to merge above two java application files.
    I need to call JoptionPane.showInputDialog to prompt the user to input the operation, 1 for addition, 2 for multiplication. In this dialog, the user is expected to enter the integer of 1 or 2 for the calculation.
    Please help me ! Thank you!

    Hi CRay,
    You just need to call the main methods of the 2 classes according to "1" or "2" entered.
    It is better if the "multiplication" and "addition" are declared as methods rather than in main methods.
    Example:-
    public static void Addition()
    Then call
    Addition.addition();
    than
    Addition.main(new String[]{});
    as shown below.
    import javax.swing.JOptionPane; // import the class
    public class Test{
        public static void main(String[] args){
            // read which  operation to perform
            String operation = JOptionPane.showInputDialog("Please enter which operation : ");
            if(operation.equals("1")){
                Addition.main(new String[]{});
            else{
                Multiplication5.main(new String[]{});
    }Rose

  • "java.sql.SQLException: Ref cursor is invalid" - Please help

    Hi everyone,
    I'm really having problem. I'm surrently calling a PL/SQL stored procedure from Java but I'm getting the following error:
    java.sql.SQLException: Ref cursor is invalid
    The procedure has 2 normal IN parameters and 1 ref cursor OUT parameter. Depending upon Parameter 1 a ref cursor may or may not be initialised.
    If Parameter 1 is "yes" then a ref cursor is called to retrieve some data and passed into the OUT. If Parameter 1 is set to "no" then the ref cursor is not initialised. It is here where the error is being hrown. Does anyone know why? Microsoft ADO doesn't seem to complain. Please help is needed. Thanks in advance.
    John

    Hi Justin,
    Thanks for replying. The Java code is a bit awkward to send because we're using several "home-made" wrapper objects to call SQL and stored procedures. In both cases I create a resultset object and only this one object is used irrespective if the first parameter is "yes" or "no", but a ref cursor is passed to the OUT parameter only on condition yes. Hence, the PL/SQL code takes the form similar to:
    OPEN curs FOR SELECT * FROM table;
    The "curs" is then put into the OUT of the procedure. When the parameter is "no" then the "curs" ref cursor in the PL/SQL procedure isn't even initialised like the above. At this point Java complains of an invalid ref cursor. I can try and piece togather the code but it may be very tricky.
    John

  • Why "illegal start of expression" error?  Please help!

    Hello great java minds. Could you please tell me why I get "illegal start of expression" errors for the following headers? Thanks for your wisdom!!
    Lines generating this error:
    public static String getName()--and--
    public static void displayResults()Here is my first class (that includes this code):
    import java.io.*;
    import java.util.*;
    public class ProductSurvey
         public static void main(String [] args)
              ProductData myData = new ProdcutData();
              String name = getName();
              openFile();
              myData.setName(name);
              myData.dataRetrieve(name);
              myData.updateAverages(rating1totalLow, rating2totalLow, rating3totalLow, rating1totalMed, rating2totalMed, rating3totalMed, rating1totalHigh, rating2totalHigh, rating3totalHigh, inc1total, inc2total, inc3total);
              mydata.setRating2ave1lower3(rating2lower1than3, lower1than3Total);
              displayResults();
              public static String getName()
                   System.out.println("Please enter income and product info file name:  ");
                   Scanner keyboard = new Scanner(System.in);
                   String name = keyboard.next();
                   return name;
              public static void openFile();
                   File fileObject = new File(name);
                   while ((! fileObject.exists()) || ( ! fileObject.canRead()))
                        if( ! fileObject.exists())
                             System.out.println("No such file");
                        else
                             System.out.println("That file is not readable.");
                             System.out.println("Enter file name again:");
                             name = keyboard.next();
                             fileObject = new File(name);                    
              public static void displayResults()
                   System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
                   System.out.println("*Average (rounded) product ratings, by income bracket, are as follows: ");
                   System.out.println(myData.toString());
                   System.out.print("\n*Total number of persons in Income Bracket $50000-$74999 ");
                   System.out.print("that rated all three products with a score of 5 ");
                   System.out.println("or higher: " + myData.getHighRaters());
                   System.out.print("\n*Average (rounded) rating for Product 2 by ");
                   System.out.println("persons who rated Product 1 lower than Product 3: " + myData.rating2ave1lower3);
    }Here is the backup class (just for your reference):
    import java.util.*;
    import java.io.*;
    class ProductData
              private String name;
              private int lineCount;
              private double inc1total;
              private double inc2total;
              private double inc3total;
              private int rating1totalLow;
              private int rating2totalLow;
              private int rating3totalLow;
              private int rating1totalMed;
              private int rating2totalMed;
              private int rating3totalMed;
              private int rating1totalHigh;
              private int rating2totalHigh;
              private int rating3totalHigh;
              private int highRaters;
              private double lower1than3Total;
              private int rating2lower1than3;
              private long rating2ave1lower3;
              private long rating1averageLow;
              private long rating2averageLow;
              private long rating3averageLow;
              private long rating1averageMed;
              private long rating2averageMed;
              private long rating3averageMed;
              private long rating1averageHigh;
              private long rating2averageHigh;
              private long rating3averageHigh;
              public ProductData()
                   name = null;
                   lineCount = 0;
                   inc1total = 0;
                   inc2total = 0;
                   inc3total = 0;
                   rating1totalLow = 0;
                   rating2totalLow = 0;
                   rating3totalLow = 0;
                   rating1totalMed = 0;
                   rating2totalMed = 0;
                   rating3totalMed = 0;
                   rating1totalHigh = 0;
                   rating2totalHigh = 0;
                   rating3totalHigh = 0;
                   highRaters = 0;
                   lower1than3Total= 0;
                   rating2lower1than3 = 0;
                   rating1averageLow = 0;
                   rating2averageLow = 0;
                   rating3averageLow = 0;
                   rating1averageMed = 0;
                   rating2averageMed = 0;
                   rating3averageMed = 0;
                   rating1averageHigh = 0;
                   rating2averageHigh = 0;
                   rating3averageHigh = 0;     
              public void setName(String newName)
                   String name = newName;
              public void dataRetrieve(String name)
                   try
                        BufferedReader inputStream = new BufferedReader(new FileReader(name));
                        String trash = "No trash yet";
                        while ((trash = inputStream.readLine()) !=null)
                             StringTokenizer st = new StringTokenizer(trash);
                             int income = Integer.parseInt(st.nextToken());
                             int rating1 = Integer.parseInt(st.nextToken());
                             int rating2 = Integer.parseInt(st.nextToken());
                             int rating3 = Integer.parseInt(st.nextToken());
                             if(rating1<rating3)
                                  lower1than3Total++;
                                  rating2lower1than3 = rating2lower1than3 + rating2;
                             if(income<50000)
                                  rating1totalLow = rating1totalLow + rating1;
                                  rating2totalLow = rating2totalLow + rating2;
                                  rating3totalLow = rating3totalLow + rating3;
                                  inc1total++;
                             else if(income<75000)
                                  rating1totalMed = rating1totalMed + rating1;
                                  rating2totalMed = rating2totalMed + rating2;
                                  rating3totalMed = rating3totalMed + rating3;
                                  inc2total++;
                                  if((rating1>=5) && (rating2>=5) && (rating3>=5))
                                       highRaters++;
                             else if(income<100000)
                                  rating1totalHigh = rating1totalHigh + rating1;
                                  rating2totalHigh = rating2totalHigh + rating2;
                                  rating3totalHigh = rating3totalHigh + rating3;
                                  inc3total++;
                             lineCount++;
                        inputStream.close();
                   catch(IOException e)
                        System.out.println("Problem reading from file.");
              public void updateAverages(int rating1totalLow, int rating2totalLow, int rating3totalLow, int rating1totalMed, int rating2totalMed, int rating3totalMed, int rating1totalHigh, int rating2totalHigh, int rating3totalHigh, long inc1total, long inc2total, long inc3total)
                   rating1averageLow = Math.round(rating1totalLow/inc1total);
                   rating2averageLow = Math.round(rating2totalLow/inc1total);
                   rating3averageLow = Math.round(rating3totalLow/inc2total);
                   rating1averageMed = Math.round(rating1totalMed/inc2total);
                   rating2averageMed = Math.round(rating2totalMed/inc2total);
                   rating3averageMed = Math.round(rating3totalMed/inc2total);
                   rating1averageHigh = Math.round(rating1totalHigh/inc3total);
                   rating2averageHigh = Math.round(rating2totalHigh/inc3total);
                   rating3averageHigh = Math.round(rating3totalHigh/inc3total);
              public long setRating2ave1lower3(int rating2lower1than3, double lower1than3Total)
                   long rating2ave1lower3 = (rating2lower1than3/lower1than3Total);
                   return rating2ave1lower3;
              public String toString()
                   return ("\nIncome level $26000-$49999:" + "\n" + "-Product 1: "
                         + rating1AverageLow + "-Product 2: " + rating2AverageLow
                         + "-Product 3: " + rating3AverageLow + "\n" + "\n" + "Income level $50000-$74999:" + "\n" + "-Product 1: "
                         + rating1AverageMed + "-Product 2: " + rating2AverageMed
                         + "-Product 3: " + rating3AverageMed + "\n" + "\n" + "Income level $75000-$100000:" + "\n" + "-Product 1: "
                         + rating1AverageHigh + "-Product 2: " + rating2AverageHigh
                         + "-Product 3: " + rating3AverageHigh);
              public int getHighRaters()
                   return highRaters;
    }

    You're trying to define those methods inside another method (the "main" method, in this case). Don't do that.

  • I did write a simple java program but it is not working please help me.....

    This is the program I wrote LineRect just to draw a line a rectangle etc...... Y it is not working How can i used the same program to run without using applet that is by using awt and swing.........Pls Help me.............
    import java.awt.*;
    import java.io.*;
    public class LineRect
    {public void paint(Graphics g)
         {g.drawLine(10,10, 50,50);
         g.drawRect(10, 60, 40,30);
         g.fillRect(60,10,30,80);
         g.drawRoundRect(10,100,80,50,10,10);
         g.fillRoundRect(20,110,60,30,5,5);
         g.drawLine(100,10,230,140);
         g.drawLine(100,140,230,10);
    <APPLET
    CODE =LineRect.class
    WIDTH=250
    HEIGHT=200>
    </APPLET>

    There are many significant errors here for instance you are using a class file as if it were an applet yet you do not subclass applet. Your code has no init method (if it is to be an applet). Your best bet is to go through the tutorials one step at a time. One thing to consider is to subclass a JPanel and draw on the jpanel overriding the paintComponent method. This can then be added to a JFrame or a JApplet's contentPane and would allow the same graphics in both. But again, please study the tutorials on all of this, otherwise you will be doing hit-or-miss programming, and that is no way to learn.
    Much luck!
    Addendum: Also, if you are just beginning in Java programming, I suggest you start with the basics and not with Swing / AWT / graphics programming. Otherwise you will just end up bruised and disappointed. You have to learn to walk before you can run.
    Edited by: Encephalopathic on Dec 26, 2007 5:09 AM

  • Java Reflection API problem... Please HELP!

    Hi,
    I'm writing a Client-Server program set where the Server class receives a Java file, along with some parameters, from the Client class/computer.
    The Server class then invokes a certain method from the Java file it received (depending on the parameters received).
    My Server program keeps giving me a ClassNotFoundException, and I'm going crazy.. I've been trying to fix it for a long time now... but with no avail.
    Here's the Server program.. but I doubt you need to read it all. Please just scroll down to "// The line below is what give me problems:".
    package remoterun;
    import java.net.*;
    import java.io.*;
    import java.lang.reflect.*;
    * <p>Copyright: Copyright ms2000 (c) 2005</p>
    public class Server2 {
        public static void main(String args[]) throws Exception {
            int numParameters;
            int port = 6789;
            boolean isThere = false;
            String className, methodName;
            Object[] parameters;
            ServerSocket welcomeSocket = new ServerSocket(port);
            for (; ; ) {
                 * Create a new socket, called connectionSocket, when some client knocks
                 * on welcomeSocket. This socket has the same port number. TCP then
                 * establishes a direct virtual pipe between the client socket and
                 * connectionSocket at the server so the client and server can send bytes
                 * to each other over it.
                Socket connectionSocket = welcomeSocket.accept();
                // Get number of parameters
                DataInputStream in = new DataInputStream(new BufferedInputStream(
                        connectionSocket.getInputStream()));
                numParameters = in.readInt();
    // Get the parameters for the method to be invoked.
                parameters = new Object[numParameters];
                ObjectInputStream objStream = new ObjectInputStream(
                        connectionSocket.getInputStream());
                for (int i = 0; i < numParameters; i++) {
                    parameters[i] = objStream.readObject();
                // read the class
                File program = (File) objStream.readObject();
                System.err.println(program); // It prints the program name correctly, e.g. Class2.java
    // Receiving some String parameters...
                            BufferedReader inFromClient = new BufferedReader(new
                        InputStreamReader(connectionSocket.getInputStream()));
                className = inFromClient.readLine();
                methodName = inFromClient.readLine();
                // The line below is what give me problems:
                Class classDefinition = Class.forName("remoterun." + className + ".java");
                Object object = classDefinition.newInstance();
                Method[] theMethods = classDefinition.getMethods();
                for (int i = 0; (i < theMethods.length) && (!isThere); i++) {
                    if (theMethods.getName().equals(methodName)) {
    isThere = true;
    theMethods[i].invoke(object, parameters);
    The Client code just sends the stuff to the Server, and it works fine. The code is below if it may help:
    package remoterun;
    import java.net.*;
    import java.io.*;
    public class Client2 {
        public static void main(String[] args) throws Exception {
            int result;
            int port = 6789;
            int num1 = 5;
            int num2 = 6;
            int numParameters = 3;
            String hostIP = "127.0.0.1";
            String className = "Class2";
            String methodName = "add";
            Object[] parameters;
            Socket clientSocket = new Socket(InetAddress.getByName(hostIP),
                                             port);
            // Send numParameters, className, methodName
            DataOutputStream out = new DataOutputStream(new BufferedOutputStream(
                    clientSocket.getOutputStream()));
            out.writeInt(numParameters);
            out.flush();
            Integer num3 = new Integer(num1);
            Integer num4 = new Integer(num2);
            parameters = new Object[] {num3, num4, InetAddress.getLocalHost()};
            File program = new File((className + ".java"));
            ObjectOutputStream output = new ObjectOutputStream(clientSocket.
                    getOutputStream());
            for (int i = 0; i < numParameters; i++) {
                output.writeObject(parameters);
    output.writeObject(program);
    output.flush();
    DataOutputStream outToServer = new DataOutputStream(clientSocket.
    getOutputStream());
    outToServer.writeBytes(className + '\n');
    outToServer.writeBytes(methodName + '\n');
    outToServer.flush();
    clientSocket.close();
    The error I get from the Server class is:
    java.lang.ClassNotFoundException: remoterun.Class2.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at remoterun.Server2.main(Server2.java:94)
    Exception in thread "main"
    (I also get a dialog box saying sthg like, "A fatal exception occured.. will exit now".)
    It's really odd, becuase there were rare times when it works although I don't change the program...
    I tried changing the problem line to stuff like:
                Class classDefinition = Class.forName(className + ".java");or
       Class classDefinition = Class.forName(className);but with no use. Same error. Can someone please pinpoint the problem?
    I'm sure the program does get to the Server, because it can print out the file name.
    PS: Sometimes it works when I use the same PC as the client/server, sometimes it doesn't.... Help :-(
    I'd appreciate some assistance in this.
    Thank you.

    What's this dot-java stuff? Are you sending a source file? If so, that isn't going to work. You need to compile the file and send the dot-class file.
    I'll try that. However, can I make the Client program complie the .java file? For example. something like Class2.compile()? Is this feature available, or do I have to open Class2.java and compile it from there?
    And in the server you need to either store that somewhere in the server's classpath....
    Isn't it automatically stored there? If not, how do I make it stored in the same file as the Server source file (I assume that's what you mean by classpath)?
    Thanks for your help... !!!

  • Can't get java to initiate applet, or even run, please help

    I need help, please. Need java to do some organic chem work, and I can't get it to work. I have Java 2 runtime SE - 1.4.1_05, virtual machine 1.4.1_05-b01, and plug-in the same as J2SE. The Web Start file was corrupted when it downloaded, so I removed it from the Add/Remove in control panel. I'm running windows 2000 Pro, I'm not a computer expert (means I need explicit instructions), I'm a vet student trying to do my homework, and study for exams. Any reply here will be very appreciated, or to my e mail [email protected] Thank you, Cindy

    There are plenty of people here that can and will help, but you need to tell us what the problem is (details, error messages, code samples, etc)
    Here's a general blurb, post back it it doesn't help.
    This may duplicate some of what you've already done, if so fine. But please verify you've done exactly what is written or know why you shouldn't before proceeding. You may want to print these instructions before continuing.
    Also note that this applies to the currrent java version installed on "standard" windows systems, only.
    To download the current version of Java, go here:
    http://java.sun.com/j2se/1.4.2/download.html
    and click on the word DOWNLOAD in the column labeled SDK in this line: Windows Offline installation (info)
    After downloading, click on this page of installation instructions and read through #6:
    http://java.sun.com/j2se/1.4.2/install-windows.html
    Install the software according to the preceeding instructions. If you encounter
    problems, see the section "Troubleshooting the Installation" in the installation instructions.
    Below is a Helloworld program, copy and paste it into your editor and save it as "HelloWorld.java" Use capitalization, Java is case-sensitive. If you're using Notepad, quote the name when saving, otherwise Notepad adds ".txt" to the name. Go to DOS/command window and check that you've got the file where you want it and that it's named correctly.
    -------save this program as HelloWorld.java--------
    public class HelloWorld {
    public static void main (String[] args) {
    System.out.println("Hello World!");
    In the same directory as HelloWorld.java, enter "javac" - the program should print out a list of options, if not, set your PATH - see below.
    In the same directory as HelloWorld.java, enter "javac HelloWorld.java" and the javac compiler will create HelloWorld.class. If it was successful it will not give any messages. Check that the file is created.
    In the same directory as HelloWorld.java, enter "java -classpath . HelloWorld" with the spaces and the period. The program will run. If it doesn't, recheck that you followed the instructions.
    Here is additional information:
    The Windows path is a set of pointers that Windows uses to locate programs that you execute, like javac.exe and java.exe. This setting is explained here:
    http://java.sun.com/j2se/1.4.2/install-windows.html - 5. Update the PATH variable
    (you should have already done this as part of the Java installation)
    The CLASSPATH is another set of pointers that is used by Java to find the files that you create and want compiled and/or run. This setting is explained here:
    Setting the Classpath:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
    [NOTE: always start your classpath with ".;" which means the current directory. See my classpath, below]
    How Classes are Found:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html
    Examples:
    This is my path
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BATCH;C:\J2SDK1.4.2_01\BIN;C:\PROGRA~1\UTILIT~1;C:\PROGRA~1\WIN98RK
    This is my classpath
    CLASSPATH=.;C:\mjava;C:\mnrx;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.2_01\lib\tools.jar;C:\NetRexx\NrxRedBk

  • Java RMI......please help!!

    Dear
    I using a Web (Applet) application to communication with the Server using RMI...i am getting the following error message:
    java.rmi.ConnectException: Connection refused to host: 210.23.134.226; nested ex
    ception is:
    java.net.ConnectException: Connection refused: no further information
    What could possibly be the problem?....is it because my browser does not support RMI...how do I know whether my broswer suppor RMI or not???
    please guide me.....thank you
    Dan

    why is everyone refusing to help me???

  • Java Card compatibility with readers... (please help me!!)

    Hi,
    I would like to know how to determine the compatibility of a existing reader with the JavaCard technology.
    I have studied the standar ISO 7816 and I'm not sure if a reader must be compliant with absolutely all
    parts of the standar (Part 1,2,3,4,5,6) to be capable of read, write Java Cards and select the applet to
    execute.
    Especifically I need to know if the readers GEMPC410 and CASTLES EZ200 are able to read, write
    and execute multiple java applications.
    The specifications that a read, said that GEMPC410 can read and write ISO7816 1/2/3/4 and
    CASTLES EZ200 can read and write ISO7816 1/2/3 but i have the following doubt:
    These readers should be compatible with the part 4 and/or 5 of the ISO standar to
    interchange commands with the reader (Part 4) and identifie the applications to execute (Part 5)?.
    Where I can find more information about this issues?
    Thank you very much for your soon answer.

    Well,
    There are two type of readers you can use with JavaCards:
    Contact readers
    As specified in ISO7816, for the contact readers working with T=0 and T=1 protocols. On win machines they are normally supported with the PC/SC interface, most of the readers are able to talk to that interface. In other words - if you can use any card on ur comp and if it is win platform JC will work fine.
    Contactless readers
    As specified in ISO14443, this babies are talking T=CL protocol. For now I know only JCOP30 products that are operating also in contactless mode. For this you will have to acquire some contactless reader and they are commong with drivers for standalone apps or for the PC/SC IF.
    But chance that you will use the second option in next 3 years is rather small.

  • Problem running my Java apps in my LG phone. Please help!

    Hi all!!
    I am quite new to the world of J2me, altough I've been coding Java for quite a few years now.
    Recently I bought a LG u 8120 phone with Java-support so I decided it was time to step into the mobile Java-world.
    Now I have written my first small app, a simple timer application which my phone (strangely enough) does not already have.
    So what happens is this : I create my app on my PC and package it with the WTK into a jar -file and a jad-file which i transfer to the phone.
    After this I can see the name of my app in the list of available programs in the phone. But when I try to run it: Nothing. The Java logo shows up for a few seconds and then I am tossed back to the menu.
    I have thought of the following as possible problems:
    1. the 8120 does not support MIDP2.0
    2. I am doing something wrong transfering the files
    3. I have missed out on one or several necessary steps in the process
    Anyone who have developed Java apps for LG phones who can give me some hints?
    I've used the Sun J2ME Wireless Toolkit 2.2 with MIDP2.0 and CLDC1.1 .
    The apps works fine in the emulator. The problem starts when I want to run it in the phone. The phone I've tried is an LG u8120. LG apparently does not want to make life easy for its customers, so there is no support for transfering Java apps in the vendor-supplied software. I suppose that's because they want you to only download stuff from their site. However, after surfing around on some discussion forums for a while I found a program called G-thing which can be used to upload Java apps to LG-phones via USB.
    Any help is very appreciated!
    Thanks,
    Sarah

    Thanks,
    I have tried this and ruled out some of the possible causes.
    When I added some more exception handling, I could see that a "java.lang.IllegalArguenException" is thrown.
    When I ran the AudioDemo package that came with WTK2.2 I noticed that the examples that uses WAV-files do not work while the rest works fine.
    My new theory is now that the u8120 does not support the WAV-format, so I will try with an mp3 instead and see what happens.
    Anyone who knows if LG-phones support WAV-format?
    /Sarah

  • Java.lang.ClassCastException in simple struts application. please help me!

    I have a simple struts application, it only have a login form. however, it's alway throw java.lang.ClassCastException when I submit the form. Here is full stack trace:
    14-03-2007 17:04:50 org.apache.struts.chain.ComposableRequestProcessor init
    INFO: Initializing composable request processor for module prefix ''
    14-03-2007 17:04:50 org.apache.struts.chain.commands.servlet.CreateAction getAction
    INFO: Initialize action of type: ndlinh.struts.lab.RegistrationForm
    14-03-2007 17:04:50 org.apache.struts.chain.commands.AbstractExceptionHandler execute
    WARNING: Unhandled exception
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    14-03-2007 17:04:50 org.apache.struts.chain.commands.ExceptionCatcher postprocess
    WARNING: Exception from exceptionCommand 'servlet-exception'
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Here is my code:
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class RegistrationForm extends ActionForm {
         private String userid = null;
         private String password = null;
         private String password2 = null;
         public RegistrationForm() {
              System.out.println("************ Registration Form created *************");
          * @return the password
         public String getPassword() {
              return password;
          * @param password the password to set
         public void setPassword(String password) {
              this.password = password;       
          * @return the password2
         public String getPassword2() {
              return password2;
          * @param password2 the password2 to set
         public void setPassword2(String password2) {
              this.password2 = password2;
          * @return the userid
         public String getUserid() {
              return userid;
          * @param userid the userid to set
         public void setUserid(String userid) {
              this.userid = userid;
         public void reset(ActionMapping arg0, HttpServletRequest arg1) {
              userid = "";
              password = "";
              password2 = "";
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class RegistrationAction extends Action {
         public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
                                             HttpServletRequest request, HttpServletResponse response)
              try {
                   System.out.println("*******************" + actionForm.toString() + "*******************");
                   RegistrationForm form = (RegistrationForm)actionForm;     
                   String username = form.getUserid();
                   String password = form.getPassword();
                   System.out.println(username);
                   // simple login checking.
                   // if userid equals password, user can login to system
                   if ( username.equalsIgnoreCase(password)) {
                        return mapping.findForward("success");
                   } else {
                        return mapping.findForward("failure");
              } catch (Exception e) {
                   e.printStackTrace();
                   return mapping.findForward("failure");
    }registration.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
         <html:form action="/register">
              Username: <html:text property="userid" /> <br />
              Password: <html:password property="password" /> <br />
              Re-type: <html:password property="password2" />
              <html:submit value="Register" />
         </html:form>
    </body>
    </html>struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationForm"
                   name="registrationForm"
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
    </web-app>System information:
    Tomcat 5.5.20
    Struts 1.3.5
    JDK1.5.08

    struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationAction" // action class
                   name="registrationForm" // form bean name
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>HTH

Maybe you are looking for

  • Video in photo library keep freezing iPhone 6

    I have the iPhone 6 with 128GB It seems commonly I will open up a video that i had previously taken to show a friend the video open but will not play. I than will restart the phone and the same video will than play? has anyone else had this problem?

  • My recovery key is not working even after reseting it. How can i solve it

    I signed to my account but lost other device, so generate new key. This new generated key is still not working. Anny sugestion please?

  • Ignore Numeric error with EXCEPTION

    Hi, I've got a PROC that reads all records from one table and INSERT them in another table, quite simple. The Only thing is that I want to IGNORE Numeric errors. So, if a get an error (numeric), I want Oracle to IGNORE the error and continue in my FO

  • No Sound in iMovie Import

    Hello everyone: I am trying to import a movie from my Sony DSC W100 camera. The movie downloads to iMovie great, but I can't get any sound. I've checked the various volume controls on the camera, computer, and iMovie and everything seems to be where

  • Tool for generating ER diagrams

    Hi , I need a free tool for generating ER diagrams. Using Tool TOAD i can do but, i Have 1000 objects in one schema where i need to generate er diagrams by grouping 10 objects at a time. to do so i need to uncheck the remaining Objects manually. in a