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

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

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

Similar Messages

  • Need help in Java Script

    i Need some help in Java Script,
    am using the following code :
    <script type="text/javascript">
    var newwindow;
    function poptastic(url)
    newwindow=window.open(url,'name','height=300,width=400,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
    if (window.focus) {newwindow.focus()}
    else {newwindow.close()}
    //     if (window.focus) {newwindow.focus()}
    </script>
    In HTML,
    thWorld Environment
    Day, June 5<sup>th</sup>,2005
    Am using onmouseover event, so that when my mouse in on the link, popup is opened....and when my mouse is out of the link, the new window should b closed....
    but according to the above code, the new window is opened but have to close it manually....
    Is there any other way to close the popup when my mouse is out of the link

    Prawn,
    This is not really a good way to make friends. With the cross posting and the posting in a wrong forum anyway thing you have going.
    Please kindly take your question to an appropriate JavaScript forum.
    Have a happy day.
    Cross post from http://forum.java.sun.com/thread.jspa?messageID=3797201

  • Need help with Java always get error

    hey guys need help
    this the problem i get :
    I go to certain websites and I get this error with firefox.
    This Site requires that JavaScript be enabled.
    It is enabled.
    This is the one of the errors in java script console with firefox.
    Error: [Exception... "'Component does not have requested interface' when calling method: [nsIInterfaceRequestor::getInterface]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "<unknown>" data: no]
    I have installed the java script from there home site and did a test and says everything is fine. Any ideas?
    please help

    Hi 49ers,
    Sorry not to have any real idea of how to help you out here, but this is a Java forum, not JavaScript.
    Some Firefox expert may stumble across your post and be able to offer some advice (I hope they do) but this isn't really the best place to post such questions.
    Try here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3
    Good luck!
    Chris.

  • Need help with java

    ok so i have a midterm and need help this question that is gonna be on the midterm. i dont know how to do it and its worth 16 marks!!!! here it is
    the UW Orchestra wants to produce a CD containing all the pieces of music
    from its upcoming concert. In order to do that, it needs to calculate the total length of time for the
    CD. In addition, the conductor wishes to know which piece of music has the longest duration.
    Sample output for the program.
    The Swan (3.88)
    The Bee (0.98)
    Claire de Lune (6.02)
    Liebesfreund (3.38)
    Ragtime (3.48)
    The total time for the CD is 18.74 minutes.
    The longest piece is Claire de Lune.
    Do not include the HTML that is required to embed the program into a Web page (that is, show
    only what you would write between <script> and </script> tags).
    [4 marks] In the following space, define a function, Print, that takes two parameters, Title and
    Length, and outputs a line of text such that Title appears in italics, followed by Length in
    parentheses. The function also returns the value of Length.
    For example, Print("My World",30) will output the line
    My World (30)
    and return the value 30.
    Put your JavaScript program for the remainder of this question in the space provided on the next
    two pages.
    [9 marks]. For each piece of music, your program should input the title of the piece and the
    duration (in minutes) for that piece, and it should output a line showing those values using the
    Print function just defined. After all pieces have been listed, the program should output the
    total length of time for the CD, adding in 0.25 minutes between each piece of music (which is
    needed on the CD to separate the pieces).
    [3 marks] The program should also output the name of the piece that has the longest playing
    time.
    Use reasonable variable names, indentation and good programming style. Documentation and
    comments are not required, but you may add them to explain any assumptions you might want to
    make. You need not check that the input is valid, and you may assume that no two pieces have the
    same duration.
    can anyone help me out! i would be indebt of ur kindness if u can help me out!

    This forum is for Java, not JavaScript. The two have nothing to do with each other.
    And anyway, this is your studying, so you should try to do it, put forth your best effort, and ask specific questions (on the proper fourm).

  • Need help with Java Script to perform a calculation in Adobe Acrobat Pro 9 form

    I have a form (test) that I am creating in Adobe Acrobat Pro 9.
    I need help creating custom Java Script so I can get the desired answer.
    1) There are several questions in each group that require a numerical answer between 0-4
    2) There is a total field set up to sum the answers from all above questions
    3) The final "score" takes the answer from Step 2 above and divides by the total possible answer
    Any help on what Java Script I need to complete this would be greatly appreciated!
    I've attached a "spreadsheet" that shows it in more detail as well as what formulas I used in Excel to get the desired end result.
    Thanks in advance.

    Have you tried the "The field is the average of:"?

  • Need Help Regarding JAVA BEAN

    Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
    thanks in advance
    Rehan MIrza

    Here is a good link that indicate that JavaBean is not only for applets
    http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
    quote:
    The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
    Francois

  • Need HELP in JAVA ( client /server application )

    hi there ,
    I need the following codes in java for my client/server application . which i can use to perform certain function on another computer on LAN. This is part of my semester project . I would really appreciate if any one can help me
    ->Open/close the CD-ROM once or in intervals (specified in seconds).
    ->Swap mouse buttons the right mouse button gets the left mouse button's functions and vice versa.
    ->Start optional application.
    ->Play optional sound-file.
    ->Point the mouse to optional coordinates.
    ->Shutdown the system, logoff the user etc.
    ->Mouse can be controlled on the target computer with remote mouse.
    ->Keys (letters) on the keyboard can be disabled.
    ->Increase and decrease the sound-volume.
    ->Listen for keystrokes and send them back to you!
    I would really appreciate if some1 can help me find these codes in java
    thanx
    Alamzaib Shafi
    [email protected]

    Dude, if you did your own homework once in a while you'd be able to handle your own semester project. I hope you fail your class and get kicked out of the program. One less idiot with a diploma competing with us hackers for the tech jobs.
    You are indeed a most worthy recipient of my unemployed angst.

  • Need help on Java in sound application

    A good day to everyone here,
    I need help on using Java.My project is mainly manipulating WAV sound files with Java. There is some problem.I hope you all can help me. I couldn't find much info about Java in sound manipulating,sample coding or something like that. I need to find the command to
    1) Find each sampling point value in a sound file.
    2) Find the number of sampling point and the average value of the all the sampling point.
    3) Record the sound file in a different bit rate format.
    I dont know how to go about it.I really hope you all can help me, or direct me to any resources that may help me. Your help is very much appreciated.
    Thank you very much....

    i found this coding in a website n i not very sure that i understand it.
    can anyone tell me if i can find the sample point value of a sound file with this coding (byte[] source is byte array of the sound file).
    thanks...for all the help
    public byte[] executeAmplitudeTransformationInternal(byte[]
    source)
    int[] sampleArray = getSampleArray(source);
    int[] newSampleArray = executeTransformation(sampleArray);
    //convert 16 bit samples back to 8 bit byte[]
    return getByteArray(newSampleArray);
    public int[] getSampleArray(byte[] eightBitByteArray) {
    //create an array 1/2 the size (since every 2
    //8bit samples makes 1 16bit sample)
    int[] toReturn = new int[eightBitByteArray.length];
    int index = 0;
    for (int t = 0; t < eightBitByteArray.length; t += 2) {
    //read the high bit
    int low = (int) eightBitByteArray[t];
    //read the low bit
    int high = (int) eightBitByteArray[t + 1];
    //bit shift the high bit 8 bits to the left and
    // "And" the low bit against 255 to drop any
    //sign extended data in the top 8 bits.
    //refer to the tutorial for more clarification
    toReturn[index] = (high << 8) (low & 0x00ff);
    index++;
    return toReturn;
    public byte[] getByteArray(int[] sampleArray) {
    //create a new byte[] twice as big as the sample array
    //because it takes two 8-bit bytes to represent one
    //16-bit sample
    byte[] toReturn = new byte[sampleArray.length * 2];
    int index = 0;
    for (int t = 0; t < sampleArray.length; t++) {
    int sample = sampleArray[t];
    //this places the low byte in the array.
    //the downcasting automatically lops off the high byte
    toReturn[index] = (byte) sample;
    index++;
    //this byte shifts the sample 8 bits to the right
    //this puts the old high byte in the position of the low byte.
    //this way the high byte remains after the downcasating from
    //an int to a byte
    toReturn[index] = (byte) (sample >> 8);
    index++;
    return toReturn;
    public int[] executeTransformation(int[] sampleArray) {
    //create a clone sample array
    int[] newSampleArray = new int[sampleArray.length];
    //apply algo to each sample
    for (int t = 0; t < sampleArray.length; t++) {
    int result = (int) (sampleArray[t] );
    //add the sample
    newSampleArray[t] = result;
    return newSampleArray;

  • Need Help with Java Desktop CP Icon

    I just formatted and reinstalled Windows XP Home SP2 and installed the JRE 1.5.0.02. I usually see an icon in my Control Panel but it only appears in the Administrator's CP which I can reach in Safe Mode of course, but it would be easier to deal with if it appeared somewhere on my desktop/taskbar or CP (I am also an Admin). In Safe Mode I made sure that the right settings were made for displaying, but it doesn't.
    I know precious little about Java so I need help here.

    This forum is dedicated to Sun's Java Desktop System, an alternative desktop operating environment. Try reposting here:
    http://forum.java.sun.com/forum.jspa?forumID=54

  • Need help for java program

    Hi,
    I need help with my web application. When i tried to run it using
    localhost:8080
    it's giving me error that
    signup.do file is not available.
    can someone tell me what could be wrong with my code?
    I want to know what is .do file and what needs to do to have remove the error
    I have also used struts config file.
    Please help me.
    Message was edited by:
    star4588

    See struts documentation here http://struts.apache.org/1.2.9/userGuide/building_controller.html#action_mapping_example
    you should have something like that :
    <action-mappings>
            <action
                path="/signup"
                type="org.apache.struts.webapp.example.SignupAction"
                name="signupForm"
                scope="request"
                input="/signup.jsp"
                unknown="false"
                validate="true" />
        </action-mappings>in your struts-config.xml.
    Hope That Helps

  • Need help on java Telephony package

    Hello Friends,
    I am involved in a telephony software development...and I want to use JTAPI for it...but Iam encountering a very basic problem...Iam having jdk1.3 installed in my PC...but whenever I import the javax.telephony.* package,I get an error 'cannot resolve symbol'...please tell me what is the solution for it...also what changes I need to make in path setting so that I can implement it...ie...which jar file I need to include in the classpath...I would like to know if any good guiding tutorial is available for it on the net...
    Ashish

    Hello freddyrb!
    First, you need to download JTAPI from java.sun.com,
    because it don't present neither in the standard jdk nor jre.
    But, the JTAPI kit is only a bunch of INTERFACES so
    you need some implementation, which Sun didn't (and imho shouldn't) provide.
    And the problem is a lack of JTAPI implementations.
    The only one i have heard of is a some fake system from alphaworks (http://www.alphaworks.ibm.com/aw.nsf/FAQs/j323engine).
    No of hardware providers did gladden us with a JTAPI port (at least as of fall of 2000, the last time i checked it). BTW, if someone knows of any JTAPI-enabled yet not too exotic hardware, let me know, please, serge(AT)zolshar.ru.
    As for JTAPI over a modem, i heard of an implementation of JTAPI over TAPI but now the project is dead.
    Look also here
    http://free-jtapi.westhawk.co.uk/

  • Please I need help in java oracle.apps.per.DataInstall

    Hi all
    Please can any body help me , when I try to run datainstall to prepare add hrglobal patch by using this command:
    java oracle.apps.per.DataInstall thin hostname:dbport:oraclesid
    but I got this error :
    Data Install java.sql.SQLException: Io exception: Got minus one from a read call
    Regards

    Hi,
    Please mention the application release along with the database version and OS.
    Are you running the command as applmgr user and after sourcing the application env file?
    java oracle.apps.per.DataInstall thin hostname:dbport:oraclesidAre you passing the apps username/password to the command?
    java oracle.apps.per.DataInstall <apps username> <apps password> thin <host:port:sid>
    Latest Oracle HRMS Legislative Data Patch Available (HR Global / hrglobal) [ID 145837.1]
    Please see the suggested solutions in these docs.
    Application Of Patch 5404886 Fails During AK Load Session Error: 17002 Io Exception: Got Minus One From A Read Call [ID 404313.1]
    Unable to connect jdeveloper to 11.5.10 instance [ID 294685.1]
    Thanks,
    Hussein

  • Need help in java.security, please............

    I need to implement encryption in my java card.
    My sdk is v.2.2.1.
    At first, I just write a easy code and test adpu command in jcwde and it works well. (response 90)
    But every time when I trying to put
    desKey = (DESKey)KeyBuilder.buildKey (KeyBuilder.TYPE_DES,KeyBuilder.LENGTH_DES,false);"
    into procedure, the response becomes 6444, which means install error.
    Some people said in the forum that javacard.security only provide key interface, but is it the same in v2.2.1? If it is,then what's the function of KeyBuilder?
    Below is a part of my code.
    private SimCipher(byte[] bArray, short bOffset, byte bLength)
         desKey = (DESKey)KeyBuilder.buildKey (KeyBuilder.TYPE_DES,KeyBuilder.LENGTH_DES,false);
              register();

    Thank you for your reply. Actually, I was trying to implement AES in smart card, and I decide to write it myself. It is sucessed.
    Thank you again for your help.

  • Need Help with Java please

    Hi, I'am new to these forums just wondering if someone can help me, my problem is I have a txt file on a web server I have read in using a 'StreamConnection' and 'StringBuffer' converting the data in the txt file to String.
    what I am stuck on though is the data holds user names and passwords which I need to validate for login.. I have set up a login form with textfield for userName and Password. If the user name and password match I then need to print out the relevent data from that users field.
    Can anyone assist me with this? the fields look like this:
    1|johnsmith|js|50|40|67|77|�
    .etc. .
    cheers,
    Andrew.
    Message was edited by:
    akane_1984

    with the login/password screen I have created the user puts his name and password in:
    John Smith - js .. so what I need is when that happens and user clicks login how do I get the program to search the txt file to make sure that name & pw is correct and then output on screen the values in John smiths field. . this is full txt file:
    id|UserName|Pw|Score1|Score2|Score3|Score4|�
    1|johnsmith|js|50|40|67|77|�
    2|alansmith|as|57|81|56|66|�
    3|jackdowie|jd|57|68|32|55|�
    4|jorgcosta|jc|54|72|83|49|�
    5|johngregg|jc|77|55|89|80|�
    6|ianorr|io|46|56|71|60|�
    Message was edited by:
    akane_1984

  • Need Help for Java Homework Assignment, Can someone Please help me ?

    This is the program that I am supposed to write, and I am terrible confused, as it takes at least 3 different files.
    Write a class named GroceryList that representss a person's list of items to buy from the market, and another class named GroceryItemOrder that represents a request to purchase a particular item in a given quantity. (I.E. four boxes of cookies).
    **The GroceryList class should use an array field to store the grocery items, as well as keeping track of its size (number of items in the list so far). Assume that a grocery list will have no more than 10 items. A GrocerList object should have the following methods:
    public GroceryList()
    Constructs a new empty grocery list.
    public void add(GroceryItemOrder item)
    Adds the given item order to this list, if the list is not full (i.e., has fewer than 10 items).
    public double getTotalCost()
    Returns the total sum of all grocery item orders in this list.
    The GroceryItemOrder class should store an item quantity and a price per unit. A GroceryItemOrder object should have the following methods:
    public GrocerItemOrder(String name, int quantity, double pricePerUnit)
    Constructs an item order to purchase the item with the given name, in the given quantity, which costs the given pricer per unit.
    public double getCost()
    Returns the total cost of this item in its given quantity. I.E. 4 boxes of cookies that cost 2.30 per unit, have a total cost of 9.20.
    public void setQuantity(int quantity)
    Sets the grocery item's quantity to be the given value.
    Any suggestions would be sincerely appreciated.
    Thanks.

    Pete,
    I having difficulty with the main class, and getting console to store a users input into a string array ... I will post the code that I have so far. Sorry I am trying real hard to learn ... and just having a frustrating time.
    This is what I have in the main file.
    import java.util.*;
    public class Chapter_8 {
         public static void main(String []args){
              Scanner console = new Scanner(System.in);
              System.out.println("Please enter the first item of your list");
              String[]GroceryList = console.next();
              System.out.println("Please enter the next item of your list");
              String[]GroceryList = console.next();
              System.out.println("How many would you like to buy?");
              int quantity = consolenextInt();
         }This is what I have in the GroceryItem Class file:
    public class GroceryList{
    public GroceryList(){
    Static String []GroceryList ={"beans", "macaroni", "milk", "cheese", "bread", "eggs","hamburger","Hotdogs","peas","cookies"};
    for(int i=0;i<5;i++){
    System.out.println(GroceryList);
    And the final file that I have is the GroceryItemOrder Class file:public GroceryItemOrder(String name, int quantity, double pricePerUnit){
    this.name = name;
    this.quantity = quantity;
    this.pricePerUnit = pricePerUnit;
    public double getCost(){
    public void setQuantity(int quantity){
    Sorry, I know it isn't much, that's why I am frustrated.
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for