Please help NonRegisteringDriver.java:395

i am trying too connecting jsp with mysql on linux operrating system
some time back it was it was conneting perfecctly i am using mysqlconnector for the connection
please can you help what can be the problem exception i am getting is
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused
     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:414)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)
     org.apache.jsp.chklogin_jsp._jspService(chklogin_jsp.java:121)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused
     com.mysql.jdbc.Connection.createNewIO(Connection.java:1690)
     com.mysql.jdbc.Connection.<init>(Connection.java:427)
     com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:395)
     java.sql.DriverManager.getConnection(DriverManager.java:582)
     java.sql.DriverManager.getConnection(DriverManager.java:207)
     org.apache.jsp.chklogin_jsp._jspService(chklogin_jsp.java:63)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)before the Error start coming i have made a small change in my IP address can it affect the connectivity.

thanks for you reply .....
well i have resolved the thing with help of your help
i had changed the IP of the machine as i was using localhost to connect to mysql
now it was not connecting with the "localhost" tag my pages are opening with tomacat is running with
localhost:8080/webapplication/
but for mysql now i have changed the DBURL to new IP Address instead of localhost
and its working
Can you tell any more about this ..

Similar Messages

  • *****Please Help Simple Java Corba Problem*****

    This is probably a really simple one but I am very cheased off about it.
    I run my applications on a Win XP pro OS, and when I go to type in nameserv it gives me the following error I hava downloaded and installed JDK 1.4.1. I also have the JRE, And jbuilder personal edition ver 8.....And J2RE 1.4.1
    C:\Documents and Settings\Ash>nameserv
    Exception in thread "main" java.lang.NoClassDefFoundError: java/util/HashSet
    at com.inprise.vbroker.orb.ORB.<init>(ORB.java:81)
    at org.omg.CORBA.ORB.create_impl(ORB.java)
    at org.omg.CORBA.ORB.init(ORB.java)
    at com.inprise.vbroker.naming.ExtFactory.main(ExtFactory.java:126)
    my classpath looks like this
    .;C:\VisualCafePDETrial\BIN\COMPONENTS\SYMBEANS.JAR;C:\VisualCafePDETrial\JAVA\LIB\CLASSES.ZIP;C:\VisualCafePDETrial\JAVA\LIB;C:\BES\bin;C:\j2sdk1.4.1\lib\tools.jar;.;
    and my path is
    C:\VisualCafePDETrial\BIN;C:\VisualCafePDETrial\JAVA\BIN;C:\BES\binC:\j2sdk1.4.1\lib\tools.jar;.;
    what on earth am I doing wrong ??
    Also when I goto compile any java program it comes up with the following
    C:\DOCprac\Prac5\bank_naming>vbmake
    Building the bank_agent example ...
    Exception in thread "main" java.lang.ClassCastException
    at com.visigenic.vbroker.tools.idl2java.main(idl2java.java:30)
    Symantec Java! JustInTime Compiler Version 3.00.021(i) for JDK 1.1.x (TRIAL VER)
    Copyright (C) 1996-98 Symantec Corporation
    compiling: Client.java
    Client.java:2: Package org.omg.CORBA not found in import.
    import org.omg.CORBA.*;
    ^
    Client.java:3: Package org.omg.CosNaming not found in import.
    import org.omg.CosNaming.*;
    ^
    2 errors
    Symantec Java! JustInTime Compiler Version 3.00.021(i) for JDK 1.1.x (TRIAL VER)
    Please help I am really desperate to sort this one out. Can you give me some detailed info on how I would do this.>>>Thanx in advance

    You have 2 sets of errors, at least.
    The first is : Exception in thread "main" java.lang.NoClassDefFoundError: java/util/HashSet which is that you have not imported the class for hashset.
    The second is that the import of the jars is probably wrong, hard to say without seeing code.

  • Someone PLEASE help! Java SE 6 runtime -- I downloaded Java and Illustrator still will not launch!!!!

    I purchased this CS6 product and have been unable to use it. What's the problem with the error? I know I'm not the only one who has experienced this. I just got off the phone with Apple and they helped me install Java but Illustrator still will not launch. I'm a designer and have work to do. Someone, please help! Thank you.

    Hi,
    If you are on MAC 10.7 or 10.8. Try the following steps:
    Step 1.  Download Apple Java 2013-002 for OS X 10.7 and 10.8 from location:     http://www.macupdate.com/app/mac/39490/apple-java
    Step 2.  Install this JAVA version using the DMG file.
                                    >>> Once the installation gets completed a “Software Update” dialog gets displayed which says that “To open ‘Adobe Illustrator CS6’ you need a JAVA SE 6 runtime…..”
    Step 3.  Click on the “Install” button on the “Software Update” dialog
    Step 4.  Launch AI
    Let me know the end results.
    With Best Regards,
    Raghuveer

  • Please help on java.util.regex.*

    Hi all,
    My RTF file looks like this:
    Project Num\tab N/A
    \par Project Name\tab Hook-up Installation and Service
    \par
    My intension is to read the file until the \tab and store Project Num as a string into a
    variable. Similarly read until \par and store the value of Project Num into another variable.
    So that i can use those variables further in my program.
    I used java.util.regex.* package for this purpose. I could successfully split the sentence whenever it sees \tab and \par but don't know how to get the text before and after the delimeters and store them into variables.
    The code which i wrote is:
    import java.util.regex.*;
    import java.io.*;
    import java.nio.*;
    import java.nio.charset.*;
    import java.nio.channels.*;
    public class RegexDemo{
    public static void main(String[] args){
    // Create a pattern to match breaks
    Pattern p = Pattern.compile("\\\\.[a-z][a-z]",Pattern.DOTALL);
    try{
    File file = new File("sample.rtf");
    FileInputStream fis = new FileInputStream(file);
    FileChannel fc = fis.getChannel();
    // Get a CharBuffer from the source file
    ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, (int)fc.size());
    Charset cs = Charset.forName("8859_1");
    CharsetDecoder cd = cs.newDecoder();
    CharBuffer cb = cd.decode(bb);
    // Run some matches
    Matcher m = p.matcher(cb);
    while (m.find())
    System.out.println("Found comment: "+m.group());
    }catch(Exception e){
         e.printStackTrace();
    Please somebody help me in this regard. I have spent lot of time searching the forums but couldn't find any solution.
    Thanks in advance
    rnallu

    Just put target inside parenthesis with delimiters at boundaries.
    Example: "(\\w+)\\t(\\d)\\s" will match occurrences of a word followed with a tab char then a digit followed with a whitespace. If target string matches pattern then m.group(1) contains the word and m.group(2) contains the digit.

  • Please help on Java MATH.

    Hi,
    As part of my application development i am trying to do the below operation and its giving wrong/incorrect output. Can anyone help me please.
    String a = "3";
    String b = "3";
    double rtbAmount = Double.parseDouble(a) ;
    double fiAmount = Double.parseDouble(b) ;
    double newAmount = (rtbAmount * fiAmount) / 100.00 ;
    System.out.println("newAmount "+newAmount);
    System.out.println("newAmount "+newAmount*10);
    Here the expected output is 0.09 and 0.9 but it is giving 0.09 and 0.8999999999999999.
    Can anybody tell me the reason for the same and the workaround.

    http://java.sun.com/developer/JDCTechTips/2003/tt0204.html#2
    http://docs.sun.com/source/806-3568/ncg_goldberg.html
    http://mindprod.com/jgloss/floatingpoint.html

  • Please help with Java program

    Errors driving me crazy! although compiles fine
    I am working on a project for an online class - I am teaching myself really! My last assignment I cannot get to work. I had a friend who "knows" what he is doing help me. Well that didn't work out too well, my class is a beginner and he put stuff in that I never used yet. I am using Jgrasp and Eclipse. I really am trying but, there really is no teacher with this online class. I can't get questions answered in time and stuff goes past due. I am getting this error:
    Exception in thread "main" java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:61)
    at java.io.InputStreamReader.<init>(InputStreamReader .java:55)
    at java.util.Scanner.<init>(Scanner.java:590)
    at ttest.main(ttest.java:54)
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    This is my code:
    import java.util.*;
    import java.io.*;
    public class ttest
    static Scanner console = new Scanner(System.in);
    public static void main(String[] args)throws IOException
    FileInputStream fin = null; // input file reference
    PrintStream floser = null; // output file references
    PrintStream fwinner = null;
    Scanner rs; // record scanner
    Scanner ls; // line scanner
    String inputrec; // full record buffer
    int wins; // data read from each record
    int losses;
    double pctg;
    String team;
    String best = null; // track best/worst team(s)
    String worst = null;
    double worst_pctg = 2.0; // track best/worst pctgs
    double best_pctg = -1.0;
    int winner_count = 0; // counters for winning/losing records
    int loser_count = 0;
    // should check args.length and if not == 1 generate error
    try
    Scanner inFile = new Scanner(new FileReader("football.txt"));
    catch( FileNotFoundException e )
    System.exit( 1 );
    try
    floser = new PrintStream( new FileOutputStream( "loser.txt" ) );
    fwinner = new PrintStream( new FileOutputStream( "winner.txt" ) );
    catch( FileNotFoundException e )
    System.out.printf( "unable to open an output file: %s\n", e.toString() );
    System.exit( 1 );
    try
    rs = new Scanner( fin );
    while( rs.hasNext( ) )
    inputrec = rs.nextLine( ); /* read next line */
    ls = new Scanner( inputrec ); /* prevents stumble if record has more than expected */
    team = ls.next( );
    wins = ls.nextInt();
    losses = ls.nextInt();
    if( wins + losses > 0 )
    pctg = ((double) wins)/(wins + losses);
    else
    pctg = 0.0;
    if( pctg > .5 )
    if( pctg > best_pctg )
    best_pctg = pctg;
    best = team;
    else
    if( pctg == best_pctg )
    best += ", " + team;
    fwinner.printf( "%10s %2d %2d %5.3f\n", team, wins, losses, pctg );
    winner_count++;
    else
    if( pctg < worst_pctg )
    worst_pctg = pctg;
    worst = team;
    else
    if( pctg == worst_pctg )
    worst += ", " + team;
    floser.printf( "%10s %2d %2d %5.3f\n", team, wins, losses, pctg );
    loser_count++;
    fin.close( );
    floser.close( );
    fwinner.close( );
    catch( IOException e ) {
    System.out.printf( "I/O error: %s\n", e.toString() );
    System.exit( 1 );
    System.out.printf( "%d teams have winning records; %d teams have losing records\n", winner_count, loser_count );
    System.out.printf( "Team(s) with best percentage: %5.3f %s\n", best_pctg, best );
    System.out.printf( "Team(s) with worst percentage: %5.3f %s\n", worst_pctg, worst );
    The assignment is:
    Create a Java program to read in an unknown number of lines from a data file. You will need to create the data file. The contents of the file can be found at the bottom of this document. This file contains a football team's name, the number of games they have won, and the number of games they have lost.
    Your program should accomplish the following tasks:
    1. Process all data until it reaches the end-of-file. Calculate the win percentage for each team.
    2. Output to a file ("top.txt") a listing of all teams with a win percentage greater than .500. This file should contain the team name and the win percentage.
    3. Output to a file ("bottom.txt") a listing of all teams with a win percentage of .500 or lower. This file should contain the team name and the win percentage.
    4. Count and print to the screen the number of teams with a record greater then .500 and the number of teams with a record of .500 and below, each appropriately labeled.
    5. Output in a message box: the team with the highest win percentage and the team with the lowest win percentage, each appropriately labeled. If there is a tie for the highest win percentage or a tie for the lowest win percentage, you must output all of the teams.
    Dallas 5 2
    Philadelphia 4 3
    Washington 3 4
    NY_Giants 3 4
    Minnesota 6 1
    Green_Bay 3 4

    import java.util.*;
    import java.io.*;
    public class ttest
    static Scanner console = new Scanner(System.in);
    public static void main(String[] args)throws IOException
    FileInputStream fin = null; // input file reference
    PrintStream floser = null; // output file references
    PrintStream fwinner = null;
    Scanner rs; // record scanner
    Scanner ls; // line scanner
    String inputrec; // full record buffer
    int wins; // data read from each record
    int losses;
    double pctg;
    String team;
    String best = null; // track best/worst team(s)
    String worst = null;
    double worst_pctg = 2.0; // track best/worst pctgs
    double best_pctg = -1.0;
    int winner_count = 0; // counters for winning/losing records
    int loser_count = 0;
    // should check args.length and if not == 1 generate error
    try
    Scanner inFile = new Scanner(new FileReader("football.txt"));
    catch( FileNotFoundException e )
    System.exit( 1 );
    try
    floser = new PrintStream( new FileOutputStream( "loser.txt" ) );
    fwinner = new PrintStream( new FileOutputStream( "winner.txt" ) );
    catch( FileNotFoundException e )
    System.out.printf( "unable to open an output file: %s\n", e.toString() );
    System.exit( 1 );
    try
    rs = new Scanner( fin );
    while( rs.hasNext( ) )
    inputrec = rs.nextLine( ); /* read next line */
    ls = new Scanner( inputrec ); /* prevents stumble if record has more than expected */
    team = ls.next( );
    wins = ls.nextInt();
    losses = ls.nextInt();
    if( wins + losses > 0 )
    pctg = ((double) wins)/(wins + losses);
    else
    pctg = 0.0;
    if( pctg > .5 )
    if( pctg > best_pctg )
    best_pctg = pctg;
    best = team;
    else
    if( pctg == best_pctg )
    best += ", " + team;
    fwinner.printf( "%10s %2d %2d %5.3f\n", team, wins, losses, pctg );
    winner_count++;
    else
    if( pctg < worst_pctg )
    worst_pctg = pctg;
    worst = team;
    else
    if( pctg == worst_pctg )
    worst += ", " + team;
    floser.printf( "%10s %2d %2d %5.3f\n", team, wins, losses, pctg );
    loser_count++;
    fin.close( );
    floser.close( );
    fwinner.close( );
    catch( IOException e ) {
    System.out.printf( "I/O error: %s\n", e.toString() );
    System.exit( 1 );
    System.out.printf( "%d teams have winning records; %d teams have losing records\n", winner_count, loser_count );
    System.out.printf( "Team(s) with best percentage: %5.3f %s\n", best_pctg, best );
    System.out.printf( "Team(s) with worst percentage: %5.3f %s\n", worst_pctg, worst );
    }

  • Please help! java.text.ParseException:

    Hi everybody
    why am i gatting java.text.ParseException: Unparseable date: "Jul 21, 2002"
    String s = "yyyy MM dd";
    SimpleDateFormat ff = new SimpleDateFormat(s);
    java.util.Date mm = ff.parse( DateFormat.getDateInstance().format(new java.util.Date())) ;
    System.out.println(mm.toString()); //Exception is thrown
    thanks in advence

    I didn't take time to look through your code too closely but here is some code that might help. The pullDate method reads a string from a JTextField (textField) and tries to return a Date. If it can't format it then it returns null. It tries to format the text based on the formats listed. If it can't format the text using one then it tries the next until it runs out of them. Change the formats to whatever you like. Good luck.
    Jeff
    private static DateFormatter[] altFormats = {
         new DateFormatter(new SimpleDateFormat("M/d/yy")),
         new DateFormatter(new SimpleDateFormat("MMddyy")),
         new DateFormatter(new SimpleDateFormat("MMM d, yy")),
         new DateFormatter(new SimpleDateFormat("MMM d yy")),
         new DateFormatter(new SimpleDateFormat("d MMM yy"))};
    private Date pullDate() {
         String text = textField.getText();
         Date d = null;
         int i = 0;
         while(d==null && i<altFormats.length) {
              try {
                   d = (Date)(altFormats[i++].stringToValue(text));
              } catch (ParseException e) {}                    
         return d;

  • Please help,weird Java problems,err msg

    Hi there,
    everytime i go onto a website that activates Java i get problems.Crashing or when i click on an e-mail address on a website or contact address i get loads of uncontrolable windows appear.You have to wait for then to stop,then close them one by one(quite a while)or reboot.
    This is the message i get when it crashes:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D06EB9B
    Function=Java_sun_awt_windows_WColor_getDefaultColor+0x5952
    Library=C:\Program Files\Java\j2re1.4.1_01\bin\awt.dll
    Current Java thread:
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Dynamic libraries:
    0x00400000 - 0x00412000      C:\Program Files\Internet Explorer\iexplore.exe
    0x77F80000 - 0x77FFB000      C:\WINNT\System32\ntdll.dll
    0x77E80000 - 0x77F35000      C:\WINNT\system32\KERNEL32.dll
    0x77E10000 - 0x77E74000      C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7C000      C:\WINNT\system32\GDI32.DLL
    0x77C70000 - 0x77CBA000      C:\WINNT\system32\SHLWAPI.dll
    0x77DB0000 - 0x77E0B000      C:\WINNT\system32\ADVAPI32.DLL
    0x77D40000 - 0x77DB0000      C:\WINNT\system32\RPCRT4.DLL
    0x732E0000 - 0x73300000      C:\WINNT\system32\shim.dll
    0x76C80000 - 0x76D90000      C:\WINNT\system32\shdocvw.dll
    0x77B50000 - 0x77BD9000      C:\WINNT\system32\COMCTL32.DLL
    0x782F0000 - 0x78532000      C:\WINNT\system32\SHELL32.DLL
    0x77A50000 - 0x77B46000      C:\WINNT\system32\ole32.dll
    0x03000000 - 0x03013000      C:\PROGRA~1\Logitech\MOUSEW~1\SYSTEM\ccmsghk.dll
    0x76E10000 - 0x76ED7000      C:\WINNT\System32\BROWSEUI.dll
    0x775A0000 - 0x77625000      C:\WINNT\System32\CLBCATQ.DLL
    0x779B0000 - 0x77A4B000      C:\WINNT\system32\OLEAUT32.dll
    0x78000000 - 0x78046000      C:\WINNT\system32\MSVCRT.dll
    0x76EE0000 - 0x76EEB000      C:\WINNT\System32\browselc.dll
    0x76C00000 - 0x76C74000      C:\WINNT\system32\WININET.DLL
    0x77840000 - 0x7787C000      C:\WINNT\System32\cscui.dll
    0x770C0000 - 0x770E3000      C:\WINNT\System32\CSCDLL.DLL
    0x10000000 - 0x10015000      C:\WINNT\system32\SSSensor.dll
    0x00EA0000 - 0x00EE1000      C:\Program Files\Acceleration Software\StopSign\webcbrowse.dll
    0x77820000 - 0x77827000      C:\WINNT\system32\VERSION.dll
    0x759B0000 - 0x759B6000      C:\WINNT\system32\LZ32.DLL
    0x01080000 - 0x010BC000      C:\Program Files\MediaLoads Enhanced\ME1.DLL
    0x77640000 - 0x776B2000      C:\WINNT\system32\urlmon.dll
    0x77570000 - 0x775A0000      C:\WINNT\System32\WINMM.dll
    0x75050000 - 0x75058000      C:\WINNT\System32\WSOCK32.dll
    0x75030000 - 0x75043000      C:\WINNT\System32\WS2_32.DLL
    0x75020000 - 0x75028000      C:\WINNT\System32\WS2HELP.DLL
    0x77880000 - 0x7790D000      C:\WINNT\System32\SETUPAPI.dll
    0x77C10000 - 0x77C6D000      C:\WINNT\System32\USERENV.DLL
    0x010D0000 - 0x010DB000      C:\Program Files\CommonName\Toolbar\BabeIE.dll
    0x76D90000 - 0x76DE3000      C:\WINNT\system32\shdoclc.dll
    0x75D50000 - 0x75DD2000      C:\WINNT\System32\mlang.dll
    0x01230000 - 0x01238000      C:\PROGRA~1\Logitech\MOUSEW~1\SYSTEM\LgMousHk.dll
    0x749A0000 - 0x749C4000      C:\WINNT\System32\asycfilt.dll
    0x74FD0000 - 0x74FEF000      C:\WINNT\system32\msafd.dll
    0x75010000 - 0x75017000      C:\WINNT\System32\wshtcpip.dll
    0x774E0000 - 0x77512000      C:\WINNT\System32\RASAPI32.DLL
    0x774C0000 - 0x774D1000      C:\WINNT\System32\RASMAN.DLL
    0x77530000 - 0x77552000      C:\WINNT\System32\TAPI32.DLL
    0x77830000 - 0x7783E000      C:\WINNT\System32\RTUTILS.DLL
    0x75AB0000 - 0x75AB5000      C:\WINNT\System32\sensapi.dll
    0x75170000 - 0x751BF000      C:\WINNT\System32\netapi32.dll
    0x77BE0000 - 0x77BEF000      C:\WINNT\System32\SECUR32.DLL
    0x751C0000 - 0x751C6000      C:\WINNT\System32\NETRAP.DLL
    0x75150000 - 0x75160000      C:\WINNT\System32\SAMLIB.DLL
    0x77950000 - 0x77979000      C:\WINNT\system32\WLDAP32.DLL
    0x77980000 - 0x779A4000      C:\WINNT\System32\DNSAPI.DLL
    0x785C0000 - 0x785CC000      C:\WINNT\System32\rnr20.dll
    0x77340000 - 0x77353000      C:\WINNT\System32\iphlpapi.dll
    0x77520000 - 0x77525000      C:\WINNT\System32\ICMP.DLL
    0x77320000 - 0x77337000      C:\WINNT\System32\MPRAPI.DLL
    0x773B0000 - 0x773DE000      C:\WINNT\System32\ACTIVEDS.DLL
    0x77380000 - 0x773A2000      C:\WINNT\System32\ADSLDPC.DLL
    0x77360000 - 0x77379000      C:\WINNT\System32\DHCPCSVC.DLL
    0x777E0000 - 0x777E8000      C:\WINNT\System32\winrnr.dll
    0x777F0000 - 0x777F5000      C:\WINNT\System32\rasadhlp.dll
    0x75AF0000 - 0x75D30000      C:\WINNT\System32\mshtml.dll
    0x75E60000 - 0x75E7A000      C:\WINNT\System32\IMM32.DLL
    0x75DE0000 - 0x75E57000      c:\winnt\system32\jscript.dll
    0x77560000 - 0x77569000      C:\WINNT\System32\wdmaud.drv
    0x77400000 - 0x77408000      C:\WINNT\System32\msacm32.drv
    0x77410000 - 0x77423000      C:\WINNT\System32\MSACM32.dll
    0x75D40000 - 0x75D46000      C:\WINNT\System32\msadp32.acm
    0x75AC0000 - 0x75AE8000      C:\WINNT\System32\MSLS31.DLL
    0x75A30000 - 0x75A9B000      c:\winnt\system32\vbscript.dll
    0x75AA0000 - 0x75AA8000      C:\WINNT\System32\SHFOLDER.DLL
    0x02380000 - 0x0239B000      C:\WINNT\System32\iuctl.dll
    0x74CB0000 - 0x74CD6000      C:\WINNT\System32\ADVPACK.dll
    0x6E800000 - 0x6E81A000      C:\WINNT\System32\iepeers.dll
    0x64BE0000 - 0x64C08000      C:\WINNT\System32\mmefxe.ocx
    0x6BE10000 - 0x6BE39000      C:\WINNT\System32\mmutilse.dll
    0x727F0000 - 0x727F9000      C:\WINNT\System32\ddrawex.dll
    0x51000000 - 0x51044000      C:\WINNT\System32\DDRAW.dll
    0x728A0000 - 0x728A6000      C:\WINNT\System32\DCIMAN32.dll
    0x6E490000 - 0x6E49A000      C:\WINNT\System32\imgutil.dll
    0x69BF0000 - 0x69C0D000      C:\WINNT\System32\NTMARTA.DLL
    0x77800000 - 0x7781D000      C:\WINNT\System32\WINSPOOL.DRV
    0x77BF0000 - 0x77C01000      C:\WINNT\System32\NTDSAPI.dll
    0x76930000 - 0x7695B000      C:\WINNT\System32\wintrust.dll
    0x77440000 - 0x774B5000      C:\WINNT\System32\CRYPT32.dll
    0x77430000 - 0x77440000      C:\WINNT\System32\MSASN1.DLL
    0x77920000 - 0x77943000      C:\WINNT\system32\IMAGEHLP.dll
    0x7CA00000 - 0x7CA23000      C:\WINNT\System32\rsaenh.dll
    0x6A830000 - 0x6A8AF000      C:\WINNT\System32\msxml.dll
    0x6B3D0000 - 0x6B40C000      C:\WINNT\System32\mshtmled.dll
    0x78160000 - 0x78186000      C:\WINNT\System32\schannel.dll
    0x67400000 - 0x67427000      C:\WINNT\System32\dssenh.dll
    0x75230000 - 0x75245000      C:\WINNT\System32\ACTXPRXY.DLL
    0x64AD0000 - 0x64AE8000      C:\WINNT\System32\plugin.ocx
    0x76710000 - 0x76719000      C:\WINNT\System32\LINKINFO.DLL
    0x76FA0000 - 0x76FAF000      C:\WINNT\System32\ntshrui.dll
    0x773E0000 - 0x773F2000      C:\WINNT\System32\ATL.DLL
    0x1F9C0000 - 0x1FA36000      C:\Program Files\Common Files\System\Ole DB\oledb32.dll
    0x6B740000 - 0x6B746000      C:\WINNT\System32\MSDART32.DLL
    0x1FA40000 - 0x1FA50000      C:\Program Files\Common Files\System\Ole DB\OLEDB32R.DLL
    0x6D7E0000 - 0x6D7EF000      C:\Program Files\Java\j2re1.4.1_01\bin\npjpi141_01.dll
    0x6D740000 - 0x6D752000      C:\Program Files\Java\j2re1.4.1_01\bin\jpiexp32.dll
    0x6D780000 - 0x6D794000      C:\Program Files\Java\j2re1.4.1_01\bin\jpishare.dll
    0x6D330000 - 0x6D45A000      C:\PROGRA~1\Java\J2RE14~1.1_0\bin\client\jvm.dll
    0x6D1D0000 - 0x6D1D7000      C:\PROGRA~1\Java\J2RE14~1.1_0\bin\hpi.dll
    0x6D300000 - 0x6D30D000      C:\PROGRA~1\Java\J2RE14~1.1_0\bin\verify.dll
    0x6D210000 - 0x6D229000      C:\PROGRA~1\Java\J2RE14~1.1_0\bin\java.dll
    0x6D320000 - 0x6D32D000      C:\PROGRA~1\Java\J2RE14~1.1_0\bin\zip.dll
    0x6D000000 - 0x6D0FB000      C:\Program Files\Java\j2re1.4.1_01\bin\awt.dll
    0x6D180000 - 0x6D1D0000      C:\Program Files\Java\j2re1.4.1_01\bin\fontmanager.dll
    0x72D90000 - 0x72E03000      C:\WINNT\System32\D3DIM.DLL
    0x6D6E0000 - 0x6D6F1000      C:\Program Files\Java\j2re1.4.1_01\bin\jpicom32.dll
    0x6D2D0000 - 0x6D2DE000      C:\Program Files\Java\j2re1.4.1_01\bin\net.dll
    0x6D130000 - 0x6D152000      C:\Program Files\Java\j2re1.4.1_01\bin\dcpr.dll
    0x72A00000 - 0x72A2D000      C:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000      C:\WINNT\System32\PSAPI.DLL
    Local Time = Wed Oct 23 01:46:02 2002
    Elapsed Time = 829
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.1_01-b01 mixed mode)
    Any help will stop me pulling my hair out
    Cheers

    I've tried reinstalling,but same probs.it seems like whenever the Java gets activated something fights against it untill it eventully freezes or crashes.
    I use this for work and the most annoying thing is when i click on a contact or e-mail hundreds of windows take over my computer.they do stop in the end though,but......
    cheers for your help

  • Please help with java.text.MessageFormat...

    Hi all
    I'm reasonably new to java and have been struggling with this one for a while. I wonder if anyone can help?
    The following code...
    Object[] testArgs = {new Long(1273), "MyDisk"};
    MessageFormat form = new MessageFormat(
    "The disk \"{1}\" contains {0} file(s).");
    System.out.println(form.format(testArgs));
    ...gives the following output...
    The disk "MyDisk" contains 1,273 file(s).
    I simply want to get rid of the comma, so that the output becomes...
    The disk "MyDisk" contains 1273 file(s).
    Any ideas? Many thanks for reading my thread and for any help you may be able to offer!
    Kind Regards
    Jon

    contains {0,number,#} file(s).

  • Re: need help !!!!! please help us java gurus

    Hi there
    I have to agree with MikeOC
    this is awful written
    what have you done?
    It is almost impossible to follow the code
    You should use this code as an obfuscator !!!!
    Any way to solve this problem I would need to be able to run it
    but I don't have the oracle db
    and I don't whant to mess around in this code
    you just don't know what's going to happen
    Sorry
    /Markus

    wow that was a headache goin through that code but it was fun. Well it seems like that you are overriding your constructor method itemname (code at line 3610), instead i will suggest, overload the constructor method in the first place, the value that u pass as argument int counter, initialize it to null when u call the class and from your main class, pass through arguments like this
    JFrame frr;
    frr = new itemname(num);
    where num is just a number which is zero, u see what iam trying to say the problem is u create an object of this class itemname and not passing any values but later in the code you are creating the object again and pass through some values. either u change the name of the method or u pass values in the constructor.
    hey no offence on this but please next time do comment your code as it is very hard to debug in such a way.
    asrar

  • Please help with java.io.IOException:  Stream closed

    Hello friends --
    I have some code that dies when I try to read in a line:
    import java.sql.*;
    import java.io.*;
    public class MyClass
    public static void main(String[] args)
    try /*wrapper*/
    File inFile = new File(args[0]);
    BufferedReader in = new BufferedReader(new FileReader(inFile));
    File outFile = new File(args[1]);
    BufferedWriter out = new BufferedWriter(new FileWriter(outFile));
    String line = new String();
    Connection con = null;
    try /*try 1. read file*/
    while ((line = in.readLine()) != null)
    // lots more code here
    The code dies when it hits the while(). What's wrong? Didn't I open the stream when I declared 'in'? Thanks a heap to anyone willing to share a clue!!!

    It's a relative path....I figured out exactly what was wrong. The program reads the first line, then dies on its second time through because I've closed the connections. Where should I close the connections and stuff?
    Here's the rest of the code:
    import java.sql.*;
    import java.io.*;
    public class UpdateClaims
    public static void main(String[] args)
    try /*wrapper*/
    File inFile = new File(args[0]);
    BufferedReader in = new BufferedReader(new FileReader(inFile));
    File outFile = new File(args[1]);
    BufferedWriter out = new BufferedWriter(new FileWriter(outFile));
    String line = new String();
    Connection con = null;
    try /*try 1. read file*/
    while ((line = in.readLine()) != null)
    String path = line.substring(0, line.indexOf("~"));
    String size = line.substring(line.indexOf("~")+1);
    String icn = line.substring(line.lastIndexOf("/")+1, line.indexOf("~"));
         String table = "k" + line.substring(line.lastIndexOf("/")-5, line.lastIndexOf("/"));
    try /*2. update existing table*/
    // do some stuff
    }//end try 2
    catch (Exception e1) /*1. update fails*/
         try /*3. insert into existing table*/
    //do some stuff
    }//end try 3
    catch (Exception e2)/*2. insert fails*/
    try /*4. create table and insert record*/
    //do some stuff
    }//end try 4
    catch (Exception e3)/*3. table creation and insertion fails*/
    e3.printStackTrace();
    /*print record to file*/
    out.write(line);
    }//end catch 3
         }//end catch 2
    }//end catch 1
    }//end while
    in.close();
    out.close();
    con.close();
    }//end try 1
    catch (Exception e5) {e5.printStackTrace();}
    }//end wrapper try
    catch (Exception ew) {ew.printStackTrace();}
    }//end main()
    }//end MyClass

  • M new to this forum + new to java please help me with file handling program

    hi i want to make a file handling program where in i want to input a text file say f1 whose style is mentioned as below
    aaa...bcd
    aaabbc
    acdce
    a..dd
    abbcd
    now i want to write d out put of file f1 to file f2 but only those string entries widout any ... in them how to do that :-(( please help :((

    import java.io.*;
    import java.lang.*;
    class javcsse{
             void javsce (){
              BufferedReader in;
            PrintWriter out;
            String line;
            try
                in = new BufferedReader(new FileReader("e:\\cntcs\\n7.txt"));
                out = new PrintWriter("e:\\cntcs\\n8.txt");
               line = in.readLine();
               while(line != null)
                     if(line.contains("...") && line.contains("....")){
                         break ;                
                         else{
                               if(line.contains("cc"))
                              System.out.println(line+"\n");
                                      out.println(line);
                    line = in.readLine();
                in.close();
                out.close();
            } catch (Exception ex)
                System.err.println(ex.getMessage());
      public class javcse{
        public static void main(String[] args) {
            new javcsse();
    }hey i wrote this code yet could u tell y is it still not working :((

  • Scroll bar problems ..Please help!!!!!!

    This is what the program looks like. topPanel has newItemPanel on top of it. when you click continue newItemPanel becomes invisible and newItemDescriptionPanel becomes visible. When you click continue newItemDescriptionPanel becomes invisible and priceEnterPanel becomes visible.
    I want newItemDescriptionPanel and priceEnterPanel to have a scroll bar. but everything I have tried hasn't worked. I am new. You will see the code is ugly and there is an attempt to add a scrollbar.
    Please help
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.border.*;
    import java.lang.System;
    public class MainPanel extends      JFrame implements     ActionListener
         private boolean      firstRun = true;
         private final int     ITEM_PLAIN     =     0;     // Item types
         private final int     ITEM_CHECK     =     1;
         private final int     ITEM_RADIO     =     2;
         private     JPanel          topPanel;
         private JPanel          newItemPanel;
         private JRadioButton onlineAuctionRadio;
         private JRadioButton fixedPriceRadio;
         private ButtonGroup bg;
         private JButton     continueButton;
         private JLabel      blankLabel;       //used to give space between things
         private JPanel           newItemDescriptionPanel;
         private JPanel      takeAdditionalSpacePanelCheckBox;
         private JPanel      takeAdditionalSpacePanel;
         private JPanel          takeAdditionalSpacePanelLabel;
         private JPanel          takeAdditionalSpacePanelLabel2;
         private JPanel      takeAdditionalSpacePanel2;
         private JPanel      takeAdditionalSpacePanel3;
         private JPanel           takeAdditionalSpacePanel4;
         private JPanel           takeAdditionalSpacePanel5;
         JScrollPane displayScroller;
         JEditorPane itemDescriptionTextArea;
         GridBagLayout gridbag;
         GridBagConstraints gbc;
         private JCheckBox   secondCategoryCheckBox;
         private JLabel          itemTitleLabel;
         private JLabel          requiredLabel, requiredLabel2;
         private JLabel      requiredStarLabel;
         private JTextField  itemTitleTextField;
         private JLabel           subtitleLabel;
         private JTextField      subtitleTextField;
         private JLabel          itemDescriptionLabel;
         private JButton     itemDescriptionContinueButton;
         private JLabel          percentageLabel;
         //------- price enter page ----------------
         private JLabel          startingPriceLabel;
         private JLabel           dollarSignLabel;
         private JTextField     startingPriceTextField;
         private JPanel          fillUpSpacePanel;
         private JPanel          fillUpSpacePanel1;
         private JPanel          fillUpSpacePanel2;
         private JLabel          buyItNowLabel;
         private JPanel          fillUpSpacePanel3;
         private JLabel          dollarSignLabel2;
         private JTextField     buyItNowTextField;
         private JPanel          fillUpSpacePanel4;
         private JPanel          fillUpSpacePanel5;
         private JPanel          fillUpSpacePanel6;
         private JPanel          fillUpSpacePanel7;
         private JPanel          fillUpSpacePanel8;
         private JPanel          fillUpSpacePanel9;
         private JPanel          fillUpSpacePanel10;
         private JPanel          fillUpSpacePanel11;
         private JPanel          fillUpSpacePanel12;
         private JPanel          fillUpSpacePanel13;
         private JPanel          fillUpSpacePanel14;
         private JPanel          fillUpSpacePanel15;
         private JPanel          fillUpSpacePanel16;
         private JPanel          fillUpSpacePanel17;
         private JPanel          fillUpSpacePanel18;
         private JLabel          donatePercentageLabel;
         private JTextField     donatePercentageTextField;
         private JPanel          fSp; // fill space panel
         private JPanel          fSp1;
         private JPanel          fSp2;
         private JPanel          fSp3;
         private JPanel          fSp4;
         private JPanel          fSp5;
         private JPanel          fSp6;
         private JPanel          fSp7;
         private JPanel          fSp8;
         private JPanel          fSp9;
         private JLabel           numberOfPicturesLabel;
         private JTextField     numberOfPicturesTextField;
         private JCheckBox     superSizePicturesCheckBox;
         private JLabel          superSizePicturesLabel;
         private JRadioButton standardPictureRadioButton;
         private JRadioButton picturePackRadioButton;
         private JCheckBox     listingDesignerCheckBox;
         private ButtonGroup bgPictures;
         private JCheckBox      valuePackCheckBox;
         private JCheckBox     galleryPictureCheckBox;
         private JCheckBox     subtitleCheckBox;
         private JCheckBox     boldCheckBox;
         private JCheckBox     borderCheckBox;
         private JCheckBox     highlightCheckBox;
         private JCheckBox     featuredPlusCheckBox;
         private JCheckBox     galleryFeaturedCheckBox;
         private JLabel          homePageFeaturedLabel;
         private JComboBox     homePageFeaturedComboBox;
         private JCheckBox     giftCheckBox;
         JScrollPane priceEnterPanelScroll;
         private JButton          backToRadioButton;
         private JButton          backToItemDescriptionButton;
         private JPanel           priceEnterPanel;
         private final static String RADIOPANEL = "JPanel with radios";
         private final static String DESCRIPTIONPANEL = "JPanel with description";
         private final static String PRICEENTERPANEL = "JPanel with price entering";
         private JPanel           cards;
         private     JMenuBar     menuBar;
         private     JMenu          menuFile;
         private     JMenu          menuEdit;
         private     JMenu          menuProperty;
         private     JMenuItem     menuPropertySystem;
         private     JMenuItem     menuPropertyEditor;
         private     JMenuItem     menuPropertyDisplay;
         private     JMenu        menuFileNew;
         private JMenuItem   menuFileNewAccount;
         private JMenuItem   menuFileNewItem;
         private     JMenuItem     menuFileOpen;
         private     JMenuItem     menuFileSave;
         private     JMenuItem     menuFileSaveAs;
         private     JMenuItem     menuFileExit;
         private     JMenuItem     menuEditCopy;
         private     JMenuItem     menuEditCut;
         private     JMenuItem     menuEditPaste;
         public MainPanel()
              requiredLabel = new JLabel ("* Required");
              requiredLabel.setForeground (Color.red);
              requiredLabel2 = new JLabel ("* Required");
              requiredLabel2.setForeground (Color.red);
              requiredStarLabel = new JLabel ("*");
              requiredStarLabel.setForeground (Color.green);
              setTitle( "photo galleries" );
              setSize( 310, 130 );
              topPanel = new JPanel();
              topPanel.setLayout( new BorderLayout() );
              topPanel.setBorder (BorderFactory.createTitledBorder ("TopPanel"));
              //topPanel.setPreferredSize(new Dimension (300,300));
              getContentPane().add( topPanel );
              topPanel.setVisible (false);
              //     For New Item Panel
              ButtonListener ears = new ButtonListener();
              blankLabel = new JLabel ("  ");  // used to give space between radio buttons and continue button
              continueButton = new JButton ("Continue >");
              continueButton.addActionListener (ears);
              backToRadioButton = new JButton ("< back");
              backToRadioButton.addActionListener (ears);
              itemDescriptionContinueButton = new JButton ("Continue >");
              itemDescriptionContinueButton.addActionListener (ears);
              backToItemDescriptionButton = new JButton ("< back");
              backToItemDescriptionButton.addActionListener (ears);
              newItemPanel = new JPanel();
              newItemPanel.setLayout (new BoxLayout(newItemPanel, BoxLayout.Y_AXIS));
              //topPanel.add (newItemPanel, BorderLayout.NORTH);
              newItemPanel.setBorder (BorderFactory.createTitledBorder ("NewItemPanel"));
              newItemPanel.setVisible (false);
              onlineAuctionRadio = new JRadioButton ("Sold item at online Auction"     );
              fixedPriceRadio = new JRadioButton ("Sold at a Fixed Price");
              bg = new ButtonGroup();
              bg.add(onlineAuctionRadio);
              bg.add(fixedPriceRadio);
              onlineAuctionRadio.addActionListener (ears);
              fixedPriceRadio.addActionListener (ears);
              newItemPanel.add (onlineAuctionRadio);
              newItemPanel.add (fixedPriceRadio);
              newItemPanel.add (blankLabel);
              newItemPanel.add (continueButton);
              // ------ After continue pressed ---------
              newItemDescriptionPanel = new JPanel();
              newItemDescriptionPanel.setLayout (new BoxLayout(newItemDescriptionPanel, BoxLayout.Y_AXIS));
              newItemPanel.add (newItemDescriptionPanel, BorderLayout.NORTH);
              newItemDescriptionPanel.setBorder (BorderFactory.createTitledBorder ("newItemDescriptionPanel"));
              secondCategoryCheckBox = new JCheckBox ("The item was listed in a second category");
              newItemDescriptionPanel.setVisible (false);
              itemTitleLabel = new JLabel ("Item title");
              itemTitleTextField = new JTextField (30);
              subtitleLabel = new JLabel ("Subtitle ($0.50)");
              subtitleTextField = new JTextField (30);
              itemDescriptionLabel = new JLabel ("Item description");
              itemDescriptionTextArea = new JEditorPane();
              itemDescriptionTextArea.setContentType( "text/html" );
              itemDescriptionTextArea.setEditable( false );
              itemDescriptionTextArea.setPreferredSize(new Dimension (500,250));
              itemDescriptionTextArea.setFont(new Font( "Serif", Font.PLAIN, 12 ));
              itemDescriptionTextArea.setForeground( Color.black );
              gbc = new GridBagConstraints();
              gbc.gridx = 0;
              gbc.gridy = 4;
              displayScroller = new JScrollPane( itemDescriptionTextArea );
              gridbag = new GridBagLayout ();
              gridbag.setConstraints( displayScroller, gbc );
              itemDescriptionTextArea.setEditable( true );
              takeAdditionalSpacePanelCheckBox = new JPanel(new FlowLayout(FlowLayout.LEFT));
              takeAdditionalSpacePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
              takeAdditionalSpacePanelLabel = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
              takeAdditionalSpacePanelLabel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
              takeAdditionalSpacePanel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
              takeAdditionalSpacePanel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
              takeAdditionalSpacePanel4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              takeAdditionalSpacePanel5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              //takeAdditionalSpacePanel2.setBorder (BorderFactory.createTitledBorder ("Additonal 2"));
              takeAdditionalSpacePanelCheckBox.add (secondCategoryCheckBox);
              newItemDescriptionPanel.add (takeAdditionalSpacePanelCheckBox);
              //newItemDescriptionPanel.add (blankLabel);
              takeAdditionalSpacePanelLabel.add (itemTitleLabel);
              takeAdditionalSpacePanelLabel.add (requiredLabel);
              newItemDescriptionPanel.add (takeAdditionalSpacePanelLabel);
              //newItemDescriptionPanel.add (itemTitleTextField);
              takeAdditionalSpacePanel.add(itemTitleTextField);//<--add textfield to panel
              newItemDescriptionPanel.add (takeAdditionalSpacePanel);//<--add panel to boxlayout panel
              takeAdditionalSpacePanelLabel2.add (subtitleLabel);
              newItemDescriptionPanel.add (takeAdditionalSpacePanelLabel2);
              takeAdditionalSpacePanel2.add (subtitleTextField);
              newItemDescriptionPanel.add (takeAdditionalSpacePanel2);
              takeAdditionalSpacePanel4.add (itemDescriptionLabel);
              //takeAdditionalSpacePanel4.add (requiredLabel2);
              newItemDescriptionPanel.add (takeAdditionalSpacePanel4);
              takeAdditionalSpacePanel3.add (displayScroller);
              newItemDescriptionPanel.add (takeAdditionalSpacePanel3);
              takeAdditionalSpacePanel5.add (backToRadioButton);
              takeAdditionalSpacePanel5.add (itemDescriptionContinueButton);
              newItemDescriptionPanel.add (takeAdditionalSpacePanel5);
              //newItemDescriptionPanel.setLayout (new BoxLayout(newItemDescriptionPanel, BoxLayout.Y_AXIS));
              //----------- Price Enter Page ----------------
              priceEnterPanel = new JPanel();
              priceEnterPanel.setLayout (new BoxLayout(priceEnterPanel, BoxLayout.Y_AXIS));
              newItemDescriptionPanel.add (priceEnterPanel, BorderLayout.NORTH);
              priceEnterPanel.setBorder (BorderFactory.createTitledBorder ("Price enter Panel"));
              priceEnterPanel.setVisible (false);
              priceEnterPanelScroll = new JScrollPane (priceEnterPanel);
              topPanel.add (priceEnterPanelScroll);
              standardPictureRadioButton = new JRadioButton ("Standard");
              picturePackRadioButton = new JRadioButton ("Picture Pack ($1.00 for up to 6 pictures or $1.50 for 7 to 12 pictures)");
              bgPictures = new ButtonGroup();
              bgPictures.add(standardPictureRadioButton);
              bgPictures.add(picturePackRadioButton);
              standardPictureRadioButton.addActionListener (ears);
              picturePackRadioButton.addActionListener (ears);
              superSizePicturesCheckBox = new JCheckBox ("Supersize Pictures ($0.75)");
              listingDesignerCheckBox = new JCheckBox ("Listing designer $0.10");
              valuePackCheckBox = new JCheckBox ("Get the Essentials for less! Gallery, Subtitle, Listing Designer. $0.65 (save $0.30)");
              superSizePicturesCheckBox.setEnabled (false);
              superSizePicturesCheckBox.addActionListener (ears);
              listingDesignerCheckBox.addActionListener (ears);
              valuePackCheckBox.addActionListener (ears);
              startingPriceLabel = new JLabel ("Starting Price");
              dollarSignLabel = new JLabel ("$");
              startingPriceTextField = new JTextField (10);
              buyItNowLabel = new JLabel ("Buy It Now");
              dollarSignLabel2 = new JLabel ("$");
              buyItNowTextField = new JTextField (10);
              donatePercentageLabel = new JLabel ("Donate percentage of sale");
              donatePercentageTextField = new JTextField (2);
              donatePercentageTextField.setText ("0");
              percentageLabel = new JLabel ("%");
              // Right-justify the text
             donatePercentageTextField.setHorizontalAlignment(JTextField.RIGHT);
              numberOfPicturesLabel = new JLabel ("Number of pictures used");
              numberOfPicturesTextField = new JTextField (1);
              numberOfPicturesTextField.setText ("0");
              galleryPictureCheckBox = new JCheckBox ("Gallery ($0.35) [Requires a picture]");
              subtitleCheckBox = new JCheckBox ("Subtitle ($0.50)");
              boldCheckBox = new JCheckBox ("Bold ($1.00)");
              borderCheckBox = new JCheckBox ("Border ($3.00)");
              highlightCheckBox = new JCheckBox ("Highlight ($5.00)");
              featuredPlusCheckBox = new JCheckBox ("Featured Plus! ($19.95)");
              galleryFeaturedCheckBox = new JCheckBox ("Gallery Featured ($19.95) [Requires a picture]");
              homePageFeaturedLabel = new JLabel ("Home Page Featured ($39.95 for 1 item, $79.95 for 2 or more items)");
              homePageFeaturedComboBox = new JComboBox ();
              homePageFeaturedComboBox.addItem (("None..."));
              homePageFeaturedComboBox.addItem (("1 item"));
              homePageFeaturedComboBox.addItem (("2 or more items"));
              giftCheckBox = new JCheckBox ("Show as a gift ($0.25)");
              fillUpSpacePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel6 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel7 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel8 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel9 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel10 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel11 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel12 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel13 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel14 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel15 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel16 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel17 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel18 = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp1     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp2     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp3     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp4     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp5     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp6     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp7     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp8     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fSp9     = new JPanel(new FlowLayout(FlowLayout.LEFT));
              fillUpSpacePanel.add (startingPriceLabel);
              fillUpSpacePanel.add (requiredLabel2);
              priceEnterPanel.add (fillUpSpacePanel);
              fillUpSpacePanel2.add (dollarSignLabel);
              fillUpSpacePanel2.add (startingPriceTextField);
              priceEnterPanel.add (fillUpSpacePanel2);     
         //     fillUpSpacePanel1.add (backToItemDescriptionButton);
         //     priceEnterPanel.add (fillUpSpacePanel1);
              fillUpSpacePanel3.add (buyItNowLabel);
              priceEnterPanel.add (fillUpSpacePanel3);
              fillUpSpacePanel4.add (dollarSignLabel2);
              fillUpSpacePanel4.add (buyItNowTextField);
              priceEnterPanel.add (fillUpSpacePanel4);
              fillUpSpacePanel1.add (donatePercentageLabel);
              priceEnterPanel.add (fillUpSpacePanel1);
              fillUpSpacePanel5.add (donatePercentageTextField);
              fillUpSpacePanel5.add (percentageLabel);
              priceEnterPanel.add (fillUpSpacePanel5);
              fillUpSpacePanel6.add (numberOfPicturesLabel);
              priceEnterPanel.add (fillUpSpacePanel6);
              fillUpSpacePanel7.add (numberOfPicturesTextField);
              priceEnterPanel.add (fillUpSpacePanel7);
              fillUpSpacePanel8.add (standardPictureRadioButton);
              priceEnterPanel.add (fillUpSpacePanel8);
              fillUpSpacePanel10.add (blankLabel);
              fillUpSpacePanel10.add (superSizePicturesCheckBox);
              priceEnterPanel.add (fillUpSpacePanel10);
              fillUpSpacePanel9.add (picturePackRadioButton);
              priceEnterPanel.add (fillUpSpacePanel10);
              fillUpSpacePanel11.add (picturePackRadioButton);
              priceEnterPanel.add (fillUpSpacePanel11);
              fillUpSpacePanel12.add (listingDesignerCheckBox);
              priceEnterPanel.add (fillUpSpacePanel12);
              fillUpSpacePanel13.add (valuePackCheckBox);
              priceEnterPanel.add (fillUpSpacePanel13);
              fSp.add (galleryPictureCheckBox);
              priceEnterPanel.add (fSp);
              fSp1.add (subtitleCheckBox);
              priceEnterPanel.add (fSp1);
              fSp2.add (boldCheckBox);
              priceEnterPanel.add (fSp2);
              fSp3.add (borderCheckBox);
              priceEnterPanel.add (fSp3);
              fSp4.add (highlightCheckBox);
              priceEnterPanel.add (fSp4);
              fSp5.add (featuredPlusCheckBox);
              priceEnterPanel.add (fSp5);
              fSp6.add (galleryFeaturedCheckBox);
              priceEnterPanel.add (fSp6);
              fSp7.add (homePageFeaturedLabel);
              priceEnterPanel.add (fSp7);
              fSp8.add (homePageFeaturedComboBox);
              priceEnterPanel.add (fSp8);
              fSp9.add (giftCheckBox);
              priceEnterPanel.add (fSp9);
              newItemDescriptionPanel.add (priceEnterPanelScroll);
              //Create the panel that contains the "cards".
              cards = new JPanel(new CardLayout());
              cards.add(newItemPanel, RADIOPANEL);
              cards.add(newItemDescriptionPanel, DESCRIPTIONPANEL);
              cards.add(priceEnterPanel, PRICEENTERPANEL);
              topPanel.add(cards, BorderLayout.NORTH);
              // Create the menu bar
              menuBar = new JMenuBar();
              // Set this instance as the application's menu bar
              setJMenuBar( menuBar );
              // Build the property sub-menu
              menuProperty = new JMenu( "Properties" );
              menuProperty.setMnemonic( 'P' );
              // Create property items
              menuPropertySystem = CreateMenuItem( menuProperty, ITEM_PLAIN,
                                            "System...", null, 'S', null );
              menuPropertyEditor = CreateMenuItem( menuProperty, ITEM_PLAIN,
                                            "Editor...", null, 'E', null );
              menuPropertyDisplay = CreateMenuItem( menuProperty, ITEM_PLAIN,
                                            "Display...", null, 'D', null );
              //Build the File-New sub-menu
              menuFileNew = new JMenu ("New");
              menuFileNew.setMnemonic ('N');
              //Create File-New items
              menuFileNewItem = CreateMenuItem( menuFileNew, ITEM_PLAIN,
                                            "Item", null, 'A', null );
              menuFileNewAccount = CreateMenuItem( menuFileNew, ITEM_PLAIN,
                                            "Account", null, 'A', null );
              // Create the file menu
              menuFile = new JMenu( "File" );
              menuFile.setMnemonic( 'F' );
              menuBar.add( menuFile );
              //Add the File-New menu
              menuFile.add( menuFileNew );
              // Create the file menu
              // Build a file menu items
              menuFileOpen = CreateMenuItem( menuFile, ITEM_PLAIN, "Open...",
                                            new ImageIcon( "open.gif" ), 'O',
                                            "Open a new file" );
              menuFileSave = CreateMenuItem( menuFile, ITEM_PLAIN, "Save",
                                            new ImageIcon( "save.gif" ), 'S',
                                            " Save this file" );
              menuFileSaveAs = CreateMenuItem( menuFile, ITEM_PLAIN,
                                            "Save As...", null, 'A',
                                            "Save this data to a new file" );
              // Add the property menu     
              menuFile.addSeparator();
              menuFile.add( menuProperty );
              menuFile.addSeparator();
              menuFileExit = CreateMenuItem( menuFile, ITEM_PLAIN,
                                            "Exit", null, 'X',
                                            "Exit the program" );
              //menuFileExit.addActionListener(this);
              // Create the file menu
              menuEdit = new JMenu( "Edit" );
              menuEdit.setMnemonic( 'E' );
              menuBar.add( menuEdit );
              // Create edit menu options
              menuEditCut = CreateMenuItem( menuEdit, ITEM_PLAIN,
                                            "Cut", null, 'T',
                                            "Cut data to the clipboard" );
              menuEditCopy = CreateMenuItem( menuEdit, ITEM_PLAIN,
                                            "Copy", null, 'C',
                                            "Copy data to the clipboard" );
              menuEditPaste = CreateMenuItem( menuEdit, ITEM_PLAIN,
                                            "Paste", null, 'P',
                                            "Paste data from the clipboard" );
         public JMenuItem CreateMenuItem( JMenu menu, int iType, String sText,
                                            ImageIcon image, int acceleratorKey,
                                            String sToolTip )
              // Create the item
              JMenuItem menuItem;
              switch( iType )
                   case ITEM_RADIO:
                        menuItem = new JRadioButtonMenuItem();
                        break;
                   case ITEM_CHECK:
                        menuItem = new JCheckBoxMenuItem();
                        break;
                   default:
                        menuItem = new JMenuItem();
                        break;
              // Add the item test
              menuItem.setText( sText );
              // Add the optional icon
              if( image != null )
                   menuItem.setIcon( image );
              // Add the accelerator key
              if( acceleratorKey > 0 )
                   menuItem.setMnemonic( acceleratorKey );
              // Add the optional tool tip text
              if( sToolTip != null )
                   menuItem.setToolTipText( sToolTip );
              // Add an action handler to this menu item
              menuItem.addActionListener( this );
              menu.add( menuItem );
              return menuItem;
         public void actionPerformed( ActionEvent event )
              CardLayout cl = (CardLayout)(cards.getLayout());
              if (event.getSource() == menuFileExit)
                   System.exit(0);
              if (event.getSource() == menuFileNewAccount)
                   System.out.println ("hlkadflkajfalkdjfalksfj");
              if (event.getSource() == menuFileNewItem){
                   if (firstRun){
                        newItemPanel.setVisible (true);
                        topPanel.setVisible (true);
                   cl.show(cards,RADIOPANEL);
                   firstRun = false;
              //System.out.println( event );
         private class ButtonListener implements ActionListener
              public void actionPerformed(ActionEvent event)
                   CardLayout cl = (CardLayout)(cards.getLayout());
             //     cl.show(cards, (String)evt.getItem());
                   if (event.getSource() == continueButton){
                        if (!(onlineAuctionRadio.isSelected()) && !(fixedPriceRadio.isSelected()))
                             JOptionPane.showMessageDialog(null, "You must select at least one.", "Error", JOptionPane.ERROR_MESSAGE);
                        else{
                             if (onlineAuctionRadio.isSelected()){
                                  cl.show (cards, DESCRIPTIONPANEL);
                                  //newItemPanel.setVisible (false);
                                  //newItemDescriptionPanel.setVisible (true);
                   if (event.getSource() == itemDescriptionContinueButton){
                       if (itemTitleTextField.getText().trim().equalsIgnoreCase(""))
                            JOptionPane.showMessageDialog(null, "You must enter a title.", "Error", JOptionPane.ERROR_MESSAGE);
                        else
                             cl.show (cards, PRICEENTERPANEL);
                   if (event.getSource() == backToRadioButton){
                        cl.show (cards, RADIOPANEL);
                   if (event.getSource() == backToItemDescriptionButton){
                        cl.show(cards, DESCRIPTIONPANEL);
                   if (standardPictureRadioButton.isSelected()){
                        superSizePicturesCheckBox.setEnabled (true);
                   if (picturePackRadioButton.isSelected()){
                        superSizePicturesCheckBox.setEnabled (false);
              } //end of action performed
    }

    Mostly I see there is about 100 times as much code as I care to look at.
    So you don't know how to get a panel in a scroll pane, and then get that scroll pane into your GUI? Then try doing that by itself, not encumbered with 10000 lines of irrelevant code. Once you have it working, plug it into the big lump of code. Or if you can't get it working, ask about the small problem here.

  • What am i doing wrong with this class please help

    What am i doing wrong with this class? I'm trying to create a JFrame with a JTextArea and a ScrollPane so that text can be inserted into the text area. however evertime i run the program i cannot see the textarea but only the scrollpane. please help.
    import java.io.*;
    import java.util.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Instructions extends JFrame{
    public JTextArea textArea;
    private String s;
    private JScrollPane scrollPane;
    public Instructions(){
    super();
    textArea = new JTextArea();
    s = "Select a station and then\nadd\n";
    textArea.append(s);
    textArea.setEditable(true);
    scrollPane = new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    this.getContentPane().add(textArea);
    this.getContentPane().add(scrollPane);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setTitle("Instructions");
    this.setSize(400,400);
    this.setVisible(true);
    }//end constructor
    public static void main(String args[]){
    new Instructions();
    }//end class

    I'm just winging this so it might be wrong:
    import java.io.*;
    import java.util.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Instructions extends JFrame{
    public JTextArea textArea;
    private String s;
    private JScrollPane scrollPane;
    public Instructions(){
    super();
    textArea = new JTextArea();
    s = "Select a station and then\nadd\n";
    textArea.append(s);
    textArea.setEditable(true);
    scrollPane = new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    // Here you already have textArea in scrollPane so no need to put it in
    // content pane, just put scrollPane in ContentPane.
    // think of it as containers within containers
    // when you try to put them both in at ContentPane level it will use
    // it's layout manager to put them in there side by side or something
    // so just leave this out this.getContentPane().add(textArea);
    this.getContentPane().add(scrollPane);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setTitle("Instructions");
    this.setSize(400,400);
    this.setVisible(true);
    }//end constructor
    public static void main(String args[]){
    new Instructions();
    }//end class

  • Java 1.4 and AES Algorithm PLEASE HELP!!

    I hope this question has not already been asked. I have spent a long time searching the archives and documentation.
    I am attempting to migrate from jsdk1.3 to jsdk1.4 but have come up against the following problem.
    I need to create keys and encrypt files and was doing it by using the following:
    import java.security.*;
    import cryptix.provider.key.RawKeyGenerator;
    import xjava.security.KeyGenerator;
    And in my code am using:
    SecureRandom rnd = new SecureRandom();
    rnd.nextInt();
    RawKeyGenerator kg = (RawKeyGenerator)KeyGenerator.getInstance("AES","Cryptix");
    kg.initialize(rnd, 32);
    key = kg.generateKey();
    But I now get the following exception.
    Unexpected exception in IJCE_SecuritySupport.registerTargets()
    Please report this as a bug to <[email protected]>, including
    any other messages displayed on the console, and a description of what appeared to cause the error.
    java.lang.InternalError: Unexpected exception in IJCE_SecuritySupport.registerTargets()
    at xjava.security.IJCE.reportBug(IJCE.java:701)
    at xjava.security.IJCE_SecuritySupport.<clinit>(IJCE_SecuritySupport.java:138)
    at xjava.security.IJCE.findTarget(IJCE.java:498)
    at xjava.security.IJCE.getProviderInternal(IJCE.java:666)
    at xjava.security.IJCE.getClassCandidate(IJCE.java:446)
    at xjava.security.IJCE.getImplementationClass(IJCE.java:410)
    at xjava.security.IJCE.getImplementation(IJCE.java:367)
    at xjava.security.KeyGenerator.getInstance(KeyGenerator.java:152)
    at uk.co.sundayta.docsys.KeyManager.createNewKey(KeyManager.java:96)
    at uk.co.sundayta.docsys.KeyManager.createEncodedKey(KeyManager.java:110)
    at uk.co.sundayta.docsys.KeyManager.createKey(KeyManager.java:71)
    at uk.co.sundayta.docsys.KeyManager.run(KeyManager.java:62)
    at java.lang.Thread.run(Thread.java:536)
    The KeyManager error at line 96 mentioned above is in my code and is related to the snipit of code mentioned above.
    I need 1.4 as I need to use the new 1.4 plug-in on the clients to unencrypt the data.
    I have not sent an email to the address mentioned above as I assume it is a migration problem.
    I also had a message saying:
    Netscape security model is no longer supported.
    Please migrate to the Java 2 security model instead.
    I cannot do this as I need the java 1.4 plug-in for something else on the client. If I compile with 1.3 and run with 1.4 there seems to be an incompatibility problem.
    I would be grateful for any advice as I need to ship this soon.
    Thanks Andrew Mercer.

    Hi!
    I was trying to run some examples from the JXTA platform with jdk_1.3 (the classic HelloWorld), and got a very similar exception. The problem is I'm quite a newbie with JXTA and have no idea whatsoever about security in java, so I don't know what to do about it. I got the same messages about migrate the security model and report the whole thing as a bug, and I actually tried to send the message, but the address doesn't exist, so I'm stuck. If you've come across a solution or someone who might help, I would really like to know it! I copy below the text for the exception, in case it's helpfull to you somehow.
    Kind regards,
    Marta
    Text for the exception:
    java.lang.NoSuchMethodError
         at xjava.security.IJCE_SecuritySupport.registerTargets(IJCE_SecuritySupport.java:155)
         at xjava.security.IJCE_SecuritySupport.<clinit>(IJCE_SecuritySupport.java:134)
         at xjava.security.IJCE.findTarget(IJCE.java:498)
         at xjava.security.IJCE.getProvidersInternal(IJCE.java:638)
         at xjava.security.IJCE.getClassCandidate(IJCE.java:426)
         at xjava.security.IJCE.getImplementationClass(IJCE.java:410)
         at xjava.security.IJCE.getImplementation(IJCE.java:367)
         at xjava.security.Cipher.getInstance(Cipher.java:485)
         at xjava.security.Cipher.getInstance(Cipher.java:452)
         at xjava.security.Cipher.getInstance(Cipher.java:395)
         at COM.claymoresystems.crypto.PEMData.writePEMObjectPEMData.java:154)
         at COM.claymoresystems.crypto.EAYEncryptedPrivateKey.writePrivateKey(EAYEncryptedPrivateKey.java:109)
         at net.jxta.impl.endpoint.tls.PeerCerts.appendPrivateKey(PeerCerts.java:174)
         at net.jxta.impl.endpoint.tls.PeerCerts.genPeerRootCert(PeerCerts.java:137)
         at net.jxta.impl.endpoint.tls.PeerCerts.generateCerts(PeerCerts.java:457)
         at net.jxta.impl.endpoint.tls.TlsConfig.init(TlsConfig.java:185)
         at net.jxta.impl.peergroup.Configurator.configureTls(Configurator.java:265)
         at net.jxta.impl.peergroup.Configurator.<init>(Configurator.java:202)
         at net.jxta.impl.peergroup.Platform.init(Platform.java:252)
         at net.jxta.peergroup.PeerGroupFactory.newPlatform(PeerGroupFactory.java:210)
         at net.jxta.peergroup.PeerGroupFactory.newNetPeerGroup(PeerGroupFactory.java:284)
         at SimpleJxtaApp.startJxta(SimpleJxtaApp.java:91)
         at SimpleJxtaApp.main(SimpleJxtaApp.java:73)
    Unexpected exception in IJCE_SecuritySupport.registerTargets()

Maybe you are looking for

  • HT204088 Is there anyway to download my Purchase history?

    Is there any way I can download my iTunes purchases, specificlly my in app purchases?  I have hundres of purchases, and need to copy some (maybe 150+) of the order numbers.  iTunes does not allow me to copy and paste the order number, and with the co

  • Downloaded videos play for 10 seconds then iTunes shuts down

    Have downloaded 2 videos from Music Store. They work well on my new iPod 30GB, but will not play on my PC. Reasonably good spec PC - AMD Athlon XP2000+ processor, 512 RAM, 128MB Graphics RAM (nVididia GeForce fx5200)and I have no problem playing DVDs

  • Examples of bigger apps?

    hi, I'm having a frustrating time... can anybody help? I know VC++ fairly well in an amateurish way and I really don't understand how Java apps of any size work... do they use the application-document-view architecture which seems to underpin most VC

  • Including files/resources using the ADT command line

    Hi all, I'm trying to get file support into my ADT helper tool before I release an update.  I am still having problems. According to the Adobe docs on the subject, the following commands can be used: -C "path/to/new/working/directory" [files and fold

  • New music to iPod after 10.4.3 update?

    This is curious. The first time I did an iPod sync following 10.4.3 about 300 tunes were transferred to my iPod. Odd thing is, these were not recently imported to iTunes. They should have been on the iPod all along. Most odd. I did a safe boot after