Bug 30436 - import java.util.Scanner cannot be resolved
Summary: import java.util.Scanner cannot be resolved
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: 0.93
: P3 normal
Target Milestone: 0.98
Assignee: Andrew John Hughes
Depends on: 36000
  Show dependency treegraph
Reported: 2007-01-11 14:36 UTC by Debian GCC Maintainers
Modified: 2008-08-16 23:35 UTC (History)
3 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2008-04-21 14:50:22


Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2007-01-11 14:36:53 UTC
[forwarded from http://bugs.debian.org/401948]

The following program compiles fine with 


--8<---------------cut here---------------start------------->8---
import java.util.Scanner;

class TestScanner
    public static void main(String[] args)
        System.out.println ("hi");
--8<---------------cut here---------------end--------------->8---

But the eclipse compiler says,

(debian-unstable)jtocancipa@golem:~/tmp$ /usr/bin/ecj-bootstrap TestScanner.java
1. ERROR in TestScanner.java (at line 1)
        import java.util.Scanner;
The import java.util.Scanner cannot be resolved

The eclipse compiler should be fixed to compile the program (the ecj compiler here is configured to use the libgcj.jar).
Comment 1 Tom Tromey 2007-03-07 22:24:03 UTC
Confirmed.  No one has written this class yet.
Comment 2 Michael Koch 2007-03-08 06:04:31 UTC
twisti said one of his students has implemented this class and just needs paperwork
Comment 3 Christian Thalinger 2007-03-08 08:58:16 UTC
Yes, true.  Mark already sent the paperwork to him and I hope he already filled it out and sent it back.  I'll contact him and point him to this PR.
Comment 4 Ian Rogers 2007-10-23 20:33:43 UTC

I've run into this problem too. Has the proposed implementation's paperwork gone through?

Thanks, Ian
Comment 5 Christian Thalinger 2007-10-29 11:35:55 UTC
I don't know.  Maybe Mark knows.
Comment 6 Mark Wielaard 2007-12-20 12:48:27 UTC
This is still pending resolution of the question whether the university has any claims on the work being contributed.
Comment 7 Andrew John Hughes 2008-01-08 13:08:25 UTC
twisti has lost track of the code and student...
Comment 8 Christian Thalinger 2008-01-08 13:57:43 UTC
We're currently trying to get this sorted with GNU legal and get contact to the student again.
Comment 9 Ian Rogers 2008-02-11 09:55:06 UTC
Any progress on this?
Comment 10 Mark Wielaard 2008-02-11 11:24:40 UTC
Submitter is currently mia, sorry.
Comment 11 Laszlo 2008-03-25 16:42:37 UTC
I have completed the java.util.Sanner but I still wasn't able to commit this code to the "magnificant" GNU CVS repository with Eclipse.. i have tried it using gentoo and Windows xp.. 

I already uploaded a freshly generated public key yesterday and today again (this time generated with eclipse).. 

So if someone would be as kind as to tell me how to commit this class it could even be finished today.. 

I have found some tutorials about it, and following them I have entered the private key file in the Eclipse settings but the "magnificant" GNU server doesn't even ask me for the passphrase.. 

"http://www.cise.ufl.edu/~mwhitloc/sf_cvs_howto.html" I used it to try to check out the classpath.. 

In the eclipse check out Form I have filled in the following:
Host : cvs.savannah.gnu.org
Repository path: /sources/classpath
User : <my Savannah account name>
Password : [empty]
Connection type : ext

And then when I click next, there should come a promt for the passphrase of the private key.. which doesn't come.. 

When I tried to use cvs from shell it only said to me "Premission denied (publickey)." 
Comment 12 Mark Wielaard 2008-03-25 17:23:45 UTC
(In reply to comment #11)
> I have completed the java.util.Sanner but I still wasn't able to commit this
> code to the "magnificant" GNU CVS repository with Eclipse.. i have tried it
> using gentoo and Windows xp.. 

Please post your patch first on classpath-patches@gnu.org
Also please read http://www.gnu.org/software/classpath/docs/cp-hacking.html#SEC3 and http://developer.classpath.org/mediation/ClasspathFirstSteps
Comment 13 Andrew John Hughes 2008-03-30 21:20:42 UTC
Mark, I take it Laszlo completed the assignment then? I don't recall seeing a mail, but may have missed it.

Laszlo, you need to first post the patch to classpath-patches@gnu.org with the subject 'RFC: java.util.Scanner' and wait for feedback before committing.  As Mark says, please read the guides for GNU Classpath work.

If there are problems committing, this can be tracked down or another developer can always commit the work for you assuming assignment is in place.
Comment 14 Andrew John Hughes 2008-04-21 14:50:22 UTC
Legalities are now cleared up.
However, on refactoring and reformatting this code, I discovered that it has never been compiled against GNU Classpath.  Before we can commit this, we need support for region-based regular expression matching.
Comment 15 Andrew John Hughes 2008-06-15 22:10:38 UTC
Let's get this in for 0.98.
Comment 16 Andrew John Hughes 2008-08-16 23:35:35 UTC
CVSROOT:        /sources/classpath
Module name:    classpath
Changes by:     Andrew John Hughes <gnu_andrew> 08/08/16 23:34:21

Modified files:
       .              : AUTHORS ChangeLog
Added files:
       java/util      : Scanner.java

Log message:
       Add initial implementation of java.util.Scanner.

       2008-08-17  Andrew John Hughes  <gnu_andrew@member.fsf.org>

               * AUTHORS: Added Laszlo.

       2008-04-20  Andrew John Hughes  <gnu_andrew@member.fsf.org>

               PR classpath/30436:
               * java/util/Scanner.java:
               Fix package to be java.util and correct

       2007-07-25  Laszlo Andras Hernadi  <e0327023@student.tuwien.ac.at>

               PR classpath/30436:
               * java/util/Scanner.java:
               Initial implementation.