Help, Can't compile !

I can compile simple classes that do not have objects of my own classes in them, however when I create my own classes and use them as objects the compiler fails to recognize these classes exist in the same directory giving me that "class blahblah not found". This is true even when using an API that asks for the source directory. My other computer works fine, and this one is set up the same with the exception that this one has two OS on it(Win 2000 & WinME).
Any ideas or thoughts?

What is the value of your classpath, then?
All I know that when seeing a problem like that the fundamental cause has always been a wrong class path...
So if you place these two classes in the same directory, in different source files, and then compile from that directory with "javac -classpath . One.java", you get an error message? What is it like?
public class One {
Two t;
public class Two {
}

Similar Messages

  • Newbie needs help can't compile an Oracle form 10g

    I am trying to compile a form in Oracle 10G. in the /u01/dba/oracle/product/1012ias/bin directory there is a script called frmcmp.sh which I assume is the correct script to use. It calls the frmcmp executable (it does mean form compile, right?). anway I get the error
    FRM-91500: Unable to start/complete the build.
    This is on a HPUX machine running HPUX 11.11.
    I am having no success trying to search for an answer on the Oracle site and all the documentation I have looked at so far fail to address the issue.
    I hate being a newbie!
    Thanks
    Harold

    for this you need Xwindow session, if dont, you can make it command line by running it like.
    * frmcmp.sh USERID=manager/manager@dbname MODULE_TYPE=form MODULE=form.fmb*
    Greetings

  • I can't compile in WindowsXP? =(

    Hello everyone,
    I upgraded my PC to WindowsXP, but when I try to compile my java progs in the command prompt, I get the following error:
    ' javac' is not recognized as an internal or external command, operable program or batch file.
    Can anyone help me with this problem, cause I can't compile java programs anymore =(

    Because I'm new to Java, does anyone happen to know where I can get a bytecode compiler so I can make programs that run with .exe (Like every commercial program out there? Or is there no solution to that?<You got your terminology wrong. "javac" is a bytecode compiler. It converts java source into "bytecodes" that run on a "Virtual Machine". To create an "exe" you must have a "native" compiler. There are a few available, the good ones are commercial and cost a lot of money. It also turns out that Sun's server VM (default in 1.4 now) is faster then some of these pricey native compilers in many situations. This is because modern VM's use JIT's or "Just In Time" compilers to create native code on the fly.
    My advice to you is this. Use one of the many nice deployment methods available for java before you start to worry about native compilation. "executable jars", Java Web Start, bootstrap launching programs... all are good options.

  • I can't compile applets

    Hi. I am very new to JAVA. (I just downloaded the compiler last night.)
    I really need help. It seems anything that is suposed to be an applet, I can't compile. I can't even compile the example applet for the "Hello World!" program in the "First Cup of Java" section!!!
    I've followed the instructions as I'm told, and keep getting this:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
    I can however compile applications. WHAT IS GOING ON!
    Please help me.
    ~Bewildered

    Hi - I just learning Java and think I can help (at least i'll try).
    Save all you work on your desktop:
    Start Notepad
    type the following:
    Programmer: Type Your Name
    Date: Type whatever date it is
    Program: Simply Type the item in between brackets, without brackets: (Test1)
    import java.applet.*;
    import java.awt.*;
    public class Test1Applet extends Applet
    public void paint(Graphics g)
    g.drawString("I hope I get an applet on my screen!",15, 30);
    ...And Save As: Test1Applet.java - MAKE SURE YOUR ON YOUR DESKTOP
    Then go to File, New (Still using the Notepad application).
    Type:
    <Applet Code = "Test1Applet.java" Width = 400 Height = 200>
    </Applet>
    Then Save As: Test1Applet.html - MAKE SURE YOUR ON YOUR DESKTOP
    Finally go to the console mode... otherwise known as the Command Prompt. You can go to Start Button on the statusbar click on "Run", type cmd and hit enter.
    Once there you need to type: path = OK...At this time you must locate the complete path/drive where you downloaded the Java packages. Once you locate the entire drive (exam: c:\jbuilder3\java\bin) you must type in: path = drive you put the jbuilder,etc, etc in and hit enter.
    You shouldn't see anything, but just another line waiting for you to enter something. That something you must type is: javac
    Javac tell the os to call on Java language. You know get ready to compile. You'll then see a whole bunch of stuff, don't worry it simply computer veribage.
    If no errors have occurred you then type:cd and drag and drop one of the files you saved to the desktop. Before you hit the enter key make sure to remove the file name and then hit enter.
    Then you must type: javac Test1Applet.java and hit enter
    Finally you must type: appletviewer Test1Applet.html and hit enter.
    You should get an applet on your computer. Let me know how it turns out or whether I confused you even more.

  • Can't compile hlp

    I just tried to compile my project (using RH 4x)... and i'm
    getting a list of errors:
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Warnock Pro Light Caption Baltic" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Warnock Pro Light Display Baltic" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Warnock Pro Light Subhead Baltic" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Caflisch Script Pro Regular Greek" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Caflisch Script Pro Regular Baltic" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Microsoft Sans Serif (Vietnamese)" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Franklin Gothic Demi Cond Baltic" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Franklin Gothic Medium Cond Greek" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Franklin Gothic Medium Cond Baltic" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Gill Sans MT Ext Condensed Bold CE" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Gill Sans Ultra Bold Condensed CE" is longer
    than 31 characters.
    HC3096: Warning: topic #1 of vmmi_online help.rtf :
    The font name "Tw Cen MT Condensed Extra Bold CE" is longer
    than 31 characters.
    I assume these are why i can't compile... I don't find these
    fonts in the list of styles i have used... how do i find if these
    have been utilized? What are my options for fixing this issue? and
    why suddenly is this happening... I had no such problem last year
    when I compiled this same file.
    Thanks,
    kb

    Today, I discovered that creating a whole new RH for Word
    project is an unnecessary step. I did the following, and it fixed
    the error of any fonts being marked as "longer than 31 characters"
    by the WinHelp compiler.
    1. Just in case, I made a backup copy of the offending source
    doc(s) somewhere else on my PC.
    2. In the RH Explorer window, I deleted the offending source
    doc(s) from the RH for Word project.
    3. I performed
    File > Import > Document
    to reimport the offending source doc(s).
    4. I made a change to the reimported source doc(s), and then
    I saved this change. If I later want to back out this change, it
    must be deleted out, NOT backspaced out. This means your cursor
    must be moved to another location in the source doc before you
    remove the change.
    For example, I add my own initials somewhere in the source
    doc, save the source doc, and then I move my cursor to the
    beginning of my initials, and use the Delete key (NOT the Backspace
    key) to remove my initials from the source doc. Of course, at this
    point, I save once more.
    5. I recompiled, and checked the Error Wizard log to be sure
    the problem is fixed.

  • Intel-hda no sound out of speakers. Can't compile alsa cvs. 1420n Dell

    Hello!
          I'm somewhat new to Archlinux. I am trying to get my intel-hda card to work. I have a Dell inspiron 1420n laptop. Sound will come out of speakers if I plug them into the front headphone jack, but will not come out of the built in speakers on the laptop. I found this forum thread http://bbs.archlinux.org/viewtopic.php?id=34420 and they seemed to have fixed the problem, but I can't compile alsa. The drivers compiled fine, but alsa-lib will not. I get the following errors:
    python.c:962: error: 'struct python_priv' has no member named 'py_mdict'
    python.c:962: warning: implicit declaration of function 'PyModule_GetDict'
    python.c:963: warning: implicit declaration of function 'PyString_FromString'
    python.c:965: warning: implicit declaration of function 'PyDict_SetItemString'
    python.c:972: warning: implicit declaration of function 'PyModule_AddObject'
    python.c:972: error: expected expression before ')' token
    python.c:973: error: expected expression before ')' token
    python.c:984: error: 'struct python_priv' has no member named 'py_mixer'
    python.c:991: warning: implicit declaration of function 'PyRun_FileEx'
    python.c:991: error: 'Py_file_input' undeclared (first use in this function)
    python.c:995: error: 'struct python_priv' has no member named 'py_event_func'
    python.c:996: error: 'struct python_priv' has no member named 'py_event_func'
    make[3]: *** [python.lo] Error 1
    make[3]: Leaving directory `/home/kevin/alsacvs/alsa-lib/modules/mixer/simple'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/kevin/alsacvs/alsa-lib/modules/mixer'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/kevin/alsacvs/alsa-lib/modules'
    make: *** [all-recursive] Error 1
    I tried finding out if I was missing a python library, but I can't seem to find out any information anywhere. Please help me I love this distro! Everything is all setup besides this pesky audio problem BTW I am in the audio group. Thanks!!

    Yeah your right, it very much is. Well, this lappy is the one of the models Dell are selling pre-installed with Ubuntu. I ditched Ubuntu for Arch because I liked it so much on my desktop computer I replaced with this laptop. But in Ubuntu the sound did work (although poor quality). The only thing I had to configure was the video acceleration because it seems all distros don't have support for the i965 (X3100 graphics) chipset yet (got it in Arch with testing packages). Sabayon is the only one I found that claims to support it fully, but I want to use arch. I know my problem can be fixed easily. Everyone else has fixed it, but I think I'm missing something small...

  • How can i compile the program?

    hi,everybody:
    I have a program which include the next statments:
    public void println(boolean flag)
    throws IOException
    Object obj = lock;
    obj;
    JVM INSTR monitorenter ;
    print(flag);
    newLine();
    obj;
    JVM INSTR monitorexit ;
    break MISSING_BLOCK_LABEL_26;
    Exception exception;
    exception;
    obj;
    JVM INSTR monitorexit ;
    throw exception;
    how can i compile the program?
    thanks

    Hi,
    I'm trying to figure out how to use this decompiler, I have downloaded it to windows 2000 platform and it unzips to 1 file with extension "1-bin" - OS doesn.'t know what to do with and neither do I ;) - I'm starting out on something here and this tool would be useful.
    Thanks for any install instructions you might have.
    mufc1999
    Hi,
    I've had a similiar problem with decompiling certain
    classes. Try the following decompiler,
    http://jrevpro.sourceforge.net, after using this one,
    the code decompiled fine, this tool is also a
    disassembler and quite a nifty one i might add. :)
    Hope this helps!
    Have Fun!

  • How can I compile Javascript from Java??

    Hi all,
    I am facing a problem, problem is I have to compile JavaScript code in Java. JavaScript code will given in Text field, those code i have to compile and i should display a message saying this is valid Java script code or Invalid code.Can anyone help on this...

    JavaScript code interpreting but not compiling... I need to compile, but not Interpret the code. How can i Compile the JavaScript Code...

  • Can't compile with QT4 anymore

    Hi,
    Since last upgrade I can't compile my qt4 apps with KDevelop or QDevelop. It says something like :
    make: *** No rules to build target « /opt/qt4/mkspecs/linux-g++/qmake.conf », required by « Makefile ». Stopping.
    The qt-config tool does not exist anymore. There is a qtconfig one but, doesn't seem to be helping.
    I know that the files in the the qt4 package have been moved from /opt/qt4 to /usr/, but still I don't know what to do.
    I'm stuck !

    The fact is I cannot compile ANYTHING in QT4 !
    Let's take an example. I want to compile QPaddy (you can find it on qt-apps.org).
    I set the vars (which doesn't seem to have any effect):
    export QTDIR=/usr/share/qt4
    export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++
    export QT_LIBRARY_PATH=/usr/include/Qt
    I try to compile QPAddy :
    qmake qpaddy.pro
    make
    Here is what I get :
    cd src/ && make -f Makefile
    make[1]: entrant dans le répertoire « /root/docs/qpaddy0876/src »
    make[1]: *** Pas de règle pour fabriquer la cible « /usr/lib/qt-3.3/mkspecs/default/qmake.conf », nécessaire pour « Makefile ». Arrêt.
    make[1]: quittant le répertoire « /root/docs/qpaddy0876/src »
    make: *** [sub-src-make_default] Erreur 2
    And now the MakeFile :
    # Makefile for building: qpaddy
    # Generated by qmake (2.01a) (Qt 4.3.2) on: mar. nov. 6 17:49:17 2007
    # Project:  qpaddy.pro
    # Template: subdirs
    # Command: /usr/bin/qmake -unix -o Makefile qpaddy.pro
    first: make_default
    MAKEFILE      = Makefile
    QMAKE         = /usr/bin/qmake
    DEL_FILE      = rm -f
    CHK_DIR_EXISTS= test -d
    MKDIR         = mkdir -p
    COPY          = cp -f
    COPY_FILE     = $(COPY)
    COPY_DIR      = $(COPY) -r
    INSTALL_FILE  = install -m 644 -p
    INSTALL_PROGRAM = install -m 755 -p
    INSTALL_DIR   = $(COPY_DIR)
    DEL_FILE      = rm -f
    SYMLINK       = ln -sf
    DEL_DIR       = rmdir
    MOVE          = mv -f
    CHK_DIR_EXISTS= test -d
    MKDIR         = mkdir -p
    SUBTARGETS    =  \
            sub-src
    src//$(MAKEFILE):
        @$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
        cd src/ && $(QMAKE) src.pro -unix -o $(MAKEFILE)
    sub-src-qmake_all:  FORCE
        @$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
        cd src/ && $(QMAKE) src.pro -unix -o $(MAKEFILE)
    sub-src: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE)
    sub-src-make_default: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE)
    sub-src-make_first: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE) first
    sub-src-all: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE) all
    sub-src-clean: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE) clean
    sub-src-distclean: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE) distclean
    sub-src-install_subtargets: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE) install
    sub-src-uninstall_subtargets: src//$(MAKEFILE) FORCE
        cd src/ && $(MAKE) -f $(MAKEFILE) uninstall
    Makefile: qpaddy.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
            /usr/share/qt4/mkspecs/common/unix.conf \
            /usr/share/qt4/mkspecs/common/linux.conf \
            /usr/share/qt4/mkspecs/qconfig.pri \
            /usr/share/qt4/mkspecs/features/qt_functions.prf \
            /usr/share/qt4/mkspecs/features/qt_config.prf \
            /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
            /usr/share/qt4/mkspecs/features/default_pre.prf \
            /usr/share/qt4/mkspecs/features/release.prf \
            /usr/share/qt4/mkspecs/features/default_post.prf \
            /usr/share/qt4/mkspecs/features/qt.prf \
            /usr/share/qt4/mkspecs/features/unix/thread.prf \
            /usr/share/qt4/mkspecs/features/moc.prf \
            /usr/share/qt4/mkspecs/features/warn_on.prf \
            /usr/share/qt4/mkspecs/features/resources.prf \
            /usr/share/qt4/mkspecs/features/uic.prf \
            /usr/share/qt4/mkspecs/features/yacc.prf \
            /usr/share/qt4/mkspecs/features/lex.prf
        $(QMAKE) -unix -o Makefile qpaddy.pro
    /usr/share/qt4/mkspecs/common/g++.conf:
    /usr/share/qt4/mkspecs/common/unix.conf:
    /usr/share/qt4/mkspecs/common/linux.conf:
    /usr/share/qt4/mkspecs/qconfig.pri:
    /usr/share/qt4/mkspecs/features/qt_functions.prf:
    /usr/share/qt4/mkspecs/features/qt_config.prf:
    /usr/share/qt4/mkspecs/features/exclusive_builds.prf:
    /usr/share/qt4/mkspecs/features/default_pre.prf:
    /usr/share/qt4/mkspecs/features/release.prf:
    /usr/share/qt4/mkspecs/features/default_post.prf:
    /usr/share/qt4/mkspecs/features/qt.prf:
    /usr/share/qt4/mkspecs/features/unix/thread.prf:
    /usr/share/qt4/mkspecs/features/moc.prf:
    /usr/share/qt4/mkspecs/features/warn_on.prf:
    /usr/share/qt4/mkspecs/features/resources.prf:
    /usr/share/qt4/mkspecs/features/uic.prf:
    /usr/share/qt4/mkspecs/features/yacc.prf:
    /usr/share/qt4/mkspecs/features/lex.prf:
    qmake: qmake_all FORCE
        @$(QMAKE) -unix -o Makefile qpaddy.pro
    qmake_all: sub-src-qmake_all FORCE
    make_default: sub-src-make_default FORCE
    make_first: sub-src-make_first FORCE
    all: sub-src-all FORCE
    clean: sub-src-clean FORCE
    distclean: sub-src-distclean FORCE
        -$(DEL_FILE) Makefile
    install_subtargets: sub-src-install_subtargets FORCE
    uninstall_subtargets: sub-src-uninstall_subtargets FORCE
    mocclean: compiler_moc_header_clean compiler_moc_source_clean
    mocables: compiler_moc_header_make_all compiler_moc_source_make_all
    install: install_subtargets  FORCE
    uninstall:  uninstall_subtargets FORCE
    FORCE:
    Any idea ?

  • How can I compile?

    Hy,
    I need your help, I cannot compile my programms. I installed jdk1.3.1_01 and set the path (c:\jdk1.3.1_01\bin) but it doesn't work. I don't know why. Can you please help me?

    so your shell is probably just picking up a java command from the WINDOWS directory. Try to execute java -version. I assume this will not be the version you have installed. It's probably just your PATH. You can see its current setting by typing either just SET for the whole environment or echo %PATH% for just your PATH.

  • Can's compile the gdbm program ?(SOLVED)

    Here is an example comes from Beginning Linux Programming 3rd ,and I can't compile it on my machine. I don't know why?? And the gdbm package is always in the base. Please help me.
    try compile 1:
    $gcc dbm1.c -o gdbm1 -lgdbm
    错误信息:
    /tmp/cc2vMknU.o: In function `main':
    dbm1.c: (.text+0x2d): undefined reference to `dbm_open'
    dbm1.c: (.text+0x244): undefined reference to `dbm_store'
    dbm1.c: (.text+0x2ee): undefined reference to `dbm_fetch'
    dbm1.c: (.text+0x379): undefined reference to `dbm_close'
    collect2: ld returned 1 exit status
    try compile 2:
    $ gcc dbm1.c -o gdbm1 -lndbm -L/usr/lib
    错误信息:
    /usr/bin/ld: cannot find -lndbm
    collect2: ld returned 1 exit status
    #include <unistd.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <fcntl.h>
    #include <ndbm.h>
    #include <string.h>
    #define TEST_DB_FILE "/tmp/dbm1_test"
    #define ITEMS_USED 3
    /* A struct to use to test dbm */
    struct test_data {
    char misc_chars[15];
    int any_integer;
    char more_chars[21];
    int main() {
    struct test_data items_to_store[ITEMS_USED];
    struct test_data item_retrieved;
    char key_to_use[20];
    int i, result;
    datum key_datum;
    datum data_datum;
    DBM *dbm_ptr;
    dbm_ptr = dbm_open(TEST_DB_FILE, O_RDWR | O_CREAT, 0666);
    if (!dbm_ptr) {
    fprintf(stderr, "Failed to open database\n");
    exit(EXIT_FAILURE);
    /* put some data in the structures */
    memset(items_to_store, '\0', sizeof(items_to_store));
    strcpy(items_to_store[0].misc_chars, "First!");
    items_to_store[0].any_integer = 47;
    strcpy(items_to_store[0].more_chars, "foo");
    strcpy(items_to_store[1].misc_chars, "bar");
    items_to_store[1].any_integer = 13;
    strcpy(items_to_store[1].more_chars, "unlucky?");
    strcpy(items_to_store[2].misc_chars, "Third");
    items_to_store[2].any_integer = 3;
    strcpy(items_to_store[2].more_chars, "baz");
    for (i = 0; i < ITEMS_USED; i++) {
    /* build a key to use */
    sprintf(key_to_use, "%c%c%d",
    items_to_store[i].misc_chars[0],
    items_to_store[i].more_chars[0],
    items_to_store[i].any_integer);
    /* build the key datum strcture */
    key_datum.dptr = (void *)key_to_use;
    key_datum.dsize = strlen(key_to_use);
    data_datum.dptr = (void *)&items_to_store[i];
    data_datum.dsize = sizeof(struct test_data);
    result = dbm_store(dbm_ptr, key_datum, data_datum, DBM_REPLACE);
    if (result != 0) {
    fprintf(stderr, "dbm_store failed on key %s\n", key_to_use);
    exit(2);
    } /* for */
    /* now try and retrieve some data */
    sprintf(key_to_use, "bu%d", 13); /* this is the key for the second item */
    key_datum.dptr = key_to_use;
    key_datum.dsize = strlen(key_to_use);
    data_datum = dbm_fetch(dbm_ptr, key_datum);
    if (data_datum.dptr) {
    printf("Data retrieved\n");
    memcpy(&item_retrieved, data_datum.dptr, data_datum.dsize);
    printf("Retrieved item - %s %d %s\n",
    item_retrieved.misc_chars,
    item_retrieved.any_integer,
    item_retrieved.more_chars);
    else {
    printf("No data found for key %s\n", key_to_use);
    dbm_close(dbm_ptr);
    exit(EXIT_SUCCESS);
    Last edited by 009lin (2007-08-19 02:29:54)

    GDBM includes dbm and ndbm compatability.
    I found the solution from the man page, it said:
    If you wish to use the dbm or ndbm  compatibility  routines,  you  must
           link in the gdbm_compat library as well.  For example:
                gcc -o prog proc.c -lgdbm -lgdbm_compat
    Last edited by 009lin (2007-08-19 02:29:27)

  • Can't Compile JavaBeans

    hi everyone...can you please help me in comliping my package...there's this error that i don't understand...
    here is my add_user.jsp where it all begins...
    <jsp:useBean id="Users" class="ris.Users"/>
    <%
         name = (request.getParameter("name") == null) ? "" : request.getParameter("name");
         if(request.getParameter("create") != null) {
              if(Users.checkReg(name, workgroup_id)) {
    %>
                   <jsp:setProperty name="Users" property="name"/>
                   <jsp:setProperty name="Users" property="password"/>
                   <jsp:setProperty name="Users" property="workgroup_id"/>
                   <jsp:setProperty name="Users" property="dworklist"/>
                   <jsp:setProperty name="Users" property="dforms"/>
                   <jsp:setProperty name="Users" property="printer"/>
    <%
                   if(Users.createUser()) {
                        Users.getUser(name, workgroup_id);
                        session.setAttribute("user_id", Users.getUserid());
                        session.setAttribute("workgroup_id", Users.getWorkgroupID());               
    %>
              <%           
                   else {
                        request.setAttribute("create", "Error - unsuccessful");
              else {
                   request.setAttribute("create", "Error - created");
         if(request.getAttribute("create") != null) {
              if(request.getAttribute("create").equals("Error - unsuccessful"))
                   message = "Could not add user. Please try again";
              if(request.getAttribute("create").equals("Error - registered"))
                   message = "The name and user type you selected has been already in created.";
              request.removeAttribute("create");
    %>
    <html>
    <body>
    <%= message %>
    <form action ="add_user.jsp" method ="POST">
    Name: <input type = "text" name="name" size=5><br>
    Password: <input type = "password" name="password" size=5><br>
    Confirm Password: <input type = "password" name="cpassword" size=5><br>
    User Type:
    <select name="workgroup_id">
    <option value="x" selected="Selected">Select User Type</option>
    <option value="1">Physician</option>
    <option value="2">Scheduler</option>
    <option value="3">Clerk</option>
    <option value="4">Technologist</option>
    <option value="5">Radiologist</option>
    <option value="6">Transcriptionist</option>
    </select><br>
    Default Worklist: <input type = "text" name="dworklist" size=5><br>
    Default Forms: <input type = "text" name="dforms" size=5><br>
    Printer: <input type = "text" name="printer" size=5><br>
    <br>
    <br>
    <input name="create" type = "submit" value="Submit">
    <input type = "reset" value="Clear">
    </form>
    </body>
    </html>and here is my Users.java which i can't compile..
    package ris;
    import java.sql.*;
    import java.util.*;
    public class Users {
         private int user_id, workgroup_id;
         private String name, password, dworklist, dforms, printer;
         public int getUserid() {
              return user_id;
         public void setUserid(int user_id) {
              this.user_id = user_id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public int getPassword() {
              return user_id;
         public void setPassword(String password) {
              this.password = password;
         public int getWorkgroupID() {
              return workgroup_id;
         public void setWorkgroupID(int workgroup_id) {
              this.workgroup_id = workgroup_id;
         public String getDWorklist() {
              return dworklist;
         public void setDWorklist(String dworklist) {
              this.dworklist = dworklist;
         public String getDForms() {
              return dforms;
         public void setDForms(String dforms) {
              this.dforms = dforms;
         public String getPrinter() {
              return printer;
         public void setPrinter(String printer) {
              this.printer = printer;
         public boolean checkReg(String name, int workgroup_id) {
                   String query = "SELECT User_ID FROM users WHERE [Name]='" + name + "' AND [Workgroup_ID]='" + workgroup_id + "'";
              try {
                   String driver = "org.gjt.mm.mysql.Driver";
                   Class.forName(driver).newInstance();
                   String url="jdbc:mysql://localhost/ris?user=root&password=restricted";
                   Connection con=DriverManager.getConnection(url);
                   Statement stat = con.createStatement();
                   ResultSet rst = stat.executeQuery(query);
                   if(rst.next() == false) {
                        con.close();
                        return true;
                   else {
                        con.close();
                        return false;
              catch(Exception e) {
                   e.printStackTrace();
                   return false;
         public boolean createUser() {
              user_id = (int) (1000 + Math.random()* 1000);
              dworklist = "";
              workgroup_id = (int)
              name = "";
              password = "";
              dforms = "";
              printer = "";
              String query = "INSERT INTO users (User_ID, [Name], [Password], [Workgroup_ID], [Default_Worklist], [Default_Forms], [Printer_Assignment]) " +
                                  "VALUES (" + user_id + ", " +
                                  "'" + name + "', " +
                                  "'" + password + "', " +
                                  "'" + workgroup_id + "', " +
                                  "'" + dworklist + "', " +
                                  "'" + dforms + "', " +
                                  "'" + printer + "')";
              try {
                   String driver = "org.gjt.mm.mysql.Driver";
                   Class.forName(driver).newInstance();
                   String url="jdbc:mysql://localhost/ris?user=root&password=restricted";
                   Connection con=DriverManager.getConnection(url);
                   Statement stat = con.createStatement();
                   stat.execute(query);
                   con.close();
                   return true;
              catch(Exception e) {
                   e.printStackTrace();
                   return false;
         public boolean getUser(String name, int workgroup_id) {
              String query = "SELECT * FROM users WHERE [Name]='" + name + "' AND [Workgroup_ID]='" + workgroup_id + "'";
              try {
                   String driver = "org.gjt.mm.mysql.Driver";
                   Class.forName(driver).newInstance();
                   String url="jdbc:mysql://localhost/ris?user=root&password=restricted";
                   Connection con=DriverManager.getConnection(url);
                   Statement stat = con.createStatement();
                   ResultSet rst = stat.executeQuery(query);
                   while(rst.next()) {
                        user_id = rst.getInt("User_ID");
                        this.name = rst.getString("Name");
                        this.workgroup_id = rst.getInt("Workgroup_ID");
                        dworklist = rst.getString("Default_Worklist");
                        dforms = rst.getString("Default_Forms");
                        printer = rst.getString("Printer_Assignment");     
                   con.close();
                   return true;
              catch(Exception e) {
                   e.printStackTrace();
                   return false;
    }and here is my problem, when i try to compile my Users.java this error shows up...
    Users.java:96: inconvertible types
    found : java.lang.String
    required: int
    name = "";
    ^
    please help me with this...any help would be greatly appreciated...thanks in advance...

    Ok, I reinstalled jboss with the EJB 3.0 option and now it works

  • Please help: Can't download itunes with windows 7 (64 bit).  Keeps freezing at 99%

    I have tried deleting and re-installing itunes and quicktime but it still won't work.  Please help.

    Can someone please respond to my request for support?  I tried the provided correct answer at https://discussions.apple.com/message/11561783#11561783  but it did not work. 
    I also got a MSFT tech support person to remotely look at my machine, for what its worth, he said the registry file is fine and to contact Apple support.
    Any help would be very much appreciated.

  • Hello I Download Adobe Photoshop CC 2014 Last Night i INSTALLED it But it Crashes in 30-40 Sec After i Launch the Product Without Any Error Message I Need Help Can You Resolve This Problem i Tried Creative Cloud Sign Out Nd Sign iN But iT DidnT ReSolve My

    Hello I Download Adobe Photoshop CC 2014 Last Night
     i INSTALLED it But it Crashes in 30-40 Sec After i Launch the Product Without Any Error Message
    I Need Help Can You Resolve This Problem

    Lotfi are you receiving any error messages during the installation?  I would recommend reviewing your installation logs for errors.  Please see Troubleshoot install issues with log files | CC - http://helpx.adobe.com/creative-cloud/kb/troubleshoot-install-logs-cc.html for information on how to locate and interpret your installation log files.  You are welcome to post any specific errors you discover to this discussion.

  • HT3775 I get the following message when trying to open an .avi downloaded from my video cam, need help, can not find the codec, thank you.The document "IMAG0026.AVI" could not be opened. A required codec isn't available.

    I get the following message when trying to open an .avi downloaded from my video cam, need help, can not find the codec, thank you. This is for Quicktime Player.
    "The document “IMAG0026.AVI” could not be opened. A required codec isn't available."

    Try Perian.
    http://perian.org/

Maybe you are looking for

  • IPhone 4S all incoming calls drop

    I have an iPhone 4S 32GB (White) It was working perfectly up until the 5.0.1 update.  Now INBOUND calls drop as soon as I answer them, I barely have a chance to say 'Hello' and I get a beep and the call failed message on-screen. After hours of restor

  • Canonical XML

    hi all, iam working on AGILE to SAP scenario. from agile iam getting AXML file which is in ZIP format. iam using one file adapter module to unzip into XML and procesing the data. the XML is normal XML, but my client want that XML should be canonical

  • Config Suse 9 and Oracle Database 10g

    Hi, I'm trying to install Suse 9 with Oracle 10g on a HP DL380 server and I need some information (This will be an environment for Portal applications): 1) Can SuSE SLES run ok with Processor Hyper Threading (PHT)? 2) What kind of RAID is better for

  • CL_GUI_CALENDAR

    Hi Everyone. I am building a gui screen dynamically in a class method. I am using a gui container, and a dynamic document cl_dd_document inside the container. Inside the dynamic document I utilizing the form area using cl_dd_form_area. Within the for

  • Delta from infoobject to cube

    Hi All, I need to load a cube from an infoobject. I know it is a wierd requirement. But if i create a transformation from infoobject to cube, is it possible to have a delta load from an infoobject to cube using transformation ? Regards, Satya