Solved

Username detection

Posted on 2003-11-30
6
249 Views
Last Modified: 2010-03-31
I want to be able to detect the name of a user running a java application. This will not be running via applet in a browser.

           Please post any help for me
0
Comment
Question by:JTWolfman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 9847818
try:

System.getProperty("user.name");

But you'll need to sign the applet.
0
 
LVL 92

Expert Comment

by:objects
ID: 9847863
0
 

Author Comment

by:JTWolfman
ID: 9848019
one more question, if you dont mind. How do i check if the username is a particular name?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 92

Expert Comment

by:objects
ID: 9848044
String username = System.getProperty("user.name");
if (username.equals("JTWolfman"))
{
   // do whatever
}
0
 

Author Comment

by:JTWolfman
ID: 9848154
thanks man, your a life saver
0
 
LVL 92

Expert Comment

by:objects
ID: 9848171
No worries, happy I could help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn different types of Android Layout and some basics of an Android App.
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:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

691 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