How to authonticate  in java and give privilages

i am trying to create an application in java using swings in netbeanIDE5 and oracle as beck-end .i have to design such a way that if the login is tutor then raise attendence button should be enabled else other login the frame should be displayed with raise attendence button disabled. kindly give guidence.

thanks fro ur suggestion but how do i match them in runtime ,i get the password in a encrypted format and i couldnot match them when enterd in a form.afret login frame the attendence button should be set in the next frame. kindly help
USER_NAME PASSWORD
test [C@4a5ab2         
new                  [C@c21495         
user                 [C@6e1408         
kannan               [C@c3c749         
user                 [C@1690726
ok i get the message a bit  i will try this logic and reply back
Message was edited by:
        request_arjun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to download Personal Java and how to run the application

    Hi,
    From java.sun.com, which file has to be downloaded for develpoing the application in personal java.
    How to run an application in peraonal java?
    If you give me the steps it will be more helpful to me.
    I couldn't find the samples for personal java anywhere?
    If you give me links for basic samples with source code such as hello world and small games, it will be more helpful to me.
    All of my doubts are very basic one.
    Please help me.
    Thanks in advance.
    Regards,
    Nagaraj.

    Sun has a beta implementation available for download (http://developer.java.sun.com/developer/earlyAccess/personaljava/) which will allow you to run Personal Java on a MIPS/SH3/StrongARM or XScale device running WindowsCE 2.0 or greater. You can also download the Personal Java Emulation environment (http://java.sun.com/products/personaljava/pj-emulation.html) which will allow you to develop and run personal java applications in a Windows or Solaris environment.
    Most JDK1.1.8 compliant applications will run on Personal Java, so a Hello World program would look like the regular.
    public static void main(String[] args) {
    System.out.println("Hello World");
    System.exit(0);
    You can also purchase a full blown commercial implementation of Personal Java for PocketPC at handango.com. Do a search on Insignia Jeode for Dell. You can use this on any PocketPC/XScale pda.
    To run a Personal Java program on Pocket PC. Deploy your jar to the Device and create a shortcut similar to this:
    50#"\program files\Java\bin\pjava.exe" -setcwd "\program files\Java\pjtest" -classpath "\program files\Java\pjtest\pjtest.jar" -file "pjtest.testmain.class"
    The number is arbitrary, but the paths need to point to the directory where you installed Personal java and your jar/application respectively.

  • Urgent!!!  How to pick  a  shape3D and give it a web link!!

    Hi,
    I'm new to java 3D.Can someone teach me how to pick a shape 3D and then give it a web link.
    I'll be delighted if someone send me some sample source code.
    This is urgent!! Please help!!
    Thanks.
    Chanax.

    There is a two part answer to your question:
    1. Detect when the object is picked
    -Detect when a mouse click is generated. When this happens, cast a ray from the mouse position to the scene graph to see if it 'picks' your desired object,
    - Make sure that pick reporting is enabled on ths shape you want picked, and on all nodes that are it's parent. Picking only works if all nodes from the base to the leaf are set to be pickable. More info on picking can be found here: http://java.sun.com/developer/onlineTraining/java3d/j3d_tutorial_ch4.pdf
    2. Launch the web browser (This is not java3d related)
    - Once you have confirmed that your shape was picked, you can open a web browser either using the System.exec() command (not very portable), or you could create a JTextPane and use Java's HTML features to display an HTML page directly. More on this at http://java.sun.com/docs/books/tutorial/uiswing/components/text.html

  • How to update base java and use same jbuilder

    hi,
    I use jdk 3.500.24.00 foundation and the default java version that comes along with jbuilder which is 1.2.2. However, i need to use the features of jdk.1.4 and so i need to update the base java version ie jbuilder 3.5 should be able to use 1.4 rather than 1.2. I will keep 1.2 during the transition from 1.2 to 1.4.
    Thanks
    Deepak

    Thanks Nasch!
    I did that allready the problem is it gives vm error cound not start vm. I even tried fiddling with bin/jdk.config, If i give the path for jdk1.4 it give vm error. however if i use the orginal setting which pin points to jdk1.2.2 it works.
    Now even though i have modified the path in default project setting in jbuilder i get the error if i change the setting in jdk.config to pin point to new path that would be jdk1.4. Any Idea why or how this can be solved?
    Derik

  • How create plugins in java and access then from the app

    How can I create plugins for a Java app. And how do I need in my app to access those plugins??

    Generally speaking, any sort of plugin is simply an implementation of some defined or set of defined interfaces that is loaded at runtime and invoked based on some event, configuration or other such mechanism. Java plugins can be implemented simply as .jar or individual classes that implement the interface(s). The application loads these (perhaps using separate, specifically defined class loaders) and is responsible for knowing how and when to invoke their method(s).
    The trick, of course, is defining the interfaces to be supported by the app and implemented by the plugin and to define a set of events, etc. that would cause these to be invoked. The mechanics of loading the classes, instatiating the instances as need, etc. is fairly basic Java programming.
    Chuck

  • How to update base java and use same jbuilder version

    hi,
    I use jbuilder 3.5, I need to use java1.4 but i dont know how to upgrade java while using the same jbuilder version.
    I tried changing the [prooject default properties such that the path pin[points to jdk1.4 it recognized this move and it automatically changed all the references upon specifying the home directory of jdk1.4. However, when i rename the jdk1.2.2 folder and then try to reload jbuilder it say vm error could not start vm.
    I need to remove 1.2.2 from my system and i want jbuilder to use 1.4 any ideas how this can be done.
    Thanks
    Derik
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I remember JBuilder 3.x had quite a few little bugs and memory leaks. But I do know it does let you change the jdk, unlike the later versions (which force you to pay for the non-'personal' versions to get this and many other features)
    Toi be honest, if it's giving you grief, I swop to eclipse, which doesn't even come with a java environment, so it's completely separate. And a far nicer tool as well. And it's free, open source, blah blah <more buzz-words go here>.

  • Power Shell Web Access - How to limit the cmdlets and give regular users, access to perform tasks

    It is possible to give to regular/standard users, powershell web access to give only, for example, "get-" cmdlets?
    The ideia is to provide help desk tech users, a minimum level of access on some servers, and it will be usefull to give then, basic and restrcted access to a few cmdlets, performe harmless activities and mybe some level of access, not alloweing to to using
    RDP, but PS, insted

    While PowerShell Web Access (PSWA) does require authorization rules to function, these rules do not specify what cmdlets can be used in a PSRemoting session. The PSWA authorization rules define what user, or group of users, can remotely connect to what computer,
    or group of computers, through the PSWA gateway (the PSWA server).
    What you need to research are session configurations and/or endpoints. These are separate from PSWA, but can be used in conjunction with PSWA (PSWA website > Optional connection settings > Configuration >
    NameOfConfiguration), just as they can in a standard console-based PSRemoting session (Enter-PSSession -ComputerName
    server01 -Configuration NameOfConfiguration -or- Invoke-Command -ComputerName
    server01 -Configuration NameOfConfiguration).
    Start your research with New-PSSessionConfigurationFile and then Register- and Unregister-PSSessionConfiguration. These have been great for our environment, allowing non-admin users access to run very specific cmdlets as an admin, without being an admin
    on the computer.

  • How to save a jpg and give it a label automatically

    Hi guys. I've found myself regularly repeating a set of actions and I was wondering if there was some way of automating them using CS4. The scenario is that I use Bridge as my main photo organisation app. I rate my shots from 1-5 stars and then tend to double click on ones to edit them in PS. After saving the edited shot as a jpg with "_edited" added to the filename, I apply a label which is called 'Enhanced' and then apply a 'Original' label to the original jpg. This lets me immediately filter of my edited/enhanced shots in Bridge and locate the originals if I need them. It also makes the edited files stand out when looked at in a file view of Explorer etc .
    Is there an action or script I can create so that when I've finished editing a jpg it will take the original file name, add "_edited", save it as quality 10, baseline optimised, then apply the 'Optimised' label to the new file and exit the original jpg without saving but with applying the 'Original" label?
    Any advice would be much appreciated. Thanks.

    I have modified the function slightly, could you try this version please?
    #target photoshop
    if (!BridgeTalk.isRunning("bridge")) BridgeTalk.launch("bridge");
    if(documents.length >0){
    var originalFile = activeDocument.fullName.fsName;
    var saveFile = activeDocument.fullName.fsName.slice(0,-4)+"_edited.jpg";
    SaveJPEG(saveFile, 10);
    activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    labelPic(originalFile,"Original");
    labelPic(saveFile,"Enhanced");
    function labelPic(file,tag) {
       var bt = new BridgeTalk;
       bt.target = "bridge";
       var myScript = "";
       myScript += "var file = new Thumbnail(\'"+file+"\');";
       myScript += "var md = file.synchronousMetadata;";
       myScript += "md.namespace = \"http://ns.adobe.com/xap/1.0/\";";
       myScript +="md.Label = \'"+ tag +"\';";
       bt.body = myScript;
       bt.send();
    function SaveJPEG(saveFile, jpegQuality){
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = jpegQuality; //1-12
    activeDocument.saveAs(new File(saveFile), jpgSaveOptions, true,Extension.LOWERCASE);

  • Save the file and give date & time stamp

    1. Reading the Excel file from the selection screen as a parameter.
    2. Using F.M. ALSM_EXCEL_TO_INTERNAL_TABLE reading Excel file into
        Internal table.
    3. Implementing the Business Logic.
    4. Move output to Final Internal table.
    5. Final internal table should generate a Flat file. By using GUI_DOWNLOAD.
    6. That flat file should be saved with the name and location given in the Excel.
    7. When ever I run the program output file will generate in the same location but with date and time stamp. Because I’m running the program for range of employees say initially I run for 1 – 10,000 employees next 10,001- 20,000 like that.
    Whenever I run for 2nd time it will overwrite the previous output, that’s the reason I’m using date and time stamp.
    Eg:
    PERSONAL Numbers              Name                                         Location
    00000001                 xxxxx-24.04.2007-10.30          C:\        
    00000002                 xxxxx-24.04.2007-10.35
    00000003                 xxxxx-25.04.2007-10.40
    00000004                                  xxxxx-25.04.2007-10.30
    Can any one help me how to save the file and give date & time stamp through hardcode?
    please help me in this issue.

    I am not clear with your problem. Based on the understanding of your question,
    there  can be two cases.
    1- U want to insert time stamp in the output file.
    2- Time stamp is already there, u just have to solve the overwriting issue.
    If your question goes with option 2, You can make use of import parameters
    <b>CONFIRM_OVERWRITE</b> : Which will ask for confirmation before overwriting.
    <b>APPEND</b> : which you can choose either to append the data to the existing file or overwrite it.
    Please inform if the issue is not resolved.
    Message was edited by:
            BINU RAJ BINU

  • How to relate java and Oracle

    i have to tried to make programs using java and oracle. if i give the values in the 'insert' statement it is getting updated in the original table in oracle but how to take the values from the text fields of java and insert into the tables in oracle. do we have any methods to convert the values into sql type. pl reply.

    Here is a sample of a Java program that uses JDBC and a PreparedStatement. This particular program does a select, but you can also use this for inserts. I'm not 100% this is what you are looking for, but if it isn't just let me know. I'll help if I can.
    Joel
    For inserts, just replace this code:
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
      System.out.println(rs.getInt(rs.findColumn("CNT")));
    }with this code (and obviously change the Select string to an Insert String):
    int rowcnt = ps.executeUpdate();Here is the whole program:
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class dbtest {
        public static void main(String args[]) throws SQLException {
            try {
                String timeString = new String("2000-11-01 23:59:59");
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
                java.util.Date date = format.parse(timeString);
                Timestamp timestamp = new Timestamp(date.getTime());
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn =
                    DriverManager.getConnection(
                        "jdbc:oracle:thin:@riker:1521:mydb",
                        "myusername",
                        "mypassword");
                String sql =
                    "SELECT COUNT(*) CNT FROM SERVICE_ALARM "
                        + "WHERE TRANS_STREAM_NODE_ID = ? "
                        + "AND SERVICE_ID = ? "
                        + "AND ALARM_ID = ? "
                        + "AND RAISED > TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, "ROW1");
                ps.setInt(2, 1);
                ps.setString(3, "ROW1");
                String myDate =
                    timestamp.toString().substring(0, timestamp.toString().length() - 2);
                System.out.println("myDate=(" + myDate + ")");
                ps.setString(4, myDate);
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    System.out.println(rs.getInt(rs.findColumn("CNT")));
                rs.close();
                ps.close();
            } catch (Exception e) {
                System.out.println("Java Exception caught, error message=" + e.getMessage());
    }

  • Please help how to run System commands and batch files thru java program

    Sir,
    I want execute OS commands like dir,cls..etc and batch files,.exe filesthru java program.
    I have tried it sofar thru Runtime.getRuntime().exec("execute.bat");
    but it is not working.anybody knows about how to run the system commands thru java please give me the code.
    thank you,
    regards,
    j.mouli

    I've seen other posts with this questions, and answers. Unfortunately I didn't pay much attention. But the basic idea is to exec command.com and pass the specifc batch or command as an argument.

  • How to call a java program in javafx class(Urgent) and even vice versa

    Hi all,
    Here I have two questions:
    1)
    Please let me know how to call a javafx in java program...
    I tried with the following code but it is not working..
    The below is the java program in which I made a call to the Fx program.
    FxMainLauncher.java
    import net.java.javafx.FXShell;
    public class FxMainLauncher {
    public static void main(String[] args) throws Exception {
    FXShell.main(new String[] {"HelloWorld.fx"});
    2) How to call a java program in javafx class
    Here is my javafx program
    import check.*;
    import javafx.ui.*
    var instance = new MyJava();
    //visible:true
    System.out.println("Number is: {instance}");
    Here is my java program
    public class MyJava {
    public static void main(String args[])
    System.out.println("JAVAFX TO JAVA");
    Even this is not working please let me know ASAP
    Thanks in advance,
    V.Srilakshmi

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

  • How to link java and VB

    hi,
    I have two chat programs written in java and VB.Now i have to chat from the web to the VB application.i need ur ideas of how to do this???if i send a message from client side of the java program i need to get the message in the vb client....how to do this??..Please give ur ideas and suggestions....and it would be a great help if u explain with sample codings.....
    Thanks in advance..
    PadmaPriya.

    Try HTTP requests. Or if you want to do cutting edge stuff try SOAP. Don't have any sample code though.

  • Java and XML How to

    Ok im am Fairly new to Java and want to know how to use XML with my Java Applecation can some one help me out withi this ?

    I have seen that can someone give me a project or some place that explains it Better ?

  • I installed the latest version of Firefox last night. It worked 3-4 times flawlessly. Now, it crashes at startup and gives me a box with crash detail report. How can I fix this?

    I have a brand new HP dv8t laptop that is straight from the manufacturer 2 days ago.
    Last night, I attempted to download and installed the latest version of Firefox. After installing, it worked great for an hour or so (3.4 different sessions).
    Then, this morning when I came back to the computer, Firefox crashes at startup and gives me the option of finding a solution online or quitting the program.
    How aggravating!
    I have installed this same version on 2 other computers that I own, without any issue.
    I have attempted to uninstall Firefox from the dv8 and reinstalling, to no avail.
    I cannot find the crash report, but I do this see this message once the app crashes:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: firefox.exe
    Application Version: 1.9.0.3399
    Application Timestamp: 49f1091d
    Fault Module Name: StackHash_5701
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Code: 4000001f
    Exception Offset: 046b75ba
    OS Version: 6.1.7600.2.0.0.768.3
    Locale ID: 1033
    Additional Information 1: 5701
    Additional Information 2: 5701071bdc29491833a7ab96965d1870
    Additional Information 3: c8d0
    Additional Information 4: c8d0e80632ad4cc967a76f7e9c35ca44
    Please help! I cant stand iE anymore and I'm so lost without Firefox!

    You might try using the add-on 'NoSquint' which allows numerous zoom options specific to each page you visit & keeps your settings - https://addons.mozilla.org/en-US/firefox/addon/nosquint/
    If you want to go back to 3.6x, you will find it here:
    http://www.mozilla.com/en-US/firefox/all-older.html
    In most cases you can simply "upgrade" (meaning downgrade) directly from the installation. It would be a good idea to save your passwords & bookmarks just to be on the safe side.

Maybe you are looking for

  • Home Sharing on Apple TV - Stupid Fix.

    Here is the stupidest fix I have ever come accross. I have two MacBook Pro 13" i5s, a 17" i5, a Mac Mini Server i5, and a 27" iMac i5. I use the Mac Mini and iMac for my iTunes Home Sharing. I have three Apple TVs version 2 running 6.1.1 @ 720P and t

  • Save Error in Photoshop cs6

    Hi there, I just upgraded from CS5 to CS6 and for the most part love it. I have run into a very serious problem when it comes to saving. I am on Mac 10.6.8 and have a server that I save all my files too. In CS6 anytime I try to save something to the

  • Network shared variables reconnecting network dropout

    I've got a cRIO unit communicating with a Laptop using Network Shared Variables, with one of them being a 21 index array that is buffered. The system connects and communicates fine, but occassionally the wireless card in the laptop is losing the sign

  • Removing Creative Cloud from startup

    I purchased Lightroom and Photoshop but don't use them everyday, so I don't need Creative Cloud to start up every time I log into my computer, but it does. On my iMac (Yosemite) I can see the following in Activity Monitor: Creative Cloud Adobe CEF he

  • Serious AVI media and MPG-2 file problem!!!  Someone?

    I have been working on a student video for a while now, and I decided to update my Quicktime files. Before, the project played back fine with the MPG2 and avi files I created, now FCP can't render the movies that had once accepted it! I tried deletin