Need some help on JAVA COMM API's

Hi all,
I am working on Java for first time,,and I am working on serial interface ,I need some documentation of JAVA COMM API's ,Please forward some links

Have you read any of these?
http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2B%22chat+server%22&col=javaforums

Similar Messages

  • Need some help on JAVA CHAT SERVER

    i need some info about java chat server. Please any one who have developed give me the details about the logic and process flow.

    Have you read any of these?
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2B%22chat+server%22&col=javaforums

  • I need some help, because JAVA don´t work in browser after update 7u51 for 64bits.

    ... I don´t get more some sites that need to use JAVA to work.
    I tried several options, but I didn´t get!!!
    Java after update, it doesn´t want to work, the browser (Chrome, Firefox, Safari and Exporer) don´t get to find update and I don´t understand what i have to do.
    ps.; so sorry if my english isn´t  good, but I tried. ...
    Thanks!
    Andryea

    A probable quick fix is available via the "Exception Site List" instructions here - Java™ SE Development Kit 7 Update 51 Release Notes
    Long term, however, this is a security risk and recommended security policies should be adhered to
    HTH
    Srini

  • Need some help with java documents if possible

    Hello all,
    I am trying to decompile .class files ok, i decompile it without any problems but when i open the java source i see weird string codes, and its not readable for the human, i tried lot of decompiling softwares but no software can make the file readable this is the problem that i have:
    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3)
    // Source File Name:   b.java
    package com.pimpernel.a.a.a;
    import com.pimpernel.chatpointclassic.client.a.e;
    import java.io.DataOutputStream;
    import java.io.PrintStream;
    import java.util.*;
    // Referenced classes of package com.pimpernel.a.a.a:
    //            a, e
    public class b
        implements Runnable
        b(a a1, a a2, DataOutputStream dataoutputstream, com.pimpernel.a.a.a.e e1)
            a = a1;
            b = 2000;
            c = 50;
            d = 4;
            o = -1L;
            e = a2;
            f = dataoutputstream;
            g = e1;
            j = new Vector();
            h = c;
        b(a a1, a a2, DataOutputStream dataoutputstream, com.pimpernel.a.a.a.e e1, Properties properties)
            int i1 = a.ev;
            super();
            a = a1;
            b = 2000;
            c = 50;
            d = 4;
            o = -1L;
            b = a(properties, c("-!\001\025R-:\006\024Y\035+\001\037f;+\032\036d\"+\n\013C'#\n6V6"), 20000);
            c = a(properties, c("-!\001\025R-:\006\024Y\035+\001\037f;+\032\036d\"+\n\013C'#\n6^ "), 50);
            d = a(properties, c("-!\001\025R-:\006\024Y\035+\001\037f;+\032\036z' <\036Y*\037\032\036B+\f\n\035X<+?\tX-+\034\b^ )"), 4);
            e = a2;
            f = dataoutputstream;
            g = e1;
            j = new Vector();
            h = c;
            if(e.i != 0)
                a.ev = ++i1;
        public int a(Properties properties, String s, int i1)
            try
                return Integer.parseInt(properties.getProperty(s));
            catch(Exception _ex)
                return i1;
        public void a()
            c();
            j.removeAllElements();
            f = null;
            j = null;
        public void b()
            if(i == null)
                k = System.currentTimeMillis();
                m = 0;
                n = 0;
                i = new Thread(this, c("\007\034,(R *>\016R;+"));
                i.start();
        public void c()
            if(i != null)
                i.stop();
                i = null;
        public void a(String s)
            j.insertElementAt(s, 0);
        public void b(String s)
            a(s.length());
            if((com.pimpernel.a.a.a.a.b(a) & 0x10) == 16)
                System.out.println(c("\036<\006\024E':\026[z+=\034\032P+n<\036Y*tO") + s);
            o = 0L;
            try
                if(f != null)
                    synchronized(f)
                        f.writeBytes(s + c("CD"));
                        f.flush();
            catch(Exception exception)
                if(e.eo)
                    if((com.pimpernel.a.a.a.a.b(a) & 1) == 1)
                        System.out.println(c("\0136\f\036G:'\000\025\027' O\bR *>\016R;+U[") + exception);
                    try
                        com.pimpernel.a.a.a.a.c(e);
                    catch(Exception _ex) { }
        public void a(int i1)
            if((com.pimpernel.a.a.a.a.b(a) & 4) == 4)
                m++;
                n += i1;
                l = System.currentTimeMillis();
                if(l - k > 10000L)
                    long l1 = l - k;
                    k = l;
                    if(com.pimpernel.a.a.a.a.a(a) == null)
                        com.pimpernel.a.a.a.a.a(a, new Date());
                    com.pimpernel.a.a.a.a.a(a).setTime(l);
                    System.out.println(c("ccB") + com.pimpernel.a.a.a.a.a(a).toString() + c("ccB"));
                    System.out.println(c("\001;\033\034X' \b[z=)OT\027=+\f[\nn") + (long)m / (l1 / 1000L));
                    System.out.println(c("\001;\033\034X' \b[u7:\n\b\027an\034\036TnsO") + (long)n / (l1 / 1000L));
                    m = 0;
                    n = 0;
        public void run()
            int i1;
            i1 = a.ev;
            o = 0L;
            if(i1 == 0) goto _L2; else goto _L1
    _L1:
            try
                Thread.sleep(h);
            catch(Exception _ex) { }
            o += h;
            j.size();
            d;
    _L9:
            JVM INSTR icmple 73;
               goto _L3 _L4
    _L3:
            if(g != null)
                g.a(j);
    _L4:
            if(j.isEmpty()) goto _L6; else goto _L5
    _L5:
            String s = (String)j.lastElement();
            a(s.length());
            if((com.pimpernel.a.a.a.a.b(a) & 8) == 8)
                System.out.println(c("\037;\n\016Rn=\006\001RnsO") + (j.size() - 1) + c("n\035\n\025Stn") + s);
            synchronized(f)
                f.writeBytes(s + c("CD"));
                f.flush();
            o = 0L;
            j.removeElement(j.lastElement());
            h = h << 1;
            if(i1 == 0) goto _L7; else goto _L6
    _L6:
            h = h >> 1;
    _L7:
            if(h > b)
                h = c;
            if(h < c)
                h = c;
            if(e.ed && o >= 10000L)
                a(c("\036\007!<\027="));
                o = 0L;
            continue; /* Loop/switch isn't completed */
            Exception exception;
            exception;
            if(!e.eo)
                continue; /* Loop/switch isn't completed */
            com.pimpernel.a.a.a.a.b(a) & 1;
            1;
            if(i1 != 0) goto _L9; else goto _L8
    _L8:
            JVM INSTR icmpne 387;
               goto _L10 _L11
    _L10:
            break MISSING_BLOCK_LABEL_362;
    _L11:
            break MISSING_BLOCK_LABEL_387;
            System.out.println(c("\0136\f\036G:'\000\025\027' O\bR *>\016R;+U[") + exception);
            try
                com.pimpernel.a.a.a.a.c(e);
            catch(Exception _ex) { }
    _L2:
            if(e.eo) goto _L1; else goto _L12
    _L12:
        private static String c(String s)
            char ac[] = s.toCharArray();
            int i1 = ac.length;
            int k1;
            for(int j1 = 0; j1 < i1; j1++)
                switch(j1 % 5)
                case 0: // '\0'
                    k1 = 0x4e;
                    break;
                case 1: // '\001'
                    k1 = 78;
                    break;
                case 2: // '\002'
                    k1 = 111;
                    break;
                case 3: // '\003'
                    k1 = 123;
                    break;
                default:
                    k1 = 55;
                    break;
                ac[j1] ^= k1;
            return new String(ac);
        a a;
        private int b;
        private int c;
        private int d;
        private a e;
        private DataOutputStream f;
        private com.pimpernel.a.a.a.e g;
        private int h;
        private Thread i;
        private Vector j;
        private long k;
        private long l;
        private int m;
        private int n;
        private long o;
        private final int p = 10000;
    }can some body help me and tell me how i can read that strange codes:
    System.out.println(c("\037;\n\016Rn=\006\001RnsO")
    :S?
    i am sorry because i am on the wrong forum.
    i hope someone can help me.
    Sorry for my bad english!
    Greetings,
    Nino_M

    This forum is for Sun Java Studio Creator questions.

  • Need some help with Java crashing IE.

    Ok, had this problem for some time now, started when was useing microsofts java, it would crash my IE at random points whenever a java applet is running. Upgraded to sun's java but the problems still here along with errors on HD.
    Changed my HD thinking that was the problem but the errors come back.
    Running Win XP Pro, SP2 with IE6.
    Heres error report:
    Unexpected Signal : EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) occurred at PC=0x44DED37
    Function=g.a(I[B)V (compiled Java code)
    Library=(N/A)
    Current Java thread:
    Dynamic libraries:
    0x00400000 - 0x00419000      C:\Program Files\Internet Explorer\iexplore.exe
    0x7C900000 - 0x7C9B0000      C:\WINDOWS\system32\ntdll.dll
    0x7C800000 - 0x7C8F4000      C:\WINDOWS\system32\kernel32.dll
    0x77C10000 - 0x77C68000      C:\WINDOWS\system32\msvcrt.dll
    0x77D40000 - 0x77DD0000      C:\WINDOWS\system32\USER32.dll
    0x77F10000 - 0x77F56000      C:\WINDOWS\system32\GDI32.dll
    0x77F60000 - 0x77FD6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77DD0000 - 0x77E6B000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77E70000 - 0x77F01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77760000 - 0x778CC000      C:\WINDOWS\system32\SHDOCVW.dll
    0x77A80000 - 0x77B14000      C:\WINDOWS\system32\CRYPT32.dll
    0x77B20000 - 0x77B32000      C:\WINDOWS\system32\MSASN1.dll
    0x754D0000 - 0x75550000      C:\WINDOWS\system32\CRYPTUI.dll
    0x76C30000 - 0x76C5E000      C:\WINDOWS\system32\WINTRUST.dll
    0x76C90000 - 0x76CB8000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x77120000 - 0x771AC000      C:\WINDOWS\system32\OLEAUT32.dll
    0x774E0000 - 0x7761C000      C:\WINDOWS\system32\ole32.dll
    0x5B860000 - 0x5B8B4000      C:\WINDOWS\system32\NETAPI32.dll
    0x771B0000 - 0x77256000      C:\WINDOWS\system32\WININET.dll
    0x76F60000 - 0x76F8C000      C:\WINDOWS\system32\WLDAP32.dll
    0x77C00000 - 0x77C08000      C:\WINDOWS\system32\VERSION.dll
    0x773D0000 - 0x774D2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x7C9C0000 - 0x7D1D4000      C:\WINDOWS\system32\SHELL32.dll
    0x5D090000 - 0x5D127000      C:\WINDOWS\system32\comctl32.dll
    0x5AD70000 - 0x5ADA8000      C:\WINDOWS\system32\uxtheme.dll
    0x75F80000 - 0x7607C000      C:\WINDOWS\system32\BROWSEUI.dll
    0x20000000 - 0x20012000      C:\WINDOWS\system32\browselc.dll
    0x77B40000 - 0x77B62000      C:\WINDOWS\system32\appHelp.dll
    0x76FD0000 - 0x7704F000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77050000 - 0x77115000      C:\WINDOWS\system32\COMRes.dll
    0x77260000 - 0x772FE000      C:\WINDOWS\system32\urlmon.dll
    0x77FE0000 - 0x77FF1000      C:\WINDOWS\system32\Secur32.dll
    0x77A20000 - 0x77A74000      C:\WINDOWS\System32\cscui.dll
    0x76600000 - 0x7661D000      C:\WINDOWS\System32\CSCDLL.dll
    0x77920000 - 0x77A13000      C:\WINDOWS\system32\SETUPAPI.dll
    0x10000000 - 0x1001A000      C:\Program Files\Norton AntiVirus\NavShExt.dll
    0x76B20000 - 0x76B31000      C:\WINDOWS\system32\ATL.DLL
    0x76080000 - 0x760E5000      C:\WINDOWS\system32\MSVCP60.dll
    0x00E90000 - 0x00F18000      C:\WINDOWS\system32\shdoclc.dll
    0x00F20000 - 0x011E5000      C:\WINDOWS\system32\xpsp2res.dll
    0x75CF0000 - 0x75D81000      C:\WINDOWS\system32\mlang.dll
    0x71AD0000 - 0x71AD9000      C:\WINDOWS\system32\wsock32.dll
    0x71AB0000 - 0x71AC7000      C:\WINDOWS\system32\WS2_32.dll
    0x71AA0000 - 0x71AA8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71A50000 - 0x71A8F000      C:\WINDOWS\system32\mswsock.dll
    0x662B0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x76EE0000 - 0x76F1C000      C:\WINDOWS\system32\RASAPI32.DLL
    0x76E90000 - 0x76EA2000      C:\WINDOWS\system32\rasman.dll
    0x76EB0000 - 0x76EDF000      C:\WINDOWS\system32\TAPI32.dll
    0x76E80000 - 0x76E8E000      C:\WINDOWS\system32\rtutils.dll
    0x76B40000 - 0x76B6D000      C:\WINDOWS\system32\WINMM.dll
    0x71A90000 - 0x71A98000      C:\WINDOWS\System32\wshtcpip.dll
    0x77C70000 - 0x77C93000      C:\WINDOWS\system32\msv1_0.dll
    0x76D60000 - 0x76D79000      C:\WINDOWS\system32\iphlpapi.dll
    0x7D1E0000 - 0x7D492000      C:\WINDOWS\system32\msi.dll
    0x769C0000 - 0x76A73000      C:\WINDOWS\system32\USERENV.dll
    0x75E90000 - 0x75F40000      C:\WINDOWS\system32\SXS.DLL
    0x0FFD0000 - 0x0FFF8000      C:\WINDOWS\system32\rsaenh.dll
    0x76F20000 - 0x76F47000      C:\WINDOWS\system32\DNSAPI.dll
    0x76FC0000 - 0x76FC6000      C:\WINDOWS\system32\rasadhlp.dll
    0x7D4A0000 - 0x7D783000      C:\WINDOWS\system32\mshtml.dll
    0x746C0000 - 0x746E7000      C:\WINDOWS\system32\msls31.dll
    0x746F0000 - 0x7471A000      C:\WINDOWS\system32\msimtf.dll
    0x74720000 - 0x7476B000      C:\WINDOWS\system32\MSCTF.dll
    0x76390000 - 0x763AD000      C:\WINDOWS\system32\IMM32.DLL
    0x71B20000 - 0x71B32000      C:\WINDOWS\system32\MPR.dll
    0x75F60000 - 0x75F67000      C:\WINDOWS\System32\drprov.dll
    0x71C10000 - 0x71C1E000      C:\WINDOWS\System32\ntlanman.dll
    0x71CD0000 - 0x71CE7000      C:\WINDOWS\System32\NETUI0.dll
    0x71C90000 - 0x71CD0000      C:\WINDOWS\System32\NETUI1.dll
    0x71C80000 - 0x71C87000      C:\WINDOWS\System32\NETRAP.dll
    0x71BF0000 - 0x71C03000      C:\WINDOWS\System32\SAMLIB.dll
    0x75F70000 - 0x75F79000      C:\WINDOWS\System32\davclnt.dll
    0x73D70000 - 0x73D83000      C:\WINDOWS\system32\shgina.dll
    0x75970000 - 0x75A67000      C:\WINDOWS\system32\MSGINA.dll
    0x76360000 - 0x76370000      C:\WINDOWS\system32\WINSTA.dll
    0x74320000 - 0x7435D000      C:\WINDOWS\system32\ODBC32.dll
    0x763B0000 - 0x763F9000      C:\WINDOWS\system32\comdlg32.dll
    0x020A0000 - 0x020B7000      C:\WINDOWS\system32\odbcint.dll
    0x020C0000 - 0x020DB000      C:\Program Files\Common Files\Symantec Shared\Script Blocking\scrauth.dll
    0x021F0000 - 0x0220E000      C:\Program Files\Common Files\Symantec Shared\Script Blocking\ScrBlock.dll
    0x75E60000 - 0x75E73000      C:\WINDOWS\system32\cryptnet.dll
    0x4D4F0000 - 0x4D548000      C:\WINDOWS\system32\WINHTTP.dll
    0x722B0000 - 0x722B5000      C:\WINDOWS\system32\SensApi.dll
    0x75C50000 - 0x75CBE000      c:\windows\system32\jscript.dll
    0x72D20000 - 0x72D29000      C:\WINDOWS\system32\wdmaud.drv
    0x77BD0000 - 0x77BD7000      C:\WINDOWS\system32\midimap.dll
    0x73300000 - 0x73367000      c:\windows\system32\vbscript.dll
    0x73DD0000 - 0x73ECE000      C:\WINDOWS\system32\MFC42.DLL
    0x03600000 - 0x037A7000      C:\WINDOWS\system32\macromed\flash\Flash.ocx
    0x6D430000 - 0x6D43A000      C:\WINDOWS\system32\ddrawex.dll
    0x73760000 - 0x737A9000      C:\WINDOWS\system32\DDRAW.dll
    0x73BC0000 - 0x73BC6000      C:\WINDOWS\system32\DCIMAN32.dll
    0x76200000 - 0x76271000      C:\WINDOWS\system32\mshtmled.dll
    0x66E50000 - 0x66E8F000      C:\WINDOWS\system32\iepeers.dll
    0x73000000 - 0x73026000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x6D460000 - 0x6D470000      C:\Program Files\Java\j2re1.4.2_05\bin\npjpi142_05.dll
    0x5EDD0000 - 0x5EDE7000      C:\WINDOWS\system32\OLEPRO32.DLL
    0x6D330000 - 0x6D348000      C:\Program Files\Java\j2re1.4.2_05\bin\jpiexp32.dll
    0x76FB0000 - 0x76FB8000      C:\WINDOWS\System32\winrnr.dll
    0x6D3A0000 - 0x6D3B8000      C:\Program Files\Java\j2re1.4.2_05\bin\jpishare.dll
    0x08000000 - 0x08139000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\client\jvm.dll
    0x04310000 - 0x04317000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\hpi.dll
    0x04330000 - 0x0433E000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\verify.dll
    0x04340000 - 0x04359000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\java.dll
    0x04360000 - 0x0436D000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\zip.dll
    0x06DE0000 - 0x06EF2000      C:\Program Files\Java\j2re1.4.2_05\bin\awt.dll
    0x06F00000 - 0x06F51000      C:\Program Files\Java\j2re1.4.2_05\bin\fontmanager.dll
    0x73940000 - 0x73A10000      C:\WINDOWS\system32\D3DIM700.DLL
    0x6D310000 - 0x6D324000      C:\Program Files\Java\j2re1.4.2_05\bin\jpicom32.dll
    0x076B0000 - 0x076BF000      C:\Program Files\Java\j2re1.4.2_05\bin\net.dll
    0x076C0000 - 0x076E2000      C:\Program Files\Java\j2re1.4.2_05\bin\dcpr.dll
    0x02340000 - 0x0235E000      C:\Program Files\Java\j2re1.4.2_05\bin\jpeg.dll
    0x74810000 - 0x7497D000      C:\WINDOWS\system32\quartz.dll
    0x59A60000 - 0x59B01000      C:\WINDOWS\system32\DBGHELP.dll
    0x75F40000 - 0x75F51000      C:\WINDOWS\system32\devenum.dll
    0x736B0000 - 0x736B7000      C:\WINDOWS\system32\msdmo.dll
    0x76BF0000 - 0x76BFB000      C:\WINDOWS\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation   total 1152K, used 670K [0x10020000, 0x10160000, 0x10780000)
      eden space 1024K,  53% used [0x10020000, 0x100a7b38, 0x10120000)
      from space 128K, 100% used [0x10120000, 0x10140000, 0x10140000)
      to   space 128K,   0% used [0x10140000, 0x10140000, 0x10160000)
    tenured generation   total 14520K, used 13418K [0x10780000, 0x115ae000, 0x16020000)
       the space 14520K,  92% used [0x10780000, 0x1149ab38, 0x1149ac00, 0x115ae000)
    compacting perm gen  total 5888K, used 5698K [0x16020000, 0x165e0000, 0x1a020000)
       the space 5888K,  96% used [0x16020000, 0x165b0af0, 0x165b0c00, 0x165e0000)
    Local Time = Mon Oct 18 10:09:19 2004
    Elapsed Time = 15
    # HotSpot Virtual Machine Error : EXCEPTION_ILLEGAL_INSTRUCTION
    # Error ID : 4F530E43505002EF
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
    ==========================
    Am I just unlucky or could it be bad power input or bad RAM.
    Sorry if this is wrong forum, could someone direct me to the correct place if needed.
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Thing which made me think it was hardware is that after I download stuff (like leaveing PC d/ling over night) after a week or so I get a load of HD errors and random program will crash.
    Believe that could be a totally different problem which I've got solved, also thought I'd fixed up the java issues with installing 1.5 but appears to have came back. However rather than IE giveing an error report to send to microsoft it either locks up or the window just closes and a hs_err_pid report is created on desktop (currently have 10 of them with different numbers), all of which are 99% the same, just with different numbers in some spots.
    Heres one:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d6a19d1, pid=3788, tid=4008
    # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing)
    # Problematic frame:
    # V [jvm.dll+0x619d1]
    --------------- T H R E A D ---------------
    Current thread (0x033535d0): VMThread [id=4008]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000040
    Registers:
    EAX=0x00000040, EBX=0x22c4cd44, ECX=0x06a1fa98, EDX=0x22d79dd0
    ESP=0x06a1f9e0, EBP=0x06a1fa04, ESI=0x22c4cd34, EDI=0x06a1fa98
    EIP=0x6d6a19d1, EFLAGS=0x00010283
    Top of Stack: (sp=0x06a1f9e0)
    0x06a1f9e0: 22c4cd34 26c72aec 6d6b567e 22c4cd34
    0x06a1f9f0: 22d26cc8 22c4cd08 000397d0 26c729d0
    0x06a1fa00: 26c72af0 06a1fb34 6d72c13e 22c4cd08
    0x06a1fa10: 06a1fa98 06a1fa98 0003c990 03326054
    0x06a1fa20: 6d6b12f4 06a1fa98 00000001 03326008
    0x06a1fa30: 6d6accc3 06a1fa98 00000000 03326008
    0x06a1fa40: 06a1facc 6d6a189f 00000000 06a1fae4
    0x06a1fa50: 06a1fa98 033261d0 6d6a2320 03326008
    Instructions: (pc=0x6d6a19d1)
    0x6d6a19c1: 24 08 57 8b f9 8b 06 85 c0 74 2f 3b 47 1c 73 2a
    0x6d6a19d1: 8b 08 83 e1 03 80 f9 03 75 06 8b 00 24 fc eb 0a
    Stack: [0x06920000,0x06a20000), sp=0x06a1f9e0, free space=1022k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x619d1]
    V [jvm.dll+0xec13e]
    V [jvm.dll+0x6c7b0]
    V [jvm.dll+0x5037f]
    V [jvm.dll+0x6c92d]
    V [jvm.dll+0x11768c]
    V [jvm.dll+0x117163]
    V [jvm.dll+0x117303]
    V [jvm.dll+0x117068]
    C [msvcrt.dll+0x2a3b0]
    C [kernel32.dll+0xb50b]
    VM_Operation (0x07a5f2b8): generation collection for allocation, mode: safepoint, requested by thread 0x07b2e068
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x0335ca18 JavaThread "Thread-11" daemon [_thread_blocked, id=360]
    0x07ae2530 JavaThread "Thread-10" daemon [_thread_blocked, id=1764]
    0x070e5db0 JavaThread "Thread-9" daemon [_thread_blocked, id=1768]
    0x07b2e068 JavaThread "Thread-7" daemon [_thread_blocked, id=1468]
    0x07b90ab8 JavaThread "Thread-5" daemon [_thread_blocked, id=1476]
    0x0705ef48 JavaThread "AWT-EventQueue-2" [_thread_blocked, id=168]
    0x07b8acc8 JavaThread "TimerQueue" daemon [_thread_blocked, id=132]
    0x07b86c98 JavaThread "TimerQueue" daemon [_thread_blocked, id=2020]
    0x07b6dc80 JavaThread "AWT-EventQueue-1" [_thread_blocked, id=4088]
    0x07b2e458 JavaThread "thread applet-loader.class" [_thread_blocked, id=4072]
    0x07054b60 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=4060]
    0x07053a50 JavaThread "traceMsgQueueThread" [_thread_blocked, id=4048]
    0x07047280 JavaThread "AWT-Windows" daemon [_thread_in_native, id=4044]
    0x07046e50 JavaThread "AWT-Shutdown" [_thread_blocked, id=4040]
    0x07046030 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=4036]
    0x03358aa8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4028]
    0x03357680 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4024]
    0x03356a30 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4020]
    0x03354008 JavaThread "Finalizer" daemon [_thread_blocked, id=4016]
    0x03328aa0 JavaThread "Reference Handler" daemon [_thread_blocked, id=4012]
    0x032b4410 JavaThread "main" [_thread_in_native, id=3792]
    Other Threads:
    =>0x033535d0 VMThread [id=4008]
    0x03359cb8 WatcherThread [id=4032]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x032a0388/0x0000081c] Threads_lock - owner thread: 0x033535d0
    [0x032b4058/0x00000858] Heap_lock - owner thread: 0x07b2e068
    Heap
    def new generation total 4608K, used 4160K [0x20a70000, 0x20f60000, 0x211d0000)
    eden space 4160K, 100% used [0x20a70000, 0x20e80000, 0x20e80000)
    from space 448K, 0% used [0x20e80000, 0x20e80000, 0x20ef0000)
    to space 448K, 100% used [0x20ef0000, 0x20f60000, 0x20f60000)
    tenured generation total 60072K, used 28327K [0x211d0000, 0x24c7a000, 0x26a70000)
    the space 60072K, 47% used [0x211d0000, 0x22d79df0, 0x22d79e00, 0x24c7a000)
    compacting perm gen total 8192K, used 2386K [0x26a70000, 0x27270000, 0x2aa70000)
    the space 8192K, 29% used [0x26a70000, 0x26cc4930, 0x26cc4a00, 0x27270000)
    ro space 8192K, 62% used [0x2aa70000, 0x2af77160, 0x2af77200, 0x2b270000)
    rw space 12288K, 46% used [0x2b270000, 0x2b7fc1c0, 0x2b7fc200, 0x2be70000)
    Dynamic libraries:
    0x00400000 - 0x00419000      C:\Program Files\Internet Explorer\iexplore.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000      C:\WINDOWS\system32\kernel32.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\msvcrt.dll
    0x77d40000 - 0x77dd0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f56000      C:\WINDOWS\system32\GDI32.dll
    0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77760000 - 0x778cc000      C:\WINDOWS\system32\SHDOCVW.dll
    0x77a80000 - 0x77b14000      C:\WINDOWS\system32\CRYPT32.dll
    0x77b20000 - 0x77b32000      C:\WINDOWS\system32\MSASN1.dll
    0x754d0000 - 0x75550000      C:\WINDOWS\system32\CRYPTUI.dll
    0x76c30000 - 0x76c5e000      C:\WINDOWS\system32\WINTRUST.dll
    0x76c90000 - 0x76cb8000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x77120000 - 0x771ac000      C:\WINDOWS\system32\OLEAUT32.dll
    0x774e0000 - 0x7761c000      C:\WINDOWS\system32\ole32.dll
    0x5b860000 - 0x5b8b4000      C:\WINDOWS\system32\NETAPI32.dll
    0x771b0000 - 0x77256000      C:\WINDOWS\system32\WININET.dll
    0x76f60000 - 0x76f8c000      C:\WINDOWS\system32\WLDAP32.dll
    0x77c00000 - 0x77c08000      C:\WINDOWS\system32\VERSION.dll
    0x773d0000 - 0x774d2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x7c9c0000 - 0x7d1d4000      C:\WINDOWS\system32\SHELL32.dll
    0x5d090000 - 0x5d127000      C:\WINDOWS\system32\comctl32.dll
    0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
    0x75f80000 - 0x7607c000      C:\WINDOWS\system32\BROWSEUI.dll
    0x20000000 - 0x20012000      C:\WINDOWS\system32\browselc.dll
    0x77b40000 - 0x77b62000      C:\WINDOWS\system32\appHelp.dll
    0x76fd0000 - 0x7704f000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77050000 - 0x77115000      C:\WINDOWS\system32\COMRes.dll
    0x77260000 - 0x772fe000      C:\WINDOWS\system32\urlmon.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x77a20000 - 0x77a74000      C:\WINDOWS\System32\cscui.dll
    0x76600000 - 0x7661d000      C:\WINDOWS\System32\CSCDLL.dll
    0x77920000 - 0x77a13000      C:\WINDOWS\system32\SETUPAPI.dll
    0x10000000 - 0x1001a000      C:\Program Files\Norton AntiVirus\NavShExt.dll
    0x76b20000 - 0x76b31000      C:\WINDOWS\system32\ATL.DLL
    0x76080000 - 0x760e5000      C:\WINDOWS\system32\MSVCP60.dll
    0x01120000 - 0x011a8000      C:\WINDOWS\system32\shdoclc.dll
    0x011b0000 - 0x01475000      C:\WINDOWS\system32\xpsp2res.dll
    0x75cf0000 - 0x75d81000      C:\WINDOWS\system32\mlang.dll
    0x71ad0000 - 0x71ad9000      C:\WINDOWS\system32\wsock32.dll
    0x71ab0000 - 0x71ac7000      C:\WINDOWS\system32\WS2_32.dll
    0x71aa0000 - 0x71aa8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71a50000 - 0x71a8f000      C:\WINDOWS\system32\mswsock.dll
    0x662b0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x71a90000 - 0x71a98000      C:\WINDOWS\System32\wshtcpip.dll
    0x76ee0000 - 0x76f1c000      C:\WINDOWS\system32\RASAPI32.DLL
    0x76e90000 - 0x76ea2000      C:\WINDOWS\system32\rasman.dll
    0x76eb0000 - 0x76edf000      C:\WINDOWS\system32\TAPI32.dll
    0x76e80000 - 0x76e8e000      C:\WINDOWS\system32\rtutils.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x7d1e0000 - 0x7d492000      C:\WINDOWS\system32\msi.dll
    0x769c0000 - 0x76a73000      C:\WINDOWS\system32\USERENV.dll
    0x75e90000 - 0x75f40000      C:\WINDOWS\system32\SXS.DLL
    0x77c70000 - 0x77c93000      C:\WINDOWS\system32\msv1_0.dll
    0x76d60000 - 0x76d79000      C:\WINDOWS\system32\iphlpapi.dll
    0x722b0000 - 0x722b5000      C:\WINDOWS\system32\sensapi.dll
    0x76fc0000 - 0x76fc6000      C:\WINDOWS\system32\rasadhlp.dll
    0x76f20000 - 0x76f47000      C:\WINDOWS\system32\DNSAPI.dll
    0x76fb0000 - 0x76fb8000      C:\WINDOWS\System32\winrnr.dll
    0x7d4a0000 - 0x7d783000      C:\WINDOWS\system32\mshtml.dll
    0x746c0000 - 0x746e7000      C:\WINDOWS\system32\msls31.dll
    0x746f0000 - 0x7471a000      C:\WINDOWS\system32\msimtf.dll
    0x74720000 - 0x7476b000      C:\WINDOWS\system32\MSCTF.dll
    0x76390000 - 0x763ad000      C:\WINDOWS\system32\IMM32.DLL
    0x71b20000 - 0x71b32000      C:\WINDOWS\system32\MPR.dll
    0x75f60000 - 0x75f67000      C:\WINDOWS\System32\drprov.dll
    0x71c10000 - 0x71c1e000      C:\WINDOWS\System32\ntlanman.dll
    0x71cd0000 - 0x71ce7000      C:\WINDOWS\System32\NETUI0.dll
    0x71c90000 - 0x71cd0000      C:\WINDOWS\System32\NETUI1.dll
    0x71c80000 - 0x71c87000      C:\WINDOWS\System32\NETRAP.dll
    0x71bf0000 - 0x71c03000      C:\WINDOWS\System32\SAMLIB.dll
    0x75f70000 - 0x75f79000      C:\WINDOWS\System32\davclnt.dll
    0x73d70000 - 0x73d83000      C:\WINDOWS\system32\shgina.dll
    0x75970000 - 0x75a67000      C:\WINDOWS\system32\MSGINA.dll
    0x76360000 - 0x76370000      C:\WINDOWS\system32\WINSTA.dll
    0x74320000 - 0x7435d000      C:\WINDOWS\system32\ODBC32.dll
    0x763b0000 - 0x763f9000      C:\WINDOWS\system32\comdlg32.dll
    0x02450000 - 0x02467000      C:\WINDOWS\system32\odbcint.dll
    0x72d20000 - 0x72d29000      C:\WINDOWS\system32\wdmaud.drv
    0x72d10000 - 0x72d18000      C:\WINDOWS\system32\msacm32.drv
    0x77be0000 - 0x77bf5000      C:\WINDOWS\system32\MSACM32.dll
    0x77bd0000 - 0x77bd7000      C:\WINDOWS\system32\midimap.dll
    0x024a0000 - 0x024bb000      C:\Program Files\Common Files\Symantec Shared\Script Blocking\scrauth.dll
    0x024d0000 - 0x024ee000      C:\Program Files\Common Files\Symantec Shared\Script Blocking\ScrBlock.dll
    0x0ffd0000 - 0x0fff8000      C:\WINDOWS\system32\rsaenh.dll
    0x75e60000 - 0x75e73000      C:\WINDOWS\system32\cryptnet.dll
    0x4d4f0000 - 0x4d548000      C:\WINDOWS\system32\WINHTTP.dll
    0x75c50000 - 0x75cbe000      c:\windows\system32\jscript.dll
    0x76200000 - 0x76271000      C:\WINDOWS\system32\mshtmled.dll
    0x73300000 - 0x73367000      c:\windows\system32\vbscript.dll
    0x73dd0000 - 0x73ece000      C:\WINDOWS\system32\MFC42.DLL
    0x03ed0000 - 0x04077000      C:\WINDOWS\system32\macromed\flash\Flash.ocx
    0x6d430000 - 0x6d43a000      C:\WINDOWS\system32\ddrawex.dll
    0x73760000 - 0x737a9000      C:\WINDOWS\system32\DDRAW.dll
    0x73bc0000 - 0x73bc6000      C:\WINDOWS\system32\DCIMAN32.dll
    0x66e50000 - 0x66e8f000      C:\WINDOWS\system32\iepeers.dll
    0x73000000 - 0x73026000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x6d590000 - 0x6d5a1000      C:\Program Files\Java\jre1.5.0\bin\npjpi150.dll
    0x5edd0000 - 0x5ede7000      C:\WINDOWS\system32\OLEPRO32.DLL
    0x6d400000 - 0x6d417000      C:\Program Files\Java\jre1.5.0\bin\jpiexp32.dll
    0x6d450000 - 0x6d468000      C:\Program Files\Java\jre1.5.0\bin\jpishare.dll
    0x6d640000 - 0x6d7c5000      C:\PROGRA~1\Java\JRE15~1.0\bin\client\jvm.dll
    0x6d280000 - 0x6d288000      C:\PROGRA~1\Java\JRE15~1.0\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d610000 - 0x6d61c000      C:\PROGRA~1\Java\JRE15~1.0\bin\verify.dll
    0x6d300000 - 0x6d31d000      C:\PROGRA~1\Java\JRE15~1.0\bin\java.dll
    0x6d630000 - 0x6d63f000      C:\PROGRA~1\Java\JRE15~1.0\bin\zip.dll
    0x6d000000 - 0x6d166000      C:\Program Files\Java\jre1.5.0\bin\awt.dll
    0x73940000 - 0x73a10000      C:\WINDOWS\system32\D3DIM700.DLL
    0x6d240000 - 0x6d27d000      C:\Program Files\Java\jre1.5.0\bin\fontmanager.dll
    0x6d1f0000 - 0x6d203000      C:\Program Files\Java\jre1.5.0\bin\deploy.dll
    0x6d5d0000 - 0x6d5ed000      C:\Program Files\Java\jre1.5.0\bin\RegUtils.dll
    0x6d3e0000 - 0x6d3f4000      C:\Program Files\Java\jre1.5.0\bin\jpicom32.dll
    0x6d4c0000 - 0x6d4d3000      C:\Program Files\Java\jre1.5.0\bin\net.dll
    0x6d4e0000 - 0x6d4e9000      C:\Program Files\Java\jre1.5.0\bin\nio.dll
    0x6d1c0000 - 0x6d1e3000      C:\Program Files\Java\jre1.5.0\bin\dcpr.dll
    0x6d3c0000 - 0x6d3df000      C:\Program Files\Java\jre1.5.0\bin\jpeg.dll
    0x71d40000 - 0x71d5c000      C:\WINDOWS\system32\actxprxy.dll
    VM Arguments:
    jvm_args: -Xbootclasspath/a:C:\PROGRA~1\Java\JRE15~1.0\lib\deploy.jar;C:\PROGRA~1\Java\JRE15~1.0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.5.0 -Djavaplugin.nodotversion=150 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE15~1.0 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol -Djavaplugin.vm.options=-Djava.class.path=C:\PROGRA~1\Java\JRE15~1.0\classes -Xbootclasspath/a:C:\PROGRA~1\Java\JRE15~1.0\lib\deploy.jar;C:\PROGRA~1\Java\JRE15~1.0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.5.0 -Djavaplugin.nodotversion=150 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE15~1.0 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol vfprintf
    java_command: <unknown>
    Environment Variables:
    PATH=C:\PROGRA~1\Java\JRE15~1.0\bin;C:\Program Files\Internet Explorer;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;.
    USERNAME=Steven
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 6 Stepping 2, AuthenticAMD
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse
    Memory: 4k page, physical 261616k(32540k free), swap 633112k(371620k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0-b64) for windows-x86, built on Sep 15 2004 03:00:31 by "java_re" with MS VC++ 6.0
    ====================================================
    Have spent countless hours looking for fixes, seems a lot of people have similar looking problems, but the fixes for them either don't apply to me or they are just passed over to another discussion which has no resolve.
    I'm not sure what to look for in Java database of bugs, if anyone can poke me towards a fix or some useful reading I'd be eternally greatful.
    Thanks.

  • Need some help with Java deployment

    Hi everyone. I'm no stranger to Java... I've plenty of experience coding in the language, but little in actually deploying or distributing anything I write.
    Java has me very confused in this respect.
    For instance, say I write an applet that uses Swing or Java3D, no one can use it except me. I assume this is because I have the javax packages on my computer. Does this mean everyone who wants to use it has to download these packages? Do I have to provide them locally to the applet?
    Secondly if I wanted to compile my programs fully into executables, is this possible? I've downloaded things done in java before that ran from an executable. How is this possible?
    Thanks for any help anyone can provide me on this subject.

    >
    OK, at this point I'm speaking outside my area of
    experience ...
    But I think that you're not even allowed to distribute
    those libraries. The licenses say that you can
    download them for personal use, but can't distribute
    them unless you pay someone money.
    So you'd have to distribute your code with a readme
    file that asks the user to download and install those
    packages themselves.This is the 'raison d'etre' for java web-start and JNLP:- check it out, it sounds like the thing you seek.

  • Need some help in java

    wat type of data structures should i use to implement a map with cities linking to each other.
    For Example there's cities A,B,C,D,E.
    City A is linked to Cities B,C,D,E.
    City B is linked to Cities A,C.
    City C is linked to Cities A. etc...
    and i need to do input and get operation.

    public class City
    private Collection citylinks_;
    public City()
    this(new ArrayList());
    public City(Collection citylist)
    public Collection getCityLinks()
    return citylinks_;
    public addCityLink(City acity)
    citylinks_.add(acity);
    public removeCityLink(City acity)
    citylinks_.remove(acity);
    public hasCityLink(City acity)
    return (citylinks_.contains(acity));
    Is a structure you could use

  • WARNING: LONG POST:  Needing some help with Java Prog

    I hope that this forum can support enough formatting to make the source I'm going to post semi-readable... but here's the problem.
    First, the program is supposed to take a positive numerical input and turn it into a numerical palindrome by reversal. It is also supposed to output the number of reversals along with the palindrome. AND, if the palindrome is going to overflow the data type (int) then, it is supposed to anticipate that, and print out the number of times that the numbers were reversed before it would overflow.
    The problem that I'm having is that when I check if a number is a palindrome or not with isPalindrome(), it is fine for the first run, but after that, it just freaks out and goes into a semi-infinite loop that is only broken by the test for overflow. So, even if it finds a numeric palindrome, it keeps working until it's going to overflow.
    Any ideas are very appreciated, and also, many of the print statements are missing right now because I'm trying to find the problem. There are other print statements that indicate where the execution is in the program, so just ignore them. :)
    Here's the program. (I don't know if the forum will remove the spaces or not, so I'm sorry if it does, because I know that makes it hard to read). Thanks ahead of time. :)
    public class Palindrome
    String input=null;
    int pal=0, rvs=0, diff=0, palcount=0, orig=0, ini=0, countTemp=0;
    int inputTemp=0, powTemp=0;
    boolean overflow=false, boopal=true;
    public Palindrome(String x)
    input=x;
    orig=Integer.parseInt(x);
    ini=Integer.parseInt(x);
    public void isPalindrome()
    System.out.println("isPalindrome()");
    int f=0, t=0;
    String g=null;
    g=input;
    t=Integer.parseInt(g);
    f=g.length();
    if(f==2 && t%11!=0)
    System.out.println("if(f==2 && t%11!=0)");
    boopal=false;
    else if(f>2 && f%2==0)
    System.out.println("if(f>2 && f%2==0)");
    int right=f/2, left=right-1;
    while(left<right && right<f && left>-1)
    if(g.charAt(left)!=g.charAt(right))
    boopal=false;
    left--;
    right++;
    else if(f>1 && f%2==1)
    System.out.println("if(f>1 && f%2==1)");
    int mid=(f-1)/2, left=mid-1, right=mid+1;
    while(left<right && right<f && left>-1)
    if(g.charAt(left)!=g.charAt(right))
    boopal=false;
    left--;
    right++;
    else
    boopal=true;
    if(boopal==true)
    System.out.println("BOOPAL IS TRUE!");
    System.exit(0);
    public void makeReversal()
    System.out.println("makeReversal()");
    int b=0, iniTemp=0;
    String c=ini+"";
    int d=c.length()-1;
    do
    System.out.println("do/while(d>0): d: " + d);
    iniTemp=Integer.parseInt(c);
    b=iniTemp%10;
    iniTemp=iniTemp/10;
    c=iniTemp+"";
    rvs=(int) (rvs+((b*Math.pow(10, d))));
    d=c.length()-1;
    while(d>0);
    public void willOverflow()
    System.out.println("willOverflow()");
    diff=Integer.MAX_VALUE-rvs;
    if(ini<=diff)
    overflow=false;
    System.out.println("WillOverflow (should = false): " + overflow);
    else if(ini>diff)
    overflow=true;
    System.out.println("WillOverflow (should = true): " + overflow);
    System.out.println("The program will overflow before calculating"+
    " your palindrome.");
    System.out.println("Your initial input was: "+orig);
    System.out.println("The program will iterate "+palcount+
    " times before the overflow will occur.");
    System.exit(0);
    public void makePalindrome()
    System.out.println("makePalindrome()");
    isPalindrome();
    if(overflow==false)
    while(boopal==false)
    makeReversal();
    willOverflow();
    System.out.println("makePalindrome: pal: " + pal);
    pal=ini+rvs;
    System.out.println("makePalindrome: pal: " + pal);
    palcount++;
    ini=pal;
    input=""+pal;
    isPalindrome();
    if(boopal==true)
    System.out.println("BOOPAL IS TRUE!! GEORGE!");
    break;
    System.out.println("boopal: " + boopal);

    See http://forum.java.sun.com/thread.jsp?forum=54&thread=372647&tstart=105&trange=15

  • Complete Java n00b...need some help

    I'm very new to Java and I need some help writing a basic program.
    I need to write a program that lets the user add up an infinite amount of floating point numbers. The program should compute the sum of all the numbers entered thus far. So for example if the user enters 2 and 3, it should give a number of 5. If the user then enters 4, I should give me 9 etc.
    I'm not really sure how to get started on writing that. I can add up two numbers but I don't know how to tell the program to keep adding additional numbers to that sum. Can someone please help me out? thanks

    It's ok... it can be hard to understand even the simplest concepts with only text and no help.
    There needs to be an int variable outside (before) the loop initialized to 0.
    float num = 0;Next, you need to have an infinite loop that requests floats to add onto the number.
    Scanner input = new Scanner(System.in);
    while (true) {
        float toAdd = input.nextFloat();
        num += toAdd;
        System.out.println("Current sum " + num);
    }Putting all this together and putting it into a main method will work, but we have a bit of an issue. The program won't stop! For that reason, we need to specify a number which can exit the program. I like to use 0 for this purpose.
    Scanner input = new Scanner(System.in);
    while (true) {
        float toAdd = input.nextFloat();
        if (toAdd == 0) {    //test if toAdd is 0 so the program can break;
            break;
        num += toAdd;
        System.out.println("Current sum " + num);
    }So, this code will work:
    import java.util.Scanner;
    class AddNumbers {
        public static void main(String[] args) {
            float num = 0;
            Scanner input = new Scanner(System.in);
            while (true) {
                float toAdd = input.nextFloat();
                if (toAdd == 0) {    //test if toAdd is 0 so the program can break;
                    break;
                num += toAdd;
                System.out.println("Current sum: " + num);
    }Edited by: Arricherekk on May 18, 2008 3:19 PM

  • Deploying Java Comm API

    Hi,
    I am developing an applet which uses Java Comm API. I'm running into some deployment issue. My understanding is that Java Comm API needs to have win32com.dll and javax.comm.properties files installed on the client machine for my applet to use Comm API. Is there a way around this? The ideal way will be to have everything (win32com.dll and javax.comm.properties) in a jar file so that it doesn't need to install any file on the client machine. However looking at previous posts, I don't think that's possible with Java Plug-in. Will I be able to utilize Java WebStart to accomplish this? I'll be interested to find how other people deploy Java Comm API. Thanks in advance.
    Regards,
    Joy

    I�ve developed a solution to this problem. I created a class that creates the javax.comm.properties file where the comm.jar lib looks for it. The trick is to run the method that creates the file before the lib looks for it.
    I show you the example of my code:
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    public final class PrinterInit {
        public static void printerInit(){
            String archivoConf =
                System.getProperty("java.home") + File.separator + "lib" +
                File.separator + "javax.comm.properties";
            try {
                BufferedWriter out = new BufferedWriter(new FileWriter(archivoConf));
                out.write(
                    "#"+ "\n" +
                    "# Drivers loaded by the Java Communications API standard extension"+ "\n" +
                    "# at initialization time "+ "\n" +
                    "# "+ "\n" +
                    "# Format: "+ "\n" +
                    "#   Each line must contain ONE driver definition only "+ "\n" +
                    "#   Each line must be of the form: "+ "\n" +
                    "#           driver=<ClassName> "+ "\n" +
                    "#       No spaces or tabs in the line. "+ "\n" +
                    "#       ClassName must implement the interface javax.comm.CommDriver "+ "\n" +
                    "#           example: driver=Win32Serial"+ "\n" +
                    "#   "+ "\n" +
                    "#"+ "\n" +
                    "# The hash(#) character indicates comment till end of line."+ "\n" +
                    "#"+ "\n" +
                    "# Windows Serial Driver"+ "\n" +
                    "Driver=com.sun.comm.Win32Driver" + "\n");
                out.close();
            } catch (IOException e) {
                System.err.println("No se pudo crear el archivo:" + "javax.comm.properties");
                System.err.println("Ruta completa:" + archivoConf);
    }Before opening the port I call
    PrinterInit.printerInit();This example writes de javax.comm.properties file needed for a windows implementation. You can change the value of the Driver property for the system you are using.
    Good Luck!

  • Java comm api in 64-bit Linux

    I apologise if this is off-topic. I can't find a suitable forum, I tried posting in the Java plugin forum, but no luck there. I would appreciate any ideas to find a solution.
    I am trying to use the java comm api to read and write to the serial port but I am getting the following error:
    Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError: /usr/lib64/libLinuxSerialParallel.so: Can't load IA 32-bit .so on a AMD 64-bit platform
    I am using openSUSE 10.2 (X86-64) which uses Linux 2.6.18.2-34-default x86_64.
    I tried Switching to a 32-bit version of java (1.4.2) from within Eclipse and I always run Eclipse in 32-bit java (/usr/share/eclipse/eclipse -vm /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin/java) but I still get this error.
    Is there anything I can do to get the java comm api working on a 64-bit system?
    Is the java comm api still being developed and maintained? It does not look like it is?
    I've done some searching on the web and I find there is an open source version of the java comm api called RXTX but the website at http://www.rxtx.org/ is not very readable. I don't think I know enough to install this on my system.
    I would appreciate any ideas to get this working.
    Thanks,
    Martin

    I'm stuck again so I would appreciate some more help.
    I've managed to install the Sun 1.6 JDK and configure
    and make rxtx.Any small amount of progress is still progress. :)
    >
    But it still does not work, I get the following error
    when I run the SerialDemo:<snip>
    >
    It seems to be com.sun.comm which is not finding its
    native binary not rxtx! No, it's finding the shared library, unless there are a few more lines at the start of your error message that look like this:
    Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError:
    no LinuxSerialParallel in java.library.pathIt's not finding the function it is looking for in that library.
    This is what confuses me, the
    instructions say install the Solaris version of comm
    api (http://www.rxtx.org/ how-to said Solaris Sparc
    and the rxtx INSTALL file said Solaris x86 so I tried
    both in turn and neither worked) Same here after downloading the latest stuff to my x86 Linux box. I received a similar UnsatisfiedLinkError. I checked the shared libraries and the functions were not in it.
    normally these would
    call the Solaris binary drivers but I assume this has
    to be redirected to rxtx which calls its own
    binaries?Yes. There is a part of RXTX called JCL (Java Comm for Linux) that handles that.
    http://www.geeksville.com/~kevinh/linuxcomm.html
    However, I think the problem is that Sun's API has changed since the RXTX How-To was written. Try downloading the 'comm.jar' at the bottom of the page. It says:
    comm.jar, 2.0.3, generic, English (3rd party backward compatibility, only), EnglishUnzip it and copy the comm.jar file to the 'jre/lib/ext' folder of the JDK/JVM where everything else RXTX created was placed.
    After doing this the SerialDemo app started for me without errors.
    Jim S.

  • Need some help...in need of a different way.

    Hi, I'm new to Java and need some help. I have 2 questions that are similar in nature.
    1st Question:
    In a program that I'm writting I have a do-while loop which at the end brings up a dialog box that asks the user to enter '1' for 'Yes' or '2' for 'No' to continue.
    I would rather have the option of having the user enter 'y' or 'Y' for Yes and 'n' or 'N' for No.
    Here is what I have currently:
    int x;
    String data;
    do{
    //Blah blah code
    data = JOptionPane.showInputDialog(null, "Enter 1 for Yes or 2 for No");
    x = Integer.parseInt(data);
    }while(x == 1);
    x++;
    2nd Question:
    In another part of my program I have a Case statement that asks the user to enter a number or a letter from a list of choices. They can enter '2' , 't', or 'T'.
    I would rather have all of this in an if-else chain. Is this possibe? if so, how would I do it.
    Thanks.

    I would rather have the option of having the user enter 'y' or 'Y' for Yes and 'n' or
    'N' for No. You can test the first letter of whatever the user inputs like this:String response = JOptionPane.showInputDialog(null, "Enter (Y)es or (N)o");
    response = response.toLowerCase();
    if(response.startsWith("y")) {
        // the user entered something starting with y
    } else if(response.startsWith("n")) {
        // the user entered something starting with n
    } else {
        // what are you going to do?
    }JOptionPane also has versions that would allow yes/no buttons. Eg, see:
    http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html

  • Please I need some help with a table

    Hi All
    I need some help with a table.
    My table needs to hold prices that the user can update.
    Also has a total of the column.
    my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
    I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
    I have tried using but as I need to set the toal with something like total
        totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
    Can any one please advise on some way I can get this to work ?
    Thanks for reading
    Craig

    Hi there camickr
    thanks for the help the other day
    this is my full code....
    package printing;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.DecimalFormat;
    public class tablePanel
        extends JDialog  implements Printable {
      BorderLayout borderLayout1 = new BorderLayout();
      private boolean printing = false;
      private Dialog1 dialog;
      JPanel jPanel = new JPanel();
      JTable table;
      JScrollPane scrollPane1 = new JScrollPane();
      DefaultTableModel model;
      private String[] columnNames = {
      private Object[][] data;
      private String selectTotal;
      private double total;
      public tablePanel(Dialog1 dp) {
        dp = dialog;
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      public tablePanel() {
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      private void jbInit() throws Exception {
        jPanel.setLayout(borderLayout1);
        scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
        this.add(jPanel);
        jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
        scrollPane1.getViewport().add(table);
        jPanel.setOpaque(true);
        newTable();
        addToModel();
        addRows();
        setTotal();
    public static void main(String[] args) {
      tablePanel tablePanel = new  tablePanel();
      tablePanel.pack();
      tablePanel.setVisible(true);
    public void setTotal() {
      total = 0;
      int i = table.getRowCount();
      for (i = 0; i < table.getRowCount(); i++) {
        String name = (String) table.getValueAt(i, 1);
        if (!"".equals(name)) {
          if (i != table.getRowCount() - 1) {
            double dt = Double.parseDouble(name);
            total = total + dt;
      String str = Double.toString(total);
      table.setValueAt(str, table.getRowCount() - 1, 1);
      super.repaint();
      public void newTable() {
        model = new DefaultTableModel(data, columnNames) {
        table = new JTable() {
          public Component prepareRenderer(TableCellRenderer renderer,
                                           int row, int col) {
            Component c = super.prepareRenderer(renderer, row, col);
            if (printing) {
              c.setBackground(getBackground());
            else {
              if (row % 2 == 1 && !isCellSelected(row, col)) {
                c.setBackground(getBackground());
              else {
                c.setBackground(new Color(227, 239, 250));
              if (isCellSelected(row, col)) {
                c.setBackground(new Color(190, 220, 250));
            return c;
        table.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2) {
            if (e.getClickCount() == 1) {
              if (table.getSelectedColumn() == 1) {
       table.setTableHeader(null);
        table.setModel(model);
        scrollPane1.getViewport().add(table);
        table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
      public void addToModel() {
        Object[] data = {
            "Price", "5800"};
        model.addRow(data);
      public void addRows() {
        int rows = 20;
        for (int i = 0; i < rows; i++) {
          Object[] data = {
          model.addRow(data);
      public void printOut() {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPrintable(tablePanel.this);
        pj.printDialog();
        try {
          pj.print();
        catch (Exception PrintException) {}
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(Color.black);
        int fontHeight = g2.getFontMetrics().getHeight();
        int fontDesent = g2.getFontMetrics().getDescent();
        //leave room for page number
        double pageHeight = pageFormat.getImageableHeight() - fontHeight;
        double pageWidth =  pageFormat.getImageableWidth();
        double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
        double scale = 1;
        if (tableWidth >= pageWidth) {
          scale = pageWidth / tableWidth;
        double headerHeightOnPage = 16.0;
        //double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
        //System.out.println("this is the hedder heigth   " + headerHeightOnPage);
        double tableWidthOnPage = tableWidth * scale;
        double oneRowHeight = (table.getRowHeight() +  table.getRowMargin()) * scale;
        int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
        double pageHeightForTable = oneRowHeight *numRowsOnAPage;
        int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
        if (pageIndex >= totalNumPages) {
          return NO_SUCH_PAGE;
        g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    //bottom center
        g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages),  (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
        g2.translate(0f, headerHeightOnPage);
        g2.translate(0f, -pageIndex * pageHeightForTable);
        //If this piece of the table is smaller
        //than the size available,
        //clip to the appropriate bounds.
        if (pageIndex + 1 == totalNumPages) {
          int lastRowPrinted =
              numRowsOnAPage * pageIndex;
          int numRowsLeft =
              table.getRowCount()
              - lastRowPrinted;
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(oneRowHeight *
                                     numRowsLeft));
        //else clip to the entire area available.
        else {
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(pageHeightForTable));
        g2.scale(scale, scale);
        printing = true;
        try {
        table.paint(g2);
        finally {
          printing = false;
        //tableView.paint(g2);
        g2.scale(1 / scale, 1 / scale);
        g2.translate(0f, pageIndex * pageHeightForTable);
        g2.translate(0f, -headerHeightOnPage);
        g2.setClip(0, 0,
                   (int) Math.ceil(tableWidthOnPage),
                   (int) Math.ceil(headerHeightOnPage));
        g2.scale(scale, scale);
        //table.getTableHeader().paint(g2);
        //paint header at top
        return Printable.PAGE_EXISTS;
    class TableRenderDollar extends DefaultTableCellRenderer{
        public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean isFocused,
          int row, int column) {
            setHorizontalAlignment(SwingConstants.RIGHT);
          Component component = super.getTableCellRendererComponent(
            table,
            value,
            isSelected,
            isFocused,
            row,
            column);
            if( value == null || value .equals("")){
              ( (JLabel) component).setText("");
            }else{
              double number = 0.0;
              number = new Double(value.toString()).doubleValue();
              DecimalFormat df = new DecimalFormat(",##0.00");
              ( (JLabel) component).setText(df.format(number));
          return component;
    }

  • Need some help with a remove function

    Design and code a program that will maintain a list of product names. Use a String type to represent the product name and an array of strings to implement the list. Your program must implement the following methods:
    Add a product to the list
    Remove a product from the list
    Display then entire list
    Find out if a particular product is on the list.
    You need to create a command command loop with a menu() function. The program must continue asking for input until the user stops.
    This is the assignment and this is what I have so far. I need some help writing the remove function.
    Thanks
    * Title: SimpleSearchableList.java
    * Description: this example will show a reasonably efficient and
    * simple algorithm for rearranging the value in an array
    * in ascending order.
    public class SimpleSearchableList {
         private static String[] List = new String[25]; //These variables (field variables)
         private static int Size; //are common to the entire class, but unavailable
         //except to the methods of the class...
         public static void main(String[] args)
              String Cmd;
              for(;;) {
                   Menu();
                   System.out.print("Command: ");
                   Cmd = SimpleIO.inputString();
                   if(Cmd.equals("Quit"))
                        break;
                   else if(Cmd.equals("Fill"))
                        FillList();
                   else if(Cmd.equals("Search"))
                        SearchList();
                   else if(Cmd.equals("Show"))
                        ShowList();
                   else if(Cmd.equals("Remove"))
                        Remove();
         //Tells you what you can do...
         public static void Menu()
              System.out.println("Choices..................................");
              System.out.println("\tFill to Enter Product");
              System.out.println("\tShow to Show Products");
              System.out.println("\tSearch to Search for Product");
              System.out.println("\tRemove a Product");
              System.out.println("\tQuit");
              System.out.println(".........................................");
         //This method will allow the user to fill an array with values...
         public static void FillList()
              int Count;
              System.out.println("Type Stop to Stop");
              for(Count = 0 ; Count < List.length ; Count++)
                   System.out.print("Enter Product: ");
                   List[Count] = SimpleIO.inputString();
                   if(List[Count].equals("Stop"))
                        break;
              Size = Count;
         //This method will rearrange the values in the array so that
         // go from smallest to largest (ascending) order...
         public static void SearchList()
              String KeyValue;
              boolean NotFoundFlag;
              int Z;
              System.out.println("Enter Product Names Below, Stop To Quit");
              while(true)
                   System.out.print("Enter: ");
                   KeyValue = SimpleIO.inputString();
                   if(KeyValue.equals("Stop")) //Note the use of a method for testing
                        break; // for equality...
                   NotFoundFlag = true; //We'll assume the negative
                   for(Z = 0 ; Z < Size ; Z++)
                        if(List[Z].equals(KeyValue)) {
                             NotFoundFlag = false; //If we fine the name, we'll reset the flag
              System.out.println(List[Z] + " was found");
                   if(NotFoundFlag)
                        System.out.println(KeyValue + " was not found");     
         //This method will display the contents of the array...
         public static void ShowList()
              int Z;
              for(Z = 0 ; Z < Size ; Z++)
                   System.out.println("Product " + (Z+1) + " = " + List[Z]);
         public static void Remove()
    }

    I need help removing a product from the arrayYes. So what's your problem?
    "Doctor, I need help."
    "What's wrong?"
    "I need help!"
    Great.
    By the way, you can't remove anything from an array. You'll have to copy the remaining stuff into a new one, or maybe maintain a list of "empty" slots. Or null the slots and handle that. The first way will be the easiest though.

  • Error in the latest Java comm api for Linux

    installed latest Java comm api for Linux, tried test application for the Sun package:
    $ java SimpleRead
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at SimpleRead.main(SimpleRead.java:67)
    Caused by: java.lang.NullPointerException
    at javax.comm.CommPortIdentifier.findConfFile(CommPortIdentifier.java:199)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:117)
    ... 1 more
    What deis this message mean? How to make you serial port support work?

    and what does this error message mean??
    The package was installed accordingly to "Java(tm) Communications API Linux Installation Instructions":
    $ls /usr/lib/libLinuxSerialParallel.so
    /usr/lib/libLinuxSerialParallel.so
    $env|grep CLASS
    CLASSPATH=<..skipped..>:/opt/commapi/jar/comm.jar:/opt/commapi/jar/commtest.jar
    $ ls /opt/jdk1.5.0_04/jre/lib/javax.comm.properties
    /opt/jdk1.5.0_04/jre/lib/javax.comm.properties
    What else does it need?

Maybe you are looking for

  • Visibility description text form fields in Acrobat Pro

    Hi there, I'm making a lot of forms for a client of mine. The major part I'm doing from indesign CC, but a couple of specific alterations I have to do in Acrobat Pro. There is one thing I can't figure out, lets see if I can describe it correctly; One

  • Select select order by

    Hi, If I have a table test_order_by with column c1, c2, c3, c4, for example. c1 and c2 together is primary key. If I run the following query, select * from test_order_by order by c1, c2; The result will be in the order of c1, c2. Now, If I run the fo

  • Photo sync storage space

    If I import my photo's from iPhone to iPhoto and let it remove them from my phone, they come back to my phone through the photo stream which is expected. But if i then sync iPhoto with my phone through iTunes, they also now appear under Albums in the

  • Flash CS 5.5 - best settings when exporting to .swf to reach widest audience?

    Hi Flash experts! I am a 2D illustrator and am relatively new to Flash (and love it!) and want to add some simple Flash animations (using my illustration) to my portfolio website. But I am having issues when exporting to .swf - I have emailed on exam

  • RE-FX:call transaction using bdc-tab:No bdc_okcode for swapping table-entry

    Hello, I am trying to call transaction RERAOP (module RE-FX) to make an accounting transaction. There is 1 debit posting and 1 credit posting in a grid. Selecting the debit posting, a details scrren is shown, consisting of 2 registers. On the first r