Solved

Java login form in eclipse

Posted on 2010-11-29
4
1,231 Views
Last Modified: 2012-05-10
Hi All,

I want to do a simple login form for an RMI application..I basically have a number of username/passwords in an excel file..i want the username/password inputted by the user to be checked against the values in the excel file..Problem is i dont know how to integrate the excel file into my class..Can someone please explain to me how to do this please / Point me in the direction of some useful tutorials..

PS Its a college assignment and excel files will do for data storage/retrieval (i.e i dont need to use a DB)
0
Comment
Question by:oggiemc
  • 2
  • 2
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 34232404
Get the values out of the spreadsheet first http://technojeeves.com/joomla/index.php/free/113-read-excel-spreadsheet-with-java then make a Credentials class. Have a List<Credentials> and check with something like
boolean validLogin = credentialsList.contains(new Credentials(username, password));

Open in new window

0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 34234490
you could use POI but its not really necessary in your case.

you can instead simply use jdbc to access the file
http://www.javaworld.com/javaworld/javaqa/2001-06/04-qa-0629-excel.html
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34234692
>>http://www.javaworld.com/javaworld/javaqa/2001-06/04-qa-0629-excel.html

Bear in mind that shows a platform-specific solution
0
 
LVL 92

Expert Comment

by:objects
ID: 34234745
> Bear in mind that shows a platform-specific solution

not really relevant here
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now