Help: running Java parallel program on distributed-memory cluster

I'm now working on a project which requires to parallelize a Java program and run it on a cluster. However, I cannot find any java-MPI binding interface. The one seems feasible is mpiJava but I cannot correctly install it on the machine. Furthermore, since the code was written on Java 1.5, it's quite troublesome to change it back to Java 1.4, so I am more inclined to use pure Java. Is it a way to do so?
Thank you very much!

thanks.. but i think i have them on CLASSPATH :
for the JMail example :
export CLASSPATH=/opt/jdk1.5.0/:/opt/jdk1.5.0/javamail-1.3.2:/opt/jdk1.5.0/jaf-1.0.2:~ /STUFF/JMail
i didn�t understand why you mencioned "." ?? i think the executable is JMail.java that�s why i�m running the " java JMail"... right ?

Similar Messages

  • Sourcing : Error while Running Java Concurrent Program

    Hi All,
    Navigations:
    Application: Sourcing
    Responsibility : Sourcing Buyer
    Concurrent Program : Generate and Store Sourcing response spreadsheet
    I am trying to run
    Java Concurrent Program : Generate and Store Sourcing response spreadsheet in SRS Window,
    it completed with Error status.
    Please let me know How can I run this Concurrent Program with Normal status and able to view/save the Output.
    Please provide resolution on this.

    Thanks for your reply..
    Program: Generate and Store Sourcing response spreadsheet
    ShortName: PON_EXPORT_RESPONSE
    Application: Sourcing
    Executable: ExportResponseCp
    Method: Java Concurrent Program
    Responsibility : Sourcing Buyer.
    Has this ever worked? If yes, any changes been done recently?
    => No
    Is this the seeded concurrent program or a custom one?
    => Its seeded program.
    EBS: R12.1.3
    Login as Sourcing Buyer Responsibility :
    When you create RFQ and then Close RFQ and then create Surrogate quote and after you Export the Spreadsheet in SelfService Pages it generates the output.
    But if You run the concurrent program (Generate and Store Sourcing response spreadsheet) it errors out.
    Error : Exception in thread main java .lang.stringIndexOutOfBoundException:
    Thanks..

  • Java.lang.OutOfMemoryError when running java concurrent program

    Hi,
    i had written a java concurrent program to create the content items into Oracle Content Manager (OCM). Process the records from interface table and create the content items into OCM by calling the API IBC_CITEM_ADMIN_GRP.upsert_item().
    I run the concurrent program with 2000 records in interface table, it's an one to one process, 563 records are processed and 563 content items are created successfully in OCM. After 563 records continuously throws the Exception
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('EX - bundle validation others--');
    x_return_status := FND_API.G_RET_STS_ERROR;
    FND_MESSAGE.Set_Name('IBC', 'A_BUNDLE_ERROR');
    FND_MESSAGE.set_token('SITUATION', 'VALIDATION');
    FND_MSG_PUB.ADD;
    IF IBC_DEBUG_PVT.debug_enabled THEN
    IBC_DEBUG_PVT.end_process(
    IBC_DEBUG_PVT.make_parameter_list(
    p_tag => 'OUTPUT',
    p_parms => JTF_VARCHAR2_TABLE_4000(
    'x_return_status', '*** EXCEPTION *** [' || SQLERRM || ']'
    END IF;
    in IBC_CITEM_ADMIN_GRP.validate_attribute_bundle() API.
    Again running the concurrent program it process another 563 records. Can any one help me to fix this issue?
    i figured out the exception. When debug the error, i got the actual error message like this
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.OutOfMemoryError
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ArrayIndexOutOfBoundsException: -2048 < 0
    for this issue i increased the heap memory size up to 1024MB. Still i have the same issue. Can any one help to fix the issue?

    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.ArrayIndexOutOfBoundsException:
    -2048 < 0Aren't the null pointer and arrayindexoutofbounds, the ones which you get when you are trying to read beyond your array? (example: when your loop tries to access the 563rd element in your array, since your array index starts from 0)?
    May be if you can try to write out your elements in the array, you might see what it is croaking about.
    Thanks,
    Chiru

  • Facing error wen running Java Concurrent Program to insert data into  table

    Hi All,
    Its first time I am wrkng on Java Concurrent Programs. I created a java class with the below code:
    import oracle.apps.fnd.cp.request.*;
    import oracle.apps.iby.scheduler.*;
    import java.sql.*;
    import java.sql.Statement;
    import java.sql.Connection;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.cp.request.CpContext;
    import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
    import oracle.apps.iby.database.DBWrapper;
    import oracle.apps.iby.ecapp.OraPmt;
    import oracle.apps.iby.exception.Log;
    import oracle.apps.iby.security.SecurityUtil;
    //package oracle.apps.ibe.util.key;
    //package oracle.apps.iby.scheduler;
    // Referenced classes of package oracle.apps.iby.scheduler:
    // SchedUtils
    public class XXIBE_KeyInsert
    implements JavaConcurrentProgram
    public XXIBE_KeyInsert()
    public void runProgram(CpContext cpcontext)
    try{
    String s;
    oracle.apps.fnd.cp.request.ReqCompletion reqcompletion;
    Connection connection;
    // s = "iby.scheduler.XXIBE_keyInsert.runProgram";
    reqcompletion = cpcontext.getReqCompletion();
    connection = null;
    OraPmt.init(cpcontext);
    Log.debug("Inserting Credit Card key", 1, "XXIBE_KeyInsert.java");
    byte abyte0[] = SecurityUtil.getSystemKey();
    connection = cpcontext.getJDBCConnection();
    Statement st = connection.createStatement();
    String sql = "Insert into xxibe_scodes values ("+abyte0+")";
    st.executeUpdate(sql);
    connection.commit();
    st.close();
    connection.close();
    Log.debug("done", 1, "XXIBE_KeyInsert.java");
    reqcompletion.setCompletion(reqcompletion.NORMAL, "Request Completed Normal");
    OraPmt.end();
    SchedUtils.setSuccess(reqcompletion);
    DBWrapper.closeDBConnection(connection);
    catch(Exception e){
    e.printStackTrace();
    //reqcompletion.setCompletion(ReqCompletion.ERROR, e.toString());
    I compiled the program and in the java_top/oracle/apps/../.. (in the pkg given). Now the class files and java files are in the said location. I created an executable of type "java concurent Prog" and location same as Package name.
    Created a Program and assigned it to the responsibility. Having done this when i run the CP I find it ends with an error msg. The log files show the below exceptions: "java.lang.ClassNotFound Exception".
    We are doing it in R12.0.6 and in Unix server. Pls help me where I am missing it. It turned to be an urgent requirement frm my end.
    Thanks,
    Abhishek.

    The Exception Stack is :
    java.lang.ClassNotFoundException: oracle.apps.iby.scheduler.test.XXIBE_KeyInsert
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:152).
    Please advice me on how to proceed.

  • Run Java 3D Program

    Hello All,
    I am the new in Java 3D Programming. What should i install to run a Java 3D program?
    Thanking u,
    Ripon

    Download and install Java3D API.

  • Help with Java Inventory Program - I almost got it

    Hello, I'm new to the forum so please don't hang me if I'm not posting this correctly or in the right place. I'm writing a Java Inventory Program for class and everything was great until we had to modify it to sort by product name (in my case dvd's). The problem is my arrays for inventory count and price are thrown off when I sort by dvd name because they are predefined. I could cheat and just rearrange the array in a logical order according to the dvd title but that isn't really the answer for me. Can someone help me do where my inventory count and price don't go out of wack when I sort by dvd name, I really don't want to start over.
    Here is my code:
    // Java InventoryProgram2
    // Purpose of application is to Display DVD Inventory
    import java.util.Arrays;
    public class InventoryProgram2 // declare public class
    { // Start of public class InventoryProgram1
         String dvdName[] = { "The Departed", "The Dark Knight","The Mummy", "Minority Report"};
         double itemNum;
         float stockCount[] = {3, 5, 8,2};
         float totalValue [] = new float [4];
         float price[] = { 19, 22, 17, 14};
         float totInvVal;
              // Method for printing dvdName the dvdName
              public void DvdName ()
              { // Start of print method
                   // For loop to calculate total value
                   Arrays.sort(dvdName);
                   for( int itemNum = 0; itemNum < dvdName.length; itemNum ++ )
                        totalValue[itemNum] = stockCount[itemNum] * price[itemNum];
                   System.out.printf( "%s %15s %12s %12s %12s\n", "Item Number", "Dvd Name", "Price", "Stock", "Total"); // Prints title of column
                   for ( int itemNum = 0; itemNum <dvdName.length; itemNum ++ )
                        System.out.printf("%-8d %20s %10.02f %12.02f %12.02f\n", itemNum, dvdName[itemNum], price [itemNum],stockCount[itemNum], totalValue[itemNum]); // Calls the value of each column
         } // end of method to print dvdName
         // Method for total value of the inventory
         public void totalInvValue()
         { //start of method to calc total inv value
         totInvVal = stockCount [0] * price [0] + stockCount [1] * price [1] + stockCount [2] * price [2] + stockCount [3] * price [3];
         System.out.printf("%s", "The Total Value of the Inventory is:","%10.02f");
         System.out.printf("$%.02f", totInvVal);
         } // end of method to calc total inv value
    } // End of public class InventoryProgram1
    // Java InventoryProgram2_Test
    // Purpose of application is to Display DVD Inventory
    public class InventoryProgram2_Test
    { // Start Bracket for InventoryProgram1
    public static void main ( String args[] )
    { // Start Bracket for Public Main
         InventoryProgram2 myInventoryProgram2 = new InventoryProgram2(); // invokes InventoryProgram1
    myInventoryProgram2.DvdName (); // calls DvdName Method
         myInventoryProgram2.totalInvValue(); // call method total inventory value
    } // End Bracket for Public Main
    } // End Bracket for InventoryProgram1
    Edited by: ozzie2132 on Aug 11, 2008 6:57 PM
    Edited by: ozzie2132 on Aug 11, 2008 6:57 PM

    a_turingmachine wrote:
    naive ex:
    class DVD {
    String dvdName;
    float stockCount;
    float price;
    }--turing machine:
    Suggestion 1: If you are going to give code for someone doing homework, try not to give exactly what the OP needs but rather something similar. They will learn a lot more if they have to process your recommendations and then create their own code.
    Suggestion 2: When posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, you will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. You may want to click on the Preview tab to make sure that your code is formatted correctly. Another way is to place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]or
    {&#99;ode}
      // your code block goes here.
      // note here that the tags are the same.
    {&#99;ode}

  • Help running Java apps in Mac OS 10.1.3

    I'm currently taking an intro course to Java and I've been using the OS 10.1.3 Unix Shell to compile and run my assignments, using the "javac" command to compile my classes and the "java" command to run them. It's been working fine until a few days ago when every class I started to compile from that day on wouldn't run. The previous classes I've compiled run fine, however if I re-compile them and attempt to run them I incur the same problem.
    I get this error :
    Exception in thread "main" java.lang.NoClassDefFoundError:
    followed by the classname.
    The best I can figure is that I've accidently changed some option in the java system, but now I have no idea as to how to change it back. I've asked my CS professor what to do but ofcoarse he's a PC user and when he hears Mac he just replies "I don't know about Macs" eventhough I've tried telling him that OS X is unix based. Anyways, if there are any well informed Mac OS 10.1.3 users out there, please help me so that I can resume my CS assignments on my Mac.
    Thanks,
    Craig

    1. Are you certain that you have all of your java files compiled
    and that their class files are in your classpath? Did you import
    the class TestWeeklyEmployee in your java file that has your
    main method? Do all of your class filenames have the same
    name (minus the .java or .class) as the class in the file?All of the java files needed to run the class are in the same directory, and they all have the correct names, You see I'm able to run my programs perfectly on other machines, infact I have to test them in the computer labs before I turn them in. So I know that my probrem isn't a syntax error.
    2. when you start the terminal, type the following:
    echo $CLASSPATH
    and make sure that the output it gives has the . [dot] that you
    added via the .cshrc file at the end or that only a dot gets
    displayed. If it does not have your dot in the output, then you will
    have to use the -classpath option to the java runtime binary to
    tell it where your classes are located.I tried typing echo $CLASSPATH but I got this error message:
    CLASSPATH: Undefined variable.
    And I had directly copied the code you wrote into my .cshrc file.
    3. When you try to run your java program, are you sure that you > are in the directory where all of the class files are located? use
    the "ls" command to see if your class files are in the current
    directory. (you may want to search the web for a UNIX tutorial or
    a UNIX for beginners type of article so that you can feel more
    comfortable using the Terminal application)Yes all of my classes are in the same directory and yes I'm in the correct directory when compiling and attempting to run my programs.
    4. Assuming that 3 is true: If you run your program using the
    "java -classpath . MyClassWithAMainMethod" do you still get an
    error? If you do, then I am pretty sure that you have neglected to
    import a class that your main method is trying to instantiate or
    that you have not compiled the source of the class in question >
    (or both).All classes are imported correctly and yes I have compiled the class. As I said it works fine when I compile and run on other machines, just not mine.
    Are you trying to install the developer tools from the developer
    cds? If you are and you have since updated your OS to 10.1.x,
    then I would not expect project builder to work. The same thing
    happened to me when I upgraded to 10.1.x. Sounds like you
    may need to install the latest developer tools which can be
    downloaded for free from the Apple Developer Connection site
    (http://www.apple.com/developer). Installing the latest developer
    tools should get things right for you.The developer tools that I'm attemping to run are not from the CD, they're the current downloadable version from apple developer. I've contacted apple developer support with my problem with project builder, but they blew me off.
    So now that we've eliminated these possibilities, any other ideas?
    Thanks,
    Craig

  • Pls help (running java on linux)

    Hello freinds,,
    I am in deep need..can anyone pls help me...
    I want to run my java programs on linux server.. Below are the steps I went thru to install jdk
    *** Download and copy j2sdk-1_3_1_10-linux-i586.rpm.bin to /usr/local/src.
    % su -
    # cd /usr/local/src
    # chmod +x j2sdk-1_3_1_10-linux-i586.rpm.bin
    # ./j2sdk-1_3_1_10-linux-i586.rpm.bin
    # rpm -ivh j2sdk-1_3_1_10-linux-i586.rpm
    Now test Java:
    # /usr/java/jdk1.3.1_10/bin/java -version
    Set the PATH environent variable.
    PATH="$PATH:/usr/java/jdk1.3.1_10/bin:."
    export PATH
    I went thru all above commands uninterruptedly.. Then I copied the folder containing programs in jdk1.3.1_10/bin folder
    Now when I am trying to complile or run an existing class it's gving following error message :
    java: command not found
    OR
    javac: command not found
    Can any one pls tell me where I am going wrong???
    Thanks in advance..

    From your query i understand you've installed java at "/usr/java/jdk1.3.1_10" location on your Linux box. I've a couple of queries -
    when u try to run "/usr/java/jdk1.3.1_10/bin/java -version" what do u see. Do u see the Java version information displayed on your screen ?
    and when you try export -ing the PATH variable with the following location added "/usr/java/jdk1.3.1_10/bin" and in the same shell type "which java" what do you see ? You should be seeing "/usr/java/jdk1.3.1_10/bin/java"
    If the above works then make changes to your profile file in order to ensure changes are saved for subsequent sessions.

  • Re:  Help with Java school program

    Hi, I've been trying to figure out how to make my DoubleCanvas java program to work. What I'm supposed to do is have a left canvas and a right canvas. In the middle of the applet is a button panel that can select to either draw on the left, right, or both canvases. We have a main DoubleCanvas applet class, then each canvas is drawn from a MyCanvas class. My problem is I don't know how to switch from one canvas to the other canvas from the MyCanvas class.
    Any help would be much appreciated. Thanks. :)

    Hi, sorry. I didn't want to clutter the page with stuff that might be wrong. This is my DoubleCanvas applet class in the works. I'm not sure I did the listeners correct. And I haven't gotten to add the Checkbox event stuff in the MyCanvas class in yet, because I don't know how to make the checkboxes activate a particular canvas. If you feel I should post the MyCanvas class please let me know, it's somewhat long.
    DoubleCanvas class
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.lang.*;
    import java.math.*;
    public class DoubleCanvas extends Applet
    // ---- class and instance objects ----
    private Panel button_panel;
    private MyCanvas drawing_canvas1, drawing_canvas2;
    private CheckboxGroup canvas;
    private Checkbox left, right, both;
    private Choice color_choices;
    private Button undo_but, redo_but, erase_but;
    public void init()
    color_choices = new Choice();
    color_choices.add("white");
    color_choices.add("yellow");
    color_choices.add("gray");
    color_choices.add("magenta");
    erase_but = new Button("erase");
    undo_but = new Button("undo");
    redo_but = new Button("redo");
    canvas = new CheckboxGroup();
    left = new Checkbox ( "<-", true, canvas );
    right = new Checkbox ( "->", false, canvas );
    both = new Checkbox ( "<->", false, canvas );
    button_panel = new Panel();
    drawing_canvas1 = new MyCanvas();
    drawing_canvas2 = new MyCanvas();
    drawing_canvas1.setBackground(Color.black);
    drawing_canvas2.setBackground(Color.black);
    setLayout( new GridLayout(1,3) );
    button_panel.setLayout( new GridLayout(7,1) );
    button_panel.add( left );
    button_panel.add( right );
    button_panel.add( both );
    button_panel.add( color_choices );
    button_panel.add( erase_but );
    button_panel.add( undo_but );
    button_panel.add( redo_but );
    add( drawing_canvas1 );
    add( button_panel );
    add( drawing_canvas2 );
    left.addItemListener( drawing_canvas1 );
    right.addItemListener( drawing_canvas1 );
    both.addItemListener( drawing_canvas1 );
    color_choices.addItemListener( drawing_canvas1 );
    erase_but.addActionListener( drawing_canvas1);
    undo_but.addActionListener( drawing_canvas1 );
    redo_but.addActionListener( drawing_canvas1 );
    public void paint( Graphics g ) {

  • How to run Java Card Program in a Simulator

    I m Narendra Reddy studying in India and have taken Java Card for my B.E. final year project.
    i also acquire knowledge of Whole Java Card Development Life Cycle but i found much more difficulties to implement those ideas into java card.
    so, Will you please do me a favour and give me a complete solution if possible with an example.
    i also want each step with the commands, from the creation of Class file to the running of prog. in simulator.
    it will be very useful for me to head towards my project.
    Thank you,

    Just for the record,
    Since we are looking at different possibilities, there are couple of ways to achieve simulation/testing environment for current Java Card,
    1. "The Java Card Workstation Development Environment(JCWDE) tool allows the simulated running of Java Card applet as if it were masked in ROM. It immulates Card environment." Although, as Joe mentioned, it does not support;
    - package installation
    - applet instance creation
    - persistent card state
    - firewall
    - transactions
    - transient array clearing
    - remote method invocation
    - applet/package deletion
    Thus you can use 'jcwde' tool in combination of apdutool to test some
    of the Applet behavior(& JCRE) but not all. You have realized this when you tried 'sample' applets.
    2. JCDK2.2 also provide c-reference implementation of the Java Card. This(cref) is more robust way to test Applet. Although the catch with this is that Sun does not have SCSL(Community Source Licensing) program for Java Card(alas!) and this means you can not mask your applet into this reference implementation unless you get hold of source code somehow(source licensing is one(costly) way)
    3. Buy reader/card and figure out how to install applet for
    testing purpose.
    4. Buy kit from JC vendor containing reader/software/cards and use it
    (costly and hard to find JC2.2 implementation)
    1 and 2 are easier but not a real life solution(how many cards with intel/sparc processor anyway?). 3 and 4 are ideal but other way challenging. Yes, probably solution-1 is the right for your purpose.
    regard,

  • Can't run java .class programs from Windows command line!

    I have tried to get a program that I wrote with the JDK to run from the Windows command line, but it is not working. I typed:
    java HelloWorld
    Where my .class was HelloWorld.class, a compiled java program. I spelled the name correctly (and I am in the correct directory), yet I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    I think something is screwy with windows, but that's just me. Any ideas??

    Likely a CLASSPATH issue - try
    java -classpath . HelloWorldGood Luck
    Lee

  • Need Help w/ Java Applet Program

    Hello, first time on fourms. I've taken one year of Java(Poorly instructed) and I am currently trying to build a simple program, my brother is a really good gymnast so the object of this program is two drop down menus with selections, and based on the selections, an output. It has been a while since i've done anything, i've looked for reference at old work i've done and I just have gotten lost, I just need a few pointers. I'm also having compile problems such as, "Cannot find symbol", it is frustrating me, any help would be greatly appreciated!
    Here is what i've got so far, based on the above "requirements" can anyone help me out? PS. The odd names I gave them are based on another similar program I wrote a while back. Thanks again!
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.*;
    public class gymnastics extends JFrame
    private JComboBox equationTypeComboBox;
    private JComboBox equationTypeComboBox2;
    private JTextField answerTextField;
    public gymnastics()
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setUpInfoPanel();
         setUpInfoPanel2();
         setUpEquationPanel();
    setSize(300,340);
    answerTextField.requestFocus();
    private void setUpInfoPanel()
    JPanel infoPanel = new JPanel();
    infoPanel.setLayout(new BoxLayout(infoPanel, BoxLayout.Y_AXIS));
    JPanel typePanel = new JPanel();
    typePanel.add(new JLabel("Event type: "));
    equationTypeComboBox = new JComboBox("Floor", "Pommel", "Vault", "Rings", "PBars", "High Bar");
              typePanel.add(equationTypeComboBox);
    infoPanel.add(typePanel);
    getContentPane().add(infoPanel, BorderLayout.NORTH);
         private void setUpInfoPanel2()
              JPanel infoPanel2 = new JPanel();
              infoPanel2.setLayout(new BoxLayout(infoPanel2, BoxLayout.Y_AXIS));
              JPanel typePanel = new JPanel();
              typePanel2.add(new JLabel("Group Code: "));
              equationTypeComboBox2 = new JComboBox("I","II","III","IV","V");
              typePanel.add(equationTypeComboBox2);
              infoPanel.add(typePanel);
              getContentPane().add(infoPanel2, BorderLayout.CENTER);
         public void setUpEquationPanel();
         equationPanel.add(new JLabel("Output: "));
         answerTextField = new JTextField();
         answerTextField = ("Test Output");
    equationPanel.add(answerTextField);
    getContentPane().add(equationPanel, BorderLayout.SOUTH);
              public static void main(String args[])
         new gymnastics().setVisible(true);
    }

    Sorry about the code problem and thanks for the encouragement, it is just a bit frustrating at times.
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.*;
    public class gymnastics extends JFrame
    private JComboBox equationTypeComboBox;
    private JComboBox equationTypeComboBox2;
    private JTextField answerTextField;
    public gymnastics()
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setUpInfoPanel();
    setUpInfoPanel2();
    setUpEquationPanel();
    setSize(300,340);
    answerTextField.requestFocus();
    private void setUpInfoPanel()
    JPanel infoPanel = new JPanel();
    infoPanel.setLayout(new BoxLayout(infoPanel, BoxLayout.Y_AXIS));
    JPanel typePanel = new JPanel();
    typePanel.add(new JLabel("Event type: "));
    equationTypeComboBox = new JComboBox("Floor", "Pommel", "Vault", "Rings", "PBars", "High Bar");
    typePanel.add(equationTypeComboBox);
    infoPanel.add(typePanel);
    getContentPane().add(infoPanel, BorderLayout.NORTH);
    private void setUpInfoPanel2()
    JPanel infoPanel2 = new JPanel();
    infoPanel2.setLayout(new BoxLayout(infoPanel2, BoxLayout.Y_AXIS));
    JPanel typePanel = new JPanel();
    typePanel2.add(new JLabel("Group Code: "));
    equationTypeComboBox2 = new JComboBox("I","II","III","IV","V");
    typePanel.add(equationTypeComboBox2);
    infoPanel.add(typePanel);
    getContentPane().add(infoPanel2, BorderLayout.CENTER);
    public void setUpEquationPanel();
    equationPanel.add(new JLabel("Output: "));
    answerTextField = new JTextField();
    answerTextField = ("Test Output");
    equationPanel.add(answerTextField);
    getContentPane().add(equationPanel, BorderLayout.SOUTH);
    public static void main(String args[])
    new gymnastics().setVisible(true);
    }

  • Need help with java thread program

    Hi
    I have an applet which does some painting etc, i need to write a thread which runs in background, and if there is no user activity for 30 min will refresh the screen.
    I have one good thing that all user options go from one program so i know when user does some thing.
    How do i write this thread program?
    1. I need this program to start counter as soon as some activity is done by user
    2. When user does some thing stop this thread
    3. when user completes his action restart the thread with 30 min timer.
    4. when there is no activity for 30 min refresh the screen
    Any help will be really good
    Ashish

    Not sure what the problem is. Your pseudo code looks good to me.
    The only suggestion I would make is that your use a Timer so you don't have to worry about creating your own Thread. You schedule a Timer to fire in 30 minutes. Everytime you have activiity you cancel the timer and reschedule it.

  • Java Card program execution on Eclipse

    Hi Dears,
    I am new to Java Card. I did setup to run Java Card programs on eclipse using http://eclipse-jcde.sourceforge.net/.
    This is my simple program below
    import javacard.security.RandomData;
    public class Main {
         public void main() {
              RandomData rd = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
              short outLen = 10;
              byte buffer[] = new byte[outLen];
              short outOffset = 0;
              rd.generateData(buffer, outOffset, outLen);
    Compilation is successful but when I run the program I get the following error.
    Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/String
    This is very annoying. I think my run time environment is not ok for running java card programs. I am able to run Java programs but not java card programs. Any one can help please?
    Thanks,
    Regards,
    Naveed

    please post code with &#123;code} tags
    Naveed86 wrote:
    Hi Dears,
    I am new to Java Card. I did setup to run Java Card programs on eclipse using http://eclipse-jcde.sourceforge.net/.
    This is my simple program below
    import javacard.security.RandomData;
    public class Main {
         public void main() {
              RandomData rd = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
              short outLen = 10;
              byte buffer[] = new byte[outLen];
              short outOffset = 0;
              rd.generateData(buffer, outOffset, outLen);
    }Compilation is successful but when I run the program I get the following error.
    Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/String
    This is very annoying. I think my run time environment is not ok for running java card programs. I am able to run Java programs but not java card programs. Any one can help please?
    Thanks,
    Regards,
    Naveed

  • I could not run any application program

    I could not run any application program( even thouht the simplest one such as helloword). It would give NoClassDefoundError as:
    Exception in thread "main" java.lang.NoClassDefFoundError: Welcome1
    Press any key to continue . . .
    I use text pad editor. First I compile it, there is no error. But when I try to run ( by click run java application program button ) it gives me the same error message.
    I also always have compile error such as no class define when I try compile the program which need to import user defined class from differerent package. ( even though I did put all the classed in the same directory and also use import statement)
    I did try to run many other applet programs which do not use any user defined class, in this case every thing work fine and I could run the program.
    That mean I could run simple applet program but not application, also i always have compile error when ever I tried to import user defined class.
    I'm afriad there is some thing wrong with the sdk and java enviroment, therefore I did try to uninstall the program and redownload from the web( I try both version 1.3 and 1.4 many time, and I did check the size of the application when I finish down load) but I still got the same problem.
    My computer operating system is WinMe.
    I appreciate any help
    Ha Tran

    When I was trying to write my final project(Client/Server Application with java & CORBA)I could not compile The simplest program like HelloWorld for Idl(Errors like yours).After two month accidentally I write set classpath= and HelloWorld start to work.I start to read the tutorial again,and I see that sun say it in the tutorial but I don't understand it because I read it fast.So it was somthing wrong with me not with sun.They work very hard.I like to work in sun in future.

Maybe you are looking for

  • Why is Java so hard?

    I know it's a lot easier than c++, but compare to VB.NET or to C#.NET it's a nightmare. For example, some code working under the IDE for loading images from a package directory won't work after jaring the project, since the images are jared. Why then

  • Error in invoking web service

    I am trying to consume web service (created in NWDS 7.0 SP09 using EJB) in Adobe Flex 3.0.The web service has an array of string as input parameter.I am getting the following response: FaultEvent fault=RPC Fault faultString="Cannot find definition fo

  • My itunes will not allow transfer of purchased items to my iphone4

    As above, have brought in the heavy weights (my brother/apple expert) and even he is baffled!

  • "Service Unavailable" error is unidentified

    Am I the only one bothered by the lack of application identity on the "Service Unavailable" error box? This pops up infrequently enough that I can never remember which application is putting it up. Would it be so hard to title it "Oracle Calendar Ser

  • Product Allocation:  Planning Hierarchy

    hello, friends. in tests, product allocation is performing as required.  it is now time to set the data in PRD. the hierarchy involves Material, Plant and Sold-to.  all-in-all, this translates to a large number of nodes (in the thousands, due to the