.bat error - "Line too Long"

Hi ,
Im need to run my server from a bath file on win NT M/c . My property list and the classpath is really huge , possibly more than 4000 chars .
set %JAVA_PROP% =-D Really long set of props
set %MY_CLASSPATH% = really long list of jars too!
java %JAVA_PROP% -classpath "%MY_CLASSPATH%"  com.blah.blah.MyServeron running this i get "line too long". Any clue on how i could fix this? On an another site i got a suggestion saying..shorten ur classpath(which is not an option for me)!!!

Set the actual CLASSPATH environment variable. And don't try to do it all on one line, use several lines like this:
SET CLASSPATH=.;ridiculouslynamedthing.jar
SET CLASSPATH=%CLASSPATH%;whatidiotthoughtupthisname.jar
SET CLASSPATH=%CLASSPATH%;andsoonandsoon.jar
then run your class like this:
java %JAVA_PROP% com.blah.blah.MyServer

Similar Messages

  • Manifest: line too long

    Hi all,
    I have a manifest in my EAR file (WEB-INF/MANIFEST) with a Class-Path
    inside (it's long), and I'm getting this error.
    weblogic.management.ApplicationException: Failed to parse deployment
    descriptor for /home/weblogic/bea/user_projects/mydomain/myserver/stage/ilapp.ear.
    Error: java.io.IOException: manifest line too long
    How do I go around fixing this? I don't think I can split up the line
    Thanks,
    - Roberto

    Can't you have multiple Class-Path manifest entries, instead of just one humongous
    one? I think you can.
    Bill
    Roberto wrote:
    Hi all,
    I have a manifest in my EAR file (WEB-INF/MANIFEST) with a Class-Path
    inside (it's long), and I'm getting this error.
    weblogic.management.ApplicationException: Failed to parse deployment
    descriptor for /home/weblogic/bea/user_projects/mydomain/myserver/stage/ilapp.ear.
    Error: java.io.IOException: manifest line too long
    How do I go around fixing this? I don't think I can split up the line
    Thanks,
    - Roberto

  • Does text index gets effected by "line too long" -- File_datastore

    I am trying to create text index using following index script:
    create index T_SRCH_IND_DF_IDX
    on t_search_index(data_filesystem)
    indextype is ctxsys.context
    parameters ('DATASTORE myDS
    lexer lxrprtjoins
    filter MY_FILTER
    format column fmt
    memory 10M');
    Index gets created on some files. For other files (xml,pdf, txt) I get :
    DRG-11513 unable to open or write to file %s
    One thing i noted in these files is that all these files have
    "Line too long" when accessed using "vi" editor.
    Does Line being too long matters on text index creation?
    Also I get multiple "DRG-11513 unable to open or write to file %s"
    for same file oracle tries to index in ctx_user_index_errors. Why not
    just one mesg is enough? Please advise...
    Thanks a lot.
    Tahir

    Garrett, Thanks for ur response.
    I am doing exactly what U advised. I loaded one of the file for which i was getting error mesg in
    a table a BFILE. try to read it using DBMS_LOB.READ. Below is the Procedure thatI am using to do all this.
    create or replace PROCEDURE ReadBLOB IS
    src_lob bfile; ---- modify datatype bfile to BLOB if trying to tread blob
    buffer RAW(32767);
    retval integer;
    amt BINARY_INTEGER := 32767;
    pos INTEGER := 2147483647;
    BEGIN SELECT docs INTO src_lob FROM del_bfile_table WHERE key = '1';
    DBMS_LOB.OPEN(src_lob, DBMS_LOB.LOB_READONLY);
    Retval := DBMS_LOB.ISOPEN(src_lob);
    DBMS_OUTPUT.PUT_LINE('IS OPEN? = '||retval);
    LOOP
    dbms_lob.read (src_lob, amt, pos, buffer);
    DBMS_OUTPUT.put_line('Cut = '||UTL_RAW.cast_to_varchar2(buffer)||' ...');
    DBMS_OUTPUT.put_line('Length = '||to_char(DBMS_LOB.GetLength(src_lob)));
    pos := 1;
    pos := pos + amt;
    DBMS_OUTPUT.put_line('pos = '||pos);
    END LOOP;
    EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('End of data');
    END;
    I get back 1 for retval. Funny thing is I am not able to get anything print anything
    using DBMS_OUTPUT.put_line after dbms_lob.read line in the code. Can't even print
    'Hello World'.
    Any idea why?
    Thanks a lot.
    Tahir Dildar.

  • Java.io.IOException: line too long

    I am trying to compile two class files into an executable jar. I have entered the following commands into the terminal:
    metalforever@merlin:~/NetBeansProjects/PsychicTest/src/psychictest$ jar -cf PsychicTest.jar *.class
    metalforever@merlin:~/NetBeansProjects/PsychicTest/src/psychictest$ jar -cmf PsychicTest.jar main.txt *.class
    java.io.IOException: line too long
         at java.util.jar.Attributes.read(Attributes.java:379)
         at java.util.jar.Manifest.read(Manifest.java:199)
         at java.util.jar.Manifest.<init>(Manifest.java:69)
         at sun.tools.jar.Main.run(Main.java:169)
         at sun.tools.jar.Main.main(Main.java:1167)
    My manifest file(main.txt) says the following:
    Main-Class: PsychicTest
    Help?

    Manifest files are limited to lines of 78 characters or something like that, and lines starting with a space are taken as continuations of the previous line.
    Check yours.

  • Error: WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! pid=26

    Hi every one,
    Today, i met a problem: Application cannot connect to database because database hang ( I also cannot connect to database with sqlplus) . Check alert log, only one error:
    WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! pid=26This error not only appear first time, but also happen every one month. I must reset server for database release all memory but I think It isn't a true solution!
    Could you give a recommend for this.
    Regards.

    The Row Cache is actually the Data Dictionary Cache. It is where definitions from the data dictionary (tablespaces, objects, users etc) are loaded into memory.
    There would be an associated trace file written with the occurrence of this warning.
    See Oracle Support Note 278316.1 for more information
    Hemant K Chitale

  • Problem: Multiple jar files in Class-Path [ IOException: line too long]

    Hello Folks,
    I am trying to create a jar file using the following command:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    My MANIFEST.MF file is as following:
    Manifest-Version: 1.0
    Main-Class: com.gridftp.INSPgridFTP
    Class-Path: lib/activation.jar lib/ant.jar lib/antlr.jar lib/axis.jar lib/castor-0.9.3.jar lib/cog-abstraction-common-2.0.jar lib/cog-abstraction-examples-2.1.jar lib/cog-certmanagement-1.0.jar lib/cog-certrequest-1.0.jar lib/cog-grapheditor-0.46.jar lib/cog-gridfaces-1.0.jar lib/cog-gridshell-1.0.jar lib/cog-jglobus-1.2-050621.jar lib/cog-karajan-0.31.jar lib/cog-provider-clref-gt3_0_2.jar lib/cog-provider-clref-gt3_2_0.jar lib/cog-provider-clref-gt3_2_1.jar lib/cog-provider-clref-gt4_0_0.jar lib/cog-provider-condor-2.0.jar lib/cog-provider-gt2-2.0.jar lib/cog-provider-gt2ft-1.0.jar lib/cog-provider-gt3_0_2-2.0.jar lib/cog-provider-gt3_2_0-2.0.jar lib/cog-provider-gt3_2_1-2.0.jar lib/cog-provider-gt4_0_0-2.2.jar lib/cog-provider-local-2.0.jar lib/cog-provider-ssh-2.0.jar lib/cog-provider-webdav-1.0.jar lib/cog-resources-1.0.jar lib/cog-setup-0.91.jar lib/cog-util-0.91.jar lib/commons-discovery.jar lib/commons-httpclient.jar lib/commons-logging.jar lib/concurrent.jar lib/cryptix32.jar lib/cryptix-asn1.jar lib/cryptix.jar lib/j2ssh-common-0.2.2.jar lib/j2ssh-core-0.2.2.jar lib/jaas.jar lib/jakarta-regexp-1.2.jar lib/jakarta-slide-webdavlib-2.0.jar lib/jaxrpc.jar lib/jce-jdk13-125.jar lib/jgss.jar lib/jug-1.0.1.jar lib/junit.jar lib/log4j-1.2.8.jar lib/mail.jar lib/puretls.jar lib/saaj.jar lib/wsdl4j.jar lib/xercesImpl.jar lib/xml4j.jar lib/xml-apis-1.1.jar lib/xmlsec.jar lib/xpp3-1.1.3.4d_b4_min.jar lib/xstream-1.1.1-patched.jar .
    The grid-jar directory structure is:
    | - com -- all classes are under this dir.
    | - lib -- all the required jar files are in this dir.
    There are 59 jar files in the lib directory. When I try to create the jar file, I get the following exception:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    java.io.IOException: line too long
    at java.util.jar.Attributes.read(Attributes.java:356)
    at java.util.jar.Manifest.read(Manifest.java:167)
    at java.util.jar.Manifest.<init>(Manifest.java:52)
    at sun.tools.jar.Main.run(Main.java:124)
    at sun.tools.jar.Main.main(Main.java:904)
    Any idea, why do I get this exception? Is there any restriction as to how many jar files (or characters) can be there in the Class-Path value in the MANIFEST.MF file?
    Please help.
    Thanks,
    Ana

    use as the following way to resolve the problem:
    (1) use separate lines, to avoid too long a line for java package name lists
    (2) type a preceding space before each folloing lines, for example:
    Class-Path: ...jar ...jar ...jar
    ...jar ..jar
    ...jar ...jar
    ...jar ...jar
    Hello Folks,
    I am trying to create a jar file using the following
    command:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    My MANIFEST.MF file is as following:
    Manifest-Version: 1.0
    Main-Class: com.gridftp.INSPgridFTP
    Class-Path: lib/activation.jar lib/ant.jar
    lib/antlr.jar lib/axis.jar lib/castor-0.9.3.jar
    lib/cog-abstraction-common-2.0.jar
    lib/cog-abstraction-examples-2.1.jar
    lib/cog-certmanagement-1.0.jar
    lib/cog-certrequest-1.0.jar
    lib/cog-grapheditor-0.46.jar
    lib/cog-gridfaces-1.0.jar lib/cog-gridshell-1.0.jar
    lib/cog-jglobus-1.2-050621.jar
    lib/cog-karajan-0.31.jar
    lib/cog-provider-clref-gt3_0_2.jar
    lib/cog-provider-clref-gt3_2_0.jar
    lib/cog-provider-clref-gt3_2_1.jar
    lib/cog-provider-clref-gt4_0_0.jar
    lib/cog-provider-condor-2.0.jar
    lib/cog-provider-gt2-2.0.jar
    lib/cog-provider-gt2ft-1.0.jar
    lib/cog-provider-gt3_0_2-2.0.jar
    lib/cog-provider-gt3_2_0-2.0.jar
    lib/cog-provider-gt3_2_1-2.0.jar
    lib/cog-provider-gt4_0_0-2.2.jar
    lib/cog-provider-local-2.0.jar
    lib/cog-provider-ssh-2.0.jar
    lib/cog-provider-webdav-1.0.jar
    lib/cog-resources-1.0.jar lib/cog-setup-0.91.jar
    lib/cog-util-0.91.jar lib/commons-discovery.jar
    lib/commons-httpclient.jar lib/commons-logging.jar
    lib/concurrent.jar lib/cryptix32.jar
    lib/cryptix-asn1.jar lib/cryptix.jar
    lib/j2ssh-common-0.2.2.jar lib/j2ssh-core-0.2.2.jar
    lib/jaas.jar lib/jakarta-regexp-1.2.jar
    lib/jakarta-slide-webdavlib-2.0.jar lib/jaxrpc.jar
    lib/jce-jdk13-125.jar lib/jgss.jar lib/jug-1.0.1.jar
    lib/junit.jar lib/log4j-1.2.8.jar lib/mail.jar
    lib/puretls.jar lib/saaj.jar lib/wsdl4j.jar
    lib/xercesImpl.jar lib/xml4j.jar lib/xml-apis-1.1.jar
    lib/xmlsec.jar lib/xpp3-1.1.3.4d_b4_min.jar
    lib/xstream-1.1.1-patched.jar .
    The grid-jar directory structure is:
    | - com -- all classes are under this dir.
    | - lib -- all the required jar files are in
    e in this dir.
    There are 59 jar files in the lib directory. When I
    try to create the jar file, I get the following
    exception:
    jar -cvfm mygrid.jar MANIFEST.MF -C grid-jar/ .
    java.io.IOException: line too long
    at
    at
    at
    at
    java.util.jar.Attributes.read(Attributes.java:356)
    at
    at
    at java.util.jar.Manifest.read(Manifest.java:167)
    at
    at
    at java.util.jar.Manifest.<init>(Manifest.java:52)
    at sun.tools.jar.Main.run(Main.java:124)
    at sun.tools.jar.Main.main(Main.java:904)
    Any idea, why do I get this exception? Is there any
    restriction as to how many jar files (or characters)
    can be there in the Class-Path value in the
    MANIFEST.MF file?
    Please help.
    Thanks,
    Anajust

  • Odi error message too long to capture

    We are trying to insert error messsage into our error table using a procedure.
    To get the error, i am using API: odiRef.getPrevStepLog("MESSAGE") after the interface that raise the error, in a "KO" red line.
    But,Message will be very huge and more than 4000 characters and getting "ORA-01704: string literal too long" error.
    I just need to capture one line error information. I would appreciate if anybody suggests how to achieve this ASAP. We are using ODI 10g
    Thanks in advance
    RP

    Hi,
    You can use oracle's Substr Function with the odiRef.getPrevStepLog .
    Example
    insert into my_table.my_column values SUBSTR('<%=odiRef.getPrevStepLog("MESSAGE")%>',1,4000) ;
    This should give you the message staring from 1st position till 4000th position.
    Modify the query according to your need.
    Thanks,
    Sutirtha

  • Input parameter error: "string too long"

    Hi,
    SAP4Rails and SAPNWRFC run really well now, and I have not experienced a problem for a long, long time.
    However, in an RFC I want to use, there is an import parameter (a plain value), which is of the type SYSUUID. The definition of this type says
    <Format - Data Type "RAW" - No. characters "16"> and <Output Characteristics - Output Length "32">. Locally it works with 32 characters of input, but if I try to call the RFC through SAP4Rails, the error "RfcSetByte string too long" occurrs. Any idea, why this could be?
    Thanks a lot in advance,
    Bernd

    This maybe a bug - if you can compile your own sapnwrfc can you try finding the following code:
        if (RSTRING(value)->len > max)
            rb_raise(rb_eRuntimeError, "RfcSetByte string too long: %sn", StringValueCStr(value));
    and changing it to:
    code]
        if (RSTRING(value)->len > max*2)
            rb_raise(rb_eRuntimeError, "RfcSetByte string too long: %s\n", StringValueCStr(value));
    [/code]
    and let me know what effect that has.
    Cheers.

  • Inner join.   error.  too long. unique. unique

    hi,
    I am a beginer to ABAP and trying to  do an inner join using 3 tables that are given by SAP
    scustom, spfli, and sbook. I want to join these 3 tables and  get
    the customer booking info and wants the result of
    customer_no , cust_name, Booking_ID, City_From, City_To, etc.
    my query i s below.
    select cid cname bbookid bconnid bfldate fcityfrom f~cityto
    into table it_scust
    from ((scustom as c inner join sbook as b
    on cid = bcustomid)
    inner join spfli as f on fconnid = bconnid and fcarrid = bcarrid).
    when i execute the program i am getting the error  that the 'query is too long. unique. unique. unique.'.
    If  I am joing only two tables it is working fine. Is there something wrong with my query?  Any ideas on this? Please help.
    Thanks in advance.

    Hi neeraja,
    what ever the code you have written is fine but it is unique/ too long means  the code you have written is not ending perfectly which is not identified by syntax error. your code is
    select cid cname bbookid bconnid bfldate fcityfrom f~cityto
    into table it_scust
    from ((scustom as c inner join sbook as b
    on cid = bcustomid)
    inner join spfli as f on fconnid = bconnid and fcarrid = bcarrid).
    iam sending the same code but with little modification just try this u will get the output.
    select cid cname bbookid bconnid bfldate fcityfrom f~cityto
    into table it_scust
    from (scustom as c inner join sbook as b
    on cid = bcustomid)
    inner join spfli as f on fconnid = bconnid and fcarrid = bcarrid.
    find the difference what i made.
    pls reward points if it is helpful.

  • Urgent ..Please Help .Geting error URI too long

    I have a jsp page and it has a text area. When I am inputing shorter
    text it works fine but when I am putting longer text I am
    having an error that "Get is not defined" and in the http server error
    log I am getting URI too long error.
    The text area when submitted...supposed to invoke a servlet which(the servlet) will do some error checking on the input text.
    How can i overcome this limitation of http server ?
    Please help ...
    Thanks.

    I tried with post method but still get the error.
    Here is my jsp code..
    <form name="inputnews" method="post" action="validation">
    <table>
    <tr>
    <td width="600"><img src="//www.ibm.com/i/c.gif" width="600" height="4" alt=""/>
    </td>
    </tr>
    and here is the servelet(name validation) code:
    public void doPost(
         javax.servlet.http.HttpServletRequest req,
    javax.servlet.http.HttpServletResponse resp)
         hrows javax.servlet.ServletException, java.io.IOException
              System.out.print("i am in post");
              HttpSession session = null;
              String flag3 = "";
              String check = "checkok";
              Info info = null;
              String category = req.getParameter("category");
              String title = req.getParameter("title");
              String content_area = req.getParameter ("content_area");
    *** the content_area is the text area where user put long input
    Anything i am missing here ?

  • Tirefox will not load in windows 7 after upgrade but is ok in linex(error taking too long to connect)

    my harddrive is partitioned 50/50. 1st half has windows 7 on it and 2nd half has ubuntu 11.10.
    Since latest upgrade of firefox the linex runs ok. but the windows 7 will not connect and gives error "taking too longto connect"
    I have tried deleting firefox and reloading yo no avail.

    The windows update sometimes creates issues. I've had this happen to me two times. I rolled back to the Firefox 8 and didn't have any problems, however one thing you can try is to increase your timeout range and try that. If its loading fine in linux we have to assume its not systemic, but is an OS issue. How long does it hang before you get the error?

  • MTU error (Path too long) with linux-3.6.2

    I have a PC running 24/7, with an OpenVPN connection up all the time as well. I also have a (shared) ssh connection open, through said vpn. Every night an rsync job is ran, to backup some stuff over said VPN, through a shared ssh connection.
    Starting a few days ago (Oct 17) I've had trouble with this, as in after rsync started, it would not be able to finish its job, getting "interrupted" (or, hanged) quite early on.
    Looking in the journal, I can see error messages such as those (right after rsync starts, which happens at 02:23) :
    Oct 17 02:23:05 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:06 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:06 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:06 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:06 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:07 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:09 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:13 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:22 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:23:39 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:24:13 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:25:20 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:27:21 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:29:21 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:31:21 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:33:22 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:35:22 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    Oct 17 02:37:22 arch.local openvpn@xxx[552]: read UDPv4 [EMSGSIZE Path-MTU=1460]: Message too long (code=90)
    This eventually led to the ssh connection timing out, and the rsync job failing to complete.
    Also, restarting OpenVPN seems to "fix" the issue, without the need to change any settings.
    That's when I realized this started happening since upgrading the kernel to 3.6.2, so I then downgraded to 3.5.6 (Oct 19) and, since then, haven't had any issue.
    So I'm thinking this is some kind of bug/regression in the 3.6 kernel, but I'm not really sure what to do now.
    Note: I see 3.6.3 is out (and in testing), but only looked at the changelog so far (and didn't see anything that seem related to this issue?).

    Thanks for your answers (and sorry about the delay).
    I'm not sure how to read the error message actually, but I use default settings and `ip addr show` reports a MTU of 1500 indeed. Also, (on linux-3.6.2) I tried using OpenVPN's --mtu-test option to see what it would say (even though early on I never have a problem), and here it is:
    NOTE: Empirical MTU test completed [Tried,Actual] local->remote=[1541,1541] remote->local=[1541,1541]
    I'm nor really sure what it means, that I could (should?) use 1541 instead of 1500? And if so, how come it says I could go higher while I get errors with Path-MTU=1460 ? And actually, right before this result I do have a couple of those Path-MTU errors in the log, so I really don't know what to make of it, could it fail at 1460 but work higher? Does that even make sense?
    I still don't know if it's really an MTU issue or not, since the kernel 3.5.6 isn't affected. Anyhow, I'll probably install 3.6.3 and see, hopefully it'll be back to normal.... if not I guess I'll have to try and set an MTU, though I'm not sure to what.
    Also, would that require the OpenVPN server to have its MTU set that way as well (Since currently it also uses default settings, so MTU 1500) ?

  • Read report line too long error ?

    hi friends.
    my program allowed this error.
    read_report_line_too_long
    what do I do ?
    help me please

    Don't do any setting changes, try to modify the code if it is custom namespace.
    assume this the code with more than 72chars..
    read table itab into wa_itab with key matnr = v_matnr  vbeln = vbeln transporting something binary search
    you have to break that into two lines like the below..
    read table itab into wa_itab with key matnr = v_matnr
                                                  vbeln = vbeln
                               transporting something binary search
    where ever you find the line more than 72 chars you change it. not event comment lines should not exceed more than 72 chars.
    what are you doing exactly can you let me know..
    if you are using READ REPORT if you have a program with more than 72 chars length then you will end up with that error. see the standard SAP documentation
    DATA prog TYPE c LENGTH 30.
    DATA itab TYPE TABLE OF string.
    prog = '...'.
    READ REPORT prog INTO itab.
    Catchable Exceptions
    CX_SY_READ_SRC_LINE_TOO_LONG
    Cause: At least one line of the source code is longer than the rows of the internal table itab.
    Runtime Error: READ_REPORT_LINE_TOO_LONG

  • Error integer too long

    Hi,
    I'm taking a Java class currently, so please forgive me if I make any stupid mistakes. My assignment was to make a UPC checker and we are supposed to code in Bluej.
    //Code thus far
    import chn.util.*;
    public class UPCChecker
    private long checkdigit;
    private int[] numArray = new int[11];
    public long getDigit(long code)
    for(int i=10; i>=0; i--)
    numArray[i] = (int)(code%10);
    code = code/10;
    long sum = numArray[0] + numArray[2] + numArray[4] + numArray[6] + numArray[8] + numArray[10];
    sum *= 3;
    long sum2 = numArray[1] + numArray[3] + numArray[5] + numArray[7] + numArray[9];
    sum += sum2;
    checkdigit = sum%10;
              if(checkdigit != 0)
              checkdigit = 10 - checkdigit;
              return checkdigit;
         public boolean isValid()
         boolean valid;
    if (checkdigit == numArray[11])
    valid = true;
    else
    valid = false;
    return valid;
    //End Code
    When I create an instance, run it in Bluej (it automatically provides the box for input), and type in an example UPC code (12 digits), it says "Error: integer number too large". When I type in 9 digits, it works though. I would appreciate any advice and help.
    Thanks,
    miscreant.

    Thanks for the advice, I'll repost it the correct way: Good, but now your code doesn't even compile. My guess is that you
    copied and pasted the source from your original post and put it between
    those tags. This what it reads like now:import chn.util.*;
    public class UPCChecker
    private long checkdigit;
    private int[] numArray = new int[11];
    public long getDigit(long code)
    for(int i=10; i>=0; i--)
    numArray = (int)(code%10);No need to go any further: you cant assign an int value to an int array.
    Most likely you'll find me a nasty nitpicker but that's what programming
    is all about: the design is the overall structure of it all, the implementation
    is about those gory details which should at least be readable for the
    audience you're writing for in this forum.
    kind regards,
    Jos

  • Expression node line too long

    Hi,
    I have an expression node which is very long.  How do I break it into multi-lines?
    Thank you in advance.
    Qing

    Hi Lucither,
    I tried but do not know how to do it.  Instead I attached my images of VI to you in a Word document.
    Thank you for help.
    Regards,
    Qing
    Attachments:
    HelpNI.docx ‏55 KB

Maybe you are looking for

  • My klondike disappeared : how to get it back ?

    This old klondike I was using so often stopped working. When I connected to iThunes and I synchronized... it removed all the games I had (the basic ones). How could I get Klondike back ??? Thanks in advance.

  • My blackberry keeps sending and receiving data

    and it is draining my battery!!!! My phone is just sitting beside me, not receiving any emails or texts and it isn't loading an internet page, so I don't know what it is doing. My battery is dying before 11:00 AM which shouldn't happen.

  • Kdevelop and code completion

    hi all, i'm trying to resolve a trouble... i use kdevelop for write c++ code and i cannot use code completion... in kdevelop faq there's wrote that i can activate code completion in the projects options' section named "Specific c++", i ativate it but

  • Webdynpro foms in GP

    Hi All Im Using Webdynpro form in GP.I Use Two Webdynpro Foms one for Submit and another for Approval. I mapped two forms.During runtime after selecting a template in the next step its asking parameters mandatory.But i want to fill the form after com

  • Recon error - java.lang.IndexOutOfBoundsException

    While running recon for an AIX server in SUn IDM 8.1, I am getting the following error: Error iterating accounts for resource sys1: java.lang.IndexOutOfBoundsException: Index: 229, Size: 229 and the recon goes into Failed status. What could be the re