Compile error import java.util.map$entry

Hi,
I am trying to compile code which imports the following package
import java.util.Map$Entry.
The error thrown up is : cant resolve symbol Map$Entry. Why is there a $ in the package import path and is there some configuration required to compile the file.
I am not allowed to change the code. Does anyone have an idea on how this problem can be solved.
Thanks and regards
Kumar Vellal

Btw java docs for the interface are available at:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.Entry.html
Changing the import should probably help compile the code, but without changing the import .. need to check. This is just from what i remember now. Lets see if anyone else comments on this.

Similar Messages

  • Compile errors importing Map$Entry

    Hi,
    I trying to compile code written by my client which uses the following syntax
    import java.util.Map$Entry.
    This throws a compilation error :
    cant resolve symbol class Map$Entry
    package : java.util
    The same compile at the client side works. Am i missing some configuration. Also why is the path defined as Map$Entry instead of Map.Entry.
    any help would be greatly appreciated
    thanks and regrads
    Kumar Vellal

    What you're client is trying to do is import a nested class. To do this you use the syntax:
    import A.Enclosing.Nested;Now you can refer to the nested class without refering to the enclosing class (i.e Nested n = new Nested();)
    However - Some compilers don't like this, and I don't like it. You shouldn't import nested classes directly like this.

  • Weird exception: Cannot instantiate non-persistent class: java.util.Map

    java.lang.UnsupportedOperationException: Cannot instantiate non-persistent class: java.util.Map
         at com.sleepycat.persist.impl.NonPersistentFormat.newInstance(NonPersistentFormat.java:45)
         at com.sleepycat.persist.impl.PersistEntityBinding.readEntity(PersistEntityBinding.java:89)
         at com.sleepycat.persist.impl.PersistEntityBinding.entryToObject(PersistEntityBinding.java:61)
         at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:338)
         at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:299)
         at com.xx.support.dbd.IdentityDataAccessor.insert(IdentityDataAccessor.java:33)
         at com.xx.support.dbd.BerkeleyDBAccountStorage.saveUser(BerkeleyDBAccountStorage.java:95)
         at com.xx.support.bdb.BerkeleyDBAccountStorageTests.initBerkeleyDBData(BerkeleyDBAccountStorageTests.java:38)
         at com.xx.support.bdb.BerkeleyDBAccountStorageTests.setUp(BerkeleyDBAccountStorageTests.java:28)
         at junit.framework.TestCase.runBare(TestCase.java:125)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
    What's the root cause of this exception?

    I wrote a small test using the classes you included
    in your message and I am able to retrieve the user by
    key, as in the code above. So I'm not sure what
    you're doing that is causing the problem. Please
    send a small test that reproduces the problem.Oops, I forgot to include the source for the test I wrote. Here it is.
    import java.io.File;
    import java.util.HashMap;
    import java.util.Map;
    import com.sleepycat.je.DatabaseException;
    import com.sleepycat.je.Environment;
    import com.sleepycat.je.EnvironmentConfig;
    import com.sleepycat.persist.EntityStore;
    import com.sleepycat.persist.PrimaryIndex;
    import com.sleepycat.persist.StoreConfig;
    import com.sleepycat.persist.model.Entity;
    import com.sleepycat.persist.model.Persistent;
    import com.sleepycat.persist.model.PrimaryKey;
    public class Test {
        @Persistent
        public static class SimplePrincipal {
            protected String name;
            public SimplePrincipal(String username) {
                this.name = name;
            public SimplePrincipal() {}
        @Entity
        public static class SimpleUser extends SimplePrincipal {
            @PrimaryKey
            private String key;
            private Map properties;
            public SimpleUser() {
                super();
                this.properties = new HashMap();
            public SimpleUser(String username) {
                super(username);
                this.properties = new HashMap();
            public void setKey(String key){
                this.key = key;
            public void addPropertity(String name, String value) {
                this.properties.put(name, value);
            @Override
            public String toString() {
                return "[SimpleUser key: " + key + " name: " + name + ']';
        private Environment env;
        private EntityStore store;
        private PrimaryIndex<String, SimpleUser> primaryIndex;
        private void open()
            throws DatabaseException {
            EnvironmentConfig envConfig = new EnvironmentConfig();
            envConfig.setAllowCreate(true);
            envConfig.setTransactional(true);
            env = new Environment(new File("./data"), envConfig);
            StoreConfig storeConfig = new StoreConfig();
            storeConfig.setAllowCreate(true);
            storeConfig.setTransactional(true);
            store = new EntityStore(env, "test", storeConfig);
            primaryIndex = store.getPrimaryIndex(String.class, SimpleUser.class);
        private void close()
            throws DatabaseException {
            store.close();
            env.close();
        private void execute()
            throws DatabaseException {
            SimpleUser user = new SimpleUser("test");
            user.setKey("testkey");
            primaryIndex.put(user);
            user = primaryIndex.get("testkey");
            System.out.println(user);
        public static void main(String[] args)
            throws DatabaseException {
            Test test = new Test();
            test.open();
            test.execute();
            test.close();
    }Mark

  • Error(7): java.util.zip.ZipException: invalid entry size (expected 813 but

    Hi All,
    Error(7): java.util.zip.ZipException: invalid entry size (expected 813 but got 817 bytes)
    Today I opened my working project in Jdeveloper 10.1.3 version and as I compile the project, it gives me this error in all Jsf - Jsp pages.
    The line that it shows the above error in my pages is follows.
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    Any idea ? Till yesterday, I never got this error and all of sudden it started showing up.
    Your help appreciated.
    thanks,
    pp

    And just to add, nothing got checked out from repository (I mean CVS etc).
    I have this project and Jdev on my windows laptop. I just opened it and started getting this strange error. any idea ?

  • Error(5): java.util.zip.ZipException: invalid entry size (expected 2875 but

    Hi all!
    I'm getting this error when I try to execute my application in JDeveloper: Error(5): java.util.zip.ZipException: invalid entry size (expected 2875 but got 2845 bytes)
    This started to happen after I had checkout my application to CVSNT.
    Any help?
    P.S. I'm using JDeveloper 10.1.3 with CVSNT 2.5

    My cvswrappers file (CVSNT):
    *.cab -kb
    *.class -kb
    *.doc -kb
    *.dll -kb
    *.ear -kb
    *.exe -kb
    *.exp -kb
    *.fla -kb
    *.gif -kb
    *.gz -kb
    *.jar -kb
    *.jpg -kb
    *.jpeg -kb
    *.lib -kb
    *.msi -kb
    *.mso -kb
    *.pdf -kb
    *.pfw -kb
    *.png -kb
    *.ppt -kb
    *.sit -kb
    *.swf -kb
    *.tar -kb
    *.tlb -kb
    *.vsd -kb
    *.xls -kb
    *.war -kb
    *.wmz -kb
    *.zip -kb Via Tortoise client I can add and commit zip (jar) files in binary format and everything is OK.
    If I do that via Jdev, anybody who checkout that module from cvs have zip exception, because JDev didnt sent in binary format. How to setup that?
    Thanx
    Message was edited by:
    vpetreski

  • Error: java.util.map can not be inherited with different arguments

    Hi,
    I am getting following error while building the source code.
    C:\venus\src\com\martquest\messaging\msgio\MqMessageIOObjectCarrier.java:36: java.util.Map cannot be inherited with different arguments: <> and <java.lang.Object,java.lang.Object>
    [javac] public class MqMessageIOObjectCarrier extends Properties implements IMqMessageIOObjectCarrier
    What should I do to resolve this issue?
    Thanks
    Prachi

    Hi,
    I am getting following error while building the
    source code.whose source code? If it's yours, you'd better look at where you are defining and using Map. The error code tells you exactly what's wrong.

  • BEA error: deleteTaskAttributes(int,java.util.Map)

    Hello,
    I have installed OIM 9100 on BEA with an Oracle Database.
    I got the following error message after starting OIM:
    <08.07.2008 11.07 Uhr CEST> <Warning> <EJB> <BEA-012034> <The Remote interface method: 'public abstract void com.thortec
    h.xl.scheduler.interfaces.SchedulerController.deleteTaskAttributes(int,java.util.Map) throws com.thortech.xl.scheduler.e
    xception.SchedulerGenericException,java.rmi.RemoteException' in EJB 'SchedulerController' contains a parameter of type:
    'java.util.Map' which is not Serializable. Though the EJB 'SchedulerController' has call-by-reference set to false, this
    parameter is not Serializable and hence will be passed by reference. A parameter can be passed using call-by-value only
    if the parameter type is Serializable.>
    Can anybody help me or tell me what it means?
    Thank you,
    Matthias

    BEA Weblogic normally throws a ton of these errors as it seems like OIM's ideas on what should be passed by reference and what should be passed by value does not play well with Weblogic.
    I have been told to ignore these warnings.
    Good luck
    /M

  • Error when importing java.util.Scanner

    Agh! I'm in an introduction to computer science course, and I am writing a program as an assignment that's due tomorrow.
    I have imported java.util.Scanner before, but I've only run it on the Windows PCs in the lab, whereas I am currently on a Mac. I've updated to the latest version of Java (through the software update), and I'm running Tiger (also fully updated).
    I'm using Dr. Java to write the programs, but I tried using the very same thing in Eclipse and it didn't work. Here's my program:
    import java.util.Random;
    import java.util.Scanner;
    public class Password {
    public static void main(String[] args) {
    //create a Scanner object to read from the keyboard:
    String password;
    Scanner scanner = new Scanner(System.in);
    Random randomizer = new Random();
    System.out.println("Please enter a string containing candidate characters.");
    String input = scanner.next();
    int charLength = length(input);
    System.out.print("Random password: ");
    System.out.print(input.substring(randomizer.nextInt(charLength)));
    System.out.print(input.substring(randomizer.nextInt(charLength)));
    System.out.print(input.substring(randomizer.nextInt(charLength)));
    System.out.println(input.substring(randomizer.nextInt(charLength)));
    And, here's my errors:
    4 errors found:
    File: /Users/brianmoore/Desktop/Password.java [line: 11]
    Error: cannot resolve symbol
    symbol : class Scanner
    location: package util
    File: /Users/brianmoore/Desktop/Password.java [line: 18]
    Error: cannot resolve symbol
    symbol : class Scanner
    location: class Password
    File: /Users/brianmoore/Desktop/Password.java [line: 18]
    Error: cannot resolve symbol
    symbol : class Scanner
    location: class Password
    File: /Users/brianmoore/Desktop/Password.java [line: 22]
    Error: cannot resolve symbol
    symbol : method length (java.lang.String)
    location: class Password
    Any ideas?

    Ok. I figured it out. On the Dr. Java page, this is what helped me:
    Please verify the following:
    - Open "/Applications/Utilities/Java/J2SE 5.0/Java
    Preferences";
    make sure "J2SE 5.0" is at the top of the list under
    "Java
    Application Runtime"
    - Open DrJava; go to Edit->Preferences; make sure
    "Tools.jar
    Location", "JSR-14 Location", and "JSR-14
    Collections Path"
    are all blank
    - Open the Help->About dialog box; make sure the "DrJava
    Version" listed is 20050601-0007 or later (that is, later
    than
    June 1, 2005)
    - Go to the "System Properties" tab in the
    "About" box; make
    sure "java.version" is 1.4.2.
    Let us know what you find out if you're still having
    trouble.
    Thanks for your help!

  • Import java.util Error

    How come program wont accept import java.util ?
    I get cannot resole symbol ?? i looked in up in my java book and its spelled right . what gives ?

    there is no class named java.util .
    import java.util.ArrayList;
    import java.util.EventObject;
    or
    import java.util.*;

  • Cannot import java.util.concurrent.locks ... WHY?

    Why is Xcode unable to find the java.util.concurrent.locks package. The class browser knows it exists. For example the entry for the ReentrantLock class looks like this in the browser class window:
    ReentrantLock (java.util.concurrent.locks)
    Xcode knows about other java.util packages such as java.util.ResourceBundle which I have been accessed successfully in other parts of my projecgt.
    Here is a source file and the resulting compiler error:
    The source file:
    // Foo.java
    import java.util.ResourceBundle;
    import java.util.concurrent.locks;
    public class Foo { }
    The compiler error:
    compile:
    Compiling 2 source files to /Users/Terry/Desktop/JAVA/PROJECTS/Logic/bin
    /Users/Terry/Desktop/JAVA/PROJECTS/Logic/src/Foo.java:3: cannot find symbol
    symbol : class locks
    location: package java.util.concurrent
    import java.util.concurrent.locks;
    ^
    1 error
    BUILD FAILED
    Help or hints would be greatly appreciated!

    Well the reason to your problem is very simple... java.util.concurrent.locks is a package... Not a class.
    if you want to import a specific class, the class should be written at the end like you did for import java.util.ResourceBundle; but if you want to import a whole package you need to add the little star at the end :
    import java.util.concurrent.locks.*;
    Or else, you only import the class you need :
    import java.util.concurrent.locks.ReentrantLock;

  • Compilation error in java for struts application.

    Hello,
    I'm a newbie in java and struts, i was trying a simple struts application given in "struts complete reference".This is my code of its Controller class(Action class):-
    package com.jamesholmes.struts;
    import java.util.ArrayList;
    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 SearchAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    //Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if(name != null && name.trim().length() > 0)
    results = service.searchByName(name);
    else
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    //place search results in SearchForm for access by jsp.
    searchForm.setResults(results);
    //Forward control to this Action's input page.
    return mapping.getInputForward();
    Now problem is when i'm compiling this java file i'm getting error"can not resolve symbol" for the instances i'm creating for SearchForm(view class) and EmployeeSearchService(model class).can any one help me how to resolve this error. I've tried importing those classes explicitly also, but error gets increased this way.

    Tht problem is solved, it was a mistake frm my side in compilation precedure.Anyway, now the real error-After i compiled and created the war file of application, i was running it in tomcat and got this Error, it is i guess a server sprcific error which i am unable to understand., can any one now help me solving this out?????Error is this :-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521)
         org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436)
         org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:495)
         org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:353)
         org.apache.jsp.index_jsp._jspx_meth_html_link_0(index_jsp.java:96)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.
    Apache Tomcat/5.0.27

  • The import "java.util.scanner" is not vaild

    I am experiment with the java.util.scanner API after compiling the code below I received the following error:
    The import "java.util.Scanner" is not valid, since it does not name a type in a package.
    I declared a string variable should that suffice?
    import java.util.Scanner;
    public class Echo {
    public static void main (String[] args)
    String message;
    Scanner scan = new Scanner (System.in);
    System.out.println ("enter something:");
    message = scan.nextLine();
    System.out.println ("hey you entered: \"" + message + "\"");
    }

    Most IDEs let you select and installed JDK for them to use. Check out that IDE's preferences.
    Otherwise, start here and learn to do it with a simple text editor or programmer's editor, and the command line.
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/

  • When included  import java.util.* then why include import java.util.Gregori

    Hi,
    In my program I hava inported the java package like
    import java.util.*;
    import java.sql.*;
    import java.text.*;
    then for using some classes like Gregorial calender,Date etc,I have to again import
    import java.util.Date;
    import java.sql.PreparedStatement;
    import java.util.GregorianCalendar;
    As far as I know if I have import the above like
    import java.util.*; then it means I can use any classes in java.util ,but if I am not importing
    import java.util.GregorianCalendar;
    import java.util.Date;
    my program is giving error.Can somebody tell me,where my concept is wrong.
    Thanks

    import java.sql.*;
    import java.util.*;
    //import java.util.Date;  // <-- needed to avoid "the type Date is ambiguous"
    public class PackageEg {
        public static void main(String[] args) {
            Date test = new Date();
    }This code gives an error when I compile it, but if I include the
    java.util.Date import it is good. The reason is that there are two
    possible Date classes - one in java.util and one in java.sql. The
    compiler cannot figure out which one I mean.
    If I include a specific class like java.util.Date, then this one will be used
    in preference to any .* imports. (These are called "imports on demand")
    This explains why you need java.util.Date, but the other two are a
    mystery. As far as I know PreparedStatement and GregorianCalander
    are unique names within the packages you mention. Could you post
    some code that will not compile unless the specific import statements
    are there?

  • Compiling error on Java I/O

    My first time to write a very simple Java progam. Any one could help me on this comipling error? Thanks in advance!
    Compiling ERROR:
    ================
    C:\java\class>javac hw01.java
    hw01.java:43: cannot resolve symbol
    symbol : variable in
    location: class hw01
    while((line = in.readLine()) != null ) {
    ^
    1 error
    SOURCE CODE:
    ============
    *     Program name: hw01.java
    *     Author:
    *     Description: Simple I/O and computation
    *     Date: 12/08/2002
    *     compile: javac hw01.java
    *     usage: java hw01 <infile> <utfile>
    *     <infile> - input file
    *     operator operand1 operand2
    *          ex. + 1 1
    * <outfile> - output file
    * operand1 operator operand2 = result
    *          ex. 1 + 1 = 2
    import java.io.*;
    import java.util.*;
    public class hw01 {
         // Open input file and output file
         public static void main(String[] args) throws IOException {
              if (args.length == 2) {
                   // Open File for Reading
                   File inFile = new File(args[0]);
                   FileReader in = new FileReader(inFile);
                   // Open File for Writing
                   File outFile = new File(args[1]);
                   FileWriter out = new FileWriter(outFile);
              } else {
                   System.out.println("java command <arg1> <arg2>");
              // Get operation, operand1 and operand2 for each line
              String line = null;
              while((line = in.readLine()) != null ) {
                   //String op; String op1; String op2; String result;
                   // Get operation and operands
                   //stringTokenizer t = new StringTokenizer(line);
                   //op = t.nextToken().charAt(0);
                   //op1 = Integer.valueOf(t.nextToken()).intValue();
                   //op2 = Integer.valueOf(t.nextToken()).intValue();
                   // Compute math operation
                   //if( op == '+' ) {
                   //     result = op1 + op2;
                   // } else if( op == '-' ) {
                   //     result = op1 - op2;
                   //} else if( op == '*' ) {
                   //     result = op1 * op2;
                   //} else if( op == '/' ) {
                   //     result = op1 / op2;
                   // Print out the result
                   //system.out.println(op1 + op + op2 + "=" + result);
              // Close infile
              // in.close();
              // System.out.println("");
              // Close outFile
              // out.close();

    The compiling error is fixed. The revised working source code hw01.java is provided below. Can someone help the remining question below?
    PROBLEM/Question:
    =================
    The output only goes to the console. How code should be changed to allow output to a specified file from command line.
    SOURCE FILE (without Compiling error):
    =====================================
    *     Program name: hw01.java
    *     Author:
    *     Description: Simple I/O and computation
    *     Date: 12/08/2002
    *     compile: javac hw01.java
    *     usage: java hw01 <infile> <utfile>
    * example: java hw01 hw1data.txt hw1out.txt
    *     <infile> - input file
    *     operator operand1 operand2
    *          ex. + 1 1
    * <outfile> - output file
    * operand1 operator operand2 = result
    *          ex. 1 + 1 = 2
    import java.io.*;
    import java.util.*;
    public class hw01 {
         // Open input file and output file
         public static void main(String[] args) throws IOException {
              FileReader in = null;
              FileWriter out = null;
              BufferedReader br = null;
              System.out.println("input File Name = " + args[0]);
              System.out.println("output File Name = " + args[1]);
              if (args.length == 2) {
                   // Open File for Reading
                   File inFile = new File(args[0]);
                   in = new FileReader(inFile);
                   br = new BufferedReader(in);
                   // Open File for Writing
                   File outFile = new File(args[1]);
                   out = new FileWriter(outFile);
              } else {
                   System.out.println("java command <arg1> <arg2>");
              // Get operation and operands for each line
              String line = null;
         char op;
              int op1, op2;
              int result = 0;
              while((line = br.readLine()) != null ) {
                   // Get operation and operands
                   StringTokenizer t = new StringTokenizer(line);
                   op = t.nextToken().charAt(0);
                   op1 = Integer.valueOf(t.nextToken()).intValue();
                   op2 = Integer.valueOf(t.nextToken()).intValue();
                   // Compute math operation and print result
                   if( op == '+' ) {
                        result = op1 + op2;
                        System.out.println(op1 + " + " + op2 + " = " + result);
                   } else if( op == '-' ) {
                        result = op1 - op2;
                        System.out.println(op1 + " - " + op2 + " = " + result);
                   } else if( op == '*' ) {
                        result = op1 * op2;
                        System.out.println(op1 + " * " + op2 + " = " + result);
                   } else if( op == '/' ) {
                        result = op1 / op2;
                        System.out.println(op1 + " / " + op2 + " = " + result);
              // Close infile
              in.close();
              // Close outFile
              out.close();
    }

  • Error on java.util.NoSuchElementException

    Hi,
    I am facing an error "Exception in thread "main" java.util.NoSuchElementException" on my java code but i have no idea on how to solve this error. I have been figuring for very long but still no solution. Below is my code. Can anyone help? Thank in advance=D
    import java.io.FileReader;
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.*;
    class Matrix {
          double[][] element;
         public static void getFile(String fileName) throws IOException{
            BufferedReader br = null;
            int numRows,numCols;
            Matrix m1 = new Matrix();
            try{
                  br = new BufferedReader(new FileReader(fileName));
                  String line = br.readLine();
                  //Get the number of rows
                  line = br.readLine();
                  StringTokenizer st = new StringTokenizer(line, "=");
                  st.nextToken();
                  String row = st.nextToken();
                  numRows = Integer.parseInt(row.substring(1));
                  //Get the number of columns
                  line = br.readLine();
                  StringTokenizer st2 = new StringTokenizer(line, "=");
                  st2.nextToken();
                  String col = st2.nextToken();
                  numCols = Integer.parseInt(col.substring(1));
                  line = br.readLine();
                  while ((line = br.readLine()) != null ){
                     //Declare and initialize the 2d array
                     m1.element = new double[numRows][numCols];
                     StringTokenizer st3 = new StringTokenizer(line, "</matrix>");
                     while(st3.hasMoreTokens()){
                          for(int r = 0; r < m1.element.length; r++){
                              for(int c = 0; c <= m1.element.length; c++){
                                 String record = st3.nextToken(" ");
                                 m1.element [r][c] = Double.parseDouble(record);
                      br.close();      
               }catch(FileNotFoundException ex){
                      System.out.println(ex.getMessage());
    }

    Tave wrote:
    Some things occur to me, none of which may be useful.
    Firstly, you have no constructor for your class.
    Secondly, you don't seem to have a main method, though this may be because this class is called by another.
    Thirdly, don't you have a line number or other identification for what is causing the exception?Thank for your reply=D
    Yap this is a class that is called by another class that why there is no main method for it. And for the line that causing the error is
    String record = st3.nextToken(" ");

Maybe you are looking for

  • I can't sign in to my computer with my apple id....

    Im trying to sign in to my apple ID on my mac book air but i cant and i cant upgrade to os 10.... what shall i do. Going crazy on this ****! Almost regret bying this advanced ****....

  • Getting Refund with itunes match

    Hi, i have subscribed to itunes match yesterday but then realise it doesn't work properly, how do i cancel it? try to click on report a problem but it does work? anyone experience this? thx

  • Flip 4 Mac no video

    I have installed, including upgrades, appropriate for OSX 10.9.1 - I get audio and a black screen - no video - also the every five-second message "this is a demonstration of Flip 4 Mac." 

  • 2008 macbook cannot handle Lion - but I need to sync my iPhone 5 to iTunes!

    I was gifted an Phone 5 because I needed a new phone and because I needed an ipod for my long walks to work. The music aspect of the iPhone is really important to me, so naturally I was very dissapointed to find out that my current iTunes can't detec

  • Dream weaver8/Adobe dreamweaver CS3

    Now this will show just how new I am to dreamweaver/computer knowledge etc. I recently did a course on dreamweaver8, purchased an update of softwear I already had thinking it contained dreamweaver8? I purchased Adobe Creative Suite 3 Web Premium. now