Add more fuctionality to my java program

hi i have this program which is a simple game to find the prize, but i need to add more to it so that the user only gets ten go's at guessing the button where the prize is any help?
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class MyGame extends JPanel{
private Random rand ;
private int rows;
private int cols;
private int prizeX;
private int prizeY;
public MyGame(int rows, int cols){
//super(new GridLayout(rows, cols));
super(new BorderLayout());
this.rows = rows;
this.cols = cols;
JPanel p = new JPanel(new GridLayout(rows, cols));
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
JButton b = new JButton(" Button [x="+i+", y="+j+"]");
b.addActionListener(new MyActionListener(i, j));
p.add(b);
this.add(p, BorderLayout.CENTER);
this.add(new MyReStartButton(), BorderLayout.SOUTH);
rand = new Random(System.currentTimeMillis());
prizeX = rand.nextInt(rows);
prizeY = rand.nextInt(cols);
System.out.println(prizeX+", "+prizeY);
class MyActionListener implements ActionListener{
private int x;
private int y;
public MyActionListener(int x, int y){
this.x=x;
this.y=y;
public void actionPerformed(ActionEvent e) {
if(x==prizeX&&y==prizeY){
JOptionPane.showMessageDialog(MyGame.this, " Winner !! ");
}else{
JOptionPane.showMessageDialog(MyGame.this, " Try again ");
class MyReStartButton extends JButton{
public MyReStartButton(){
super("Start new Game");
addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
MyGame.this.prizeX = rand.nextInt(rows);
MyGame.this.prizeY = rand.nextInt(cols);
System.out.println(prizeX+", "+prizeY);
private static void createAndShowGUI() {
//Create and set up the window.
JFrame frame = new JFrame("MyGame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
JComponent newContentPane = new MyGame(3, 5);
newContentPane.setOpaque(true); //content panes must be opaque
frame.setLayout(new BorderLayout());
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}

You want to have 10 try attempts for a user to guess your number?
If so, check this out. I've added you a variable to count guesses of users.
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class MyGame extends JPanel {
     private Random rand;
     private int rows;
     private int cols;
     private int prizeX;
     private int prizeY;
     private int attempts;
     public MyGame(int rows, int cols) {
          // super(new GridLayout(rows, cols));
          super(new BorderLayout());
          this.rows = rows;
          this.cols = cols;
          JPanel p = new JPanel(new GridLayout(rows, cols));
          for (int i = 0; i < rows; i++) {
               for (int j = 0; j < cols; j++) {
                    JButton b = new JButton(" Button [x=" + i + ", y=" + j + "]");
                    b.addActionListener(new MyActionListener(i, j));
                    p.add(b);
          this.add(p, BorderLayout.CENTER);
          this.add(new MyReStartButton(), BorderLayout.SOUTH);
          rand = new Random(System.currentTimeMillis());
          prizeX = rand.nextInt(rows);
          prizeY = rand.nextInt(cols);
          attempts = 9;
          System.out.println(prizeX + ", " + prizeY);
     class MyActionListener implements ActionListener {
          private int x;
          private int y;
          public MyActionListener(int x, int y) {
               this.x = x;
               this.y = y;
          public void actionPerformed(ActionEvent e) {
               if (attempts == 0) {
                    JOptionPane.showMessageDialog(MyGame.this, "You lost, 10 attempts reached. ");
               } else {
                    if (x == prizeX && y == prizeY) {
                         JOptionPane.showMessageDialog(MyGame.this, " Winner !! ");
                    } else {
                         JOptionPane.showMessageDialog(MyGame.this,
                                   " Try again, you have " + attempts
                                             + " more attempts");
                         attempts--;
     class MyReStartButton extends JButton {
          public MyReStartButton() {
               super("Start new Game");
               addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                         MyGame.this.prizeX = rand.nextInt(rows);
                         MyGame.this.prizeY = rand.nextInt(cols);
                         MyGame.this.attempts = 9;
                         System.out.println(prizeX + ", " + prizeY);
     private static void createAndShowGUI() {
          // Create and set up the window.
          JFrame frame = new JFrame("MyGame");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          // Create and set up the content pane.
          JComponent newContentPane = new MyGame(3, 5);
          newContentPane.setOpaque(true); // content panes must be opaque
          frame.setLayout(new BorderLayout());
          frame.setContentPane(newContentPane);
          // Display the window.
          frame.pack();
          frame.setVisible(true);
     public static void main(String[] args) {
          // Schedule a job for the event-dispatching thread:
          // creating and showing this application's GUI.
          javax.swing.SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    createAndShowGUI();
}

Similar Messages

  • Add file to ZIP in Java program

    Hi all,
    I already found a lot of documentations of how to ZIP files in Java with the java.util.zip package, like: http://java.sun.com/developer/technicalArticles/Programming/compression/
    This algorithm works fine when you always want to create a fresh ZIP file where put your current files in.
    But I have the following problem: I already have a ZIP file with lots of files in it, and I want to add another file to this ZIP! Unfortunately I did not find any solution of how to do this in a java program - any ideas? Is it possible at all?
    Thanks for all answers
    nocomm

    Maybe this will help.
    http://home.mindspring.com/~thornton.rose/articles/ZipJar/part2.html
    At the bottom of this link is a algorithm for updating a file in a JAR that can be used for ZIP.
    It looks to me that the only way to add a new file to a ZIP is to:
    1) Create a Temporary ZIP
    2) Add new file to ZIP
    3) Open old Zip
    4) Read each ZIP Entry in turn and write to temporary ZIP
    5) If all goes well then deleted old ZIP and rename temporary ZIP to the correct filename
    You will have a ZIP with all the old files in and the new file.

  • How to add new fuctionality without modifying Print Program.

    Hi,
    This is Venkatrami Reddy.
    I have a requirement which needs to display Vendor Number in form.
    So, Please help me on this issue with some example code by using ITCSY Structure.
    Thanks
    Venkatrami Reddy

    Hi
    Welcome to SDN forum
    check the Existing Script program whether the field Vendor Number (LIFNR) is available or not, (for example if you are using PO script MEDRUCK then it will be there in EKKO table structure)
    then only you need to write an external subroutine using ITCSY structure and to bring the data from external table and to write in the script
    see the sample code
    REPORT ZMPO1 .
    form get_freight tables in_par structure itcsy out_par structure itcsy.
    tables: ekko,konv,t685t.
    data: begin of itab occurs 0,
             ebeln like ekko-ebeln,
             knumv like ekko-knumv,
           end of itab.
    data: begin of itab1 occurs 0,
             knumv like konv-knumv,
             kposn like konv-kposn,
             kschl like konv-kschl,
             kbetr like konv-kbetr,
             waers like konv-waers,
             kwert like konv-kwert,
           end of itab1.
    data: begin of iout occurs 0,
             kschl like konv-kschl,
             vtext like t685t-vtext,
             kbetr like konv-kbetr,
             kwert like konv-kwert,
           end of iout.
    data v_po like ekko-ebeln.
    read table in_par with key 'EKKO-EBELN'.
    if sy-subrc = 0.
       v_po = in_par-value.
       select
         ebeln
         knumv
      from ekko
      into table itab
      where ebeln = v_po.
      if sy-subrc = 0.
        loop at itab.
          select
            knumv
            kposn
            kschl
            kbetr
            waers
            kwert
          into table itab1
          from konv
          where knumv = itab-knumv and
                kappl = 'M'.
        endloop.
        loop at itab1.
          if itab1-kposn <> 0.
            select single * from t685t
                              where kschl = itab1-kschl
                                and kappl = 'M'
                                and spras = 'EN'.
            iout-vtext = t685t-vtext.
            iout-kschl = itab1-kschl.
            iout-kbetr = itab1-kbetr.
            iout-kwert = itab1-kwert.
            append iout.
            clear iout.
          endif.
        endloop.
        sort itab1 by kposn.
        loop at iout.
          sort iout by kschl.
          if ( iout-kschl eq 'GSDC' OR
               iout-kschl eq 'GSFR' OR
               iout-kschl eq 'GSIR' ).
            at end of kschl.
              read table iout index sy-tabix.
              sum.
             write:/ iout-kschl,iout-vtext,iout-kwert.
          out_par-name = 'A1'.
          out_par-value = iout-vtext.
          append out_par.
          out_par-name = 'A2'.
          out_par-value = iout-kwert.
          append out_par.
              endat.
            endif.
          endloop.
        endif.
      endif.
    endform.
    IN THE FORM I AM WRITING THIS CODE.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:ENDPERFORM
    &A1&
    &A2&
    This Code is to be written in the PO form under ADDRESS window.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:DEFINE &A3& = ' '
    /:DEFINE &A4& = ' '
    /:DEFINE &A5& = ' '
    /:DEFINE &A6& = ' '
    /:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:CHANGING &A3&
    /:CHANGING &A4&
    /:CHANGING &A5&
    /:CHANGING &A6&
    /:ENDPERFORM
    &A1&
    &A2&
    &A3&
    &A4&
    &A5&
    &A6&
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to run java program on clients system when system strats

    hi
    I want to run java program on clients computer automatically when system boots up. plzzzzz help me .......

    You can add the call to the java program to the auto start group (under windows).
    You can't start a client program when the server starts, if that is what you mean.
    Timo

  • How can i add more statements in java code dynamically...

    I have a (business works) BW process in TIBCO which has many activities including �java code�. In java code activity I have some if statements like
    if (Country.equals("USA�))
    Country code = 1
    else if(Country.equals("GERMANY�))
    Country code = 49
    the above information is coming from database. now my project is deployed and running. In future, if they add more countries in database how I can include them dynamically without changing my BW process java code activity and redeploying again. Is there any solution?
    Please advice.

    You won't reconfigure the Java application without redeploying. This is one of the reasons that including data in the code is bad.
    If you created a file which contained data like this:
    Canada <tab> 1
    USA <tab> 12
    Germany <tab> 6
    Then your program could read the file into a map. The map could be used to lookup the country code based on the name.
    In the future, you could change the file to:
    Canada <tab> 1
    USA <tab> 12
    Germany <tab> 6
    France <tab> 17
    China <tab> 2
    And the program wouldn't need to be changed. You would just need to send out the new country file.

  • Give  a java program more resources...in JVM

    Is there anyway to give a java program more resources? For example, is there a method System.getXXXX() which gives this program higher priority and resources in the JVM?
    I ask because i have a bean running on ATG Dynamo 5.1 but it runs very slowly and i want it to have more use of resources then other beans.

    Try running the application in its own server. Then you give give it the resources it needs.

  • I want to write a java program that can add a user to a role or sub role to the Profile Database in iPlanet Portal Server 3.0. Does anyone has any idea or a sample program do such thing. Thanks, Tommy

    I want to write a java program that can add a user to a role or sub role to the Profile Database in iPlanet Portal Server 3.0. Does anyone has any idea or a sample program do such thing? Thanks, Tommy

    // create the user profile, get the handle back,
    // and set the membership profile attributes.
    ProfileAdmin newProfile = null;
    try {
    // the users profile name is the domain      
    // he belongs to plus their userName
    // you will request.domain if your doing this from a servlet, domain_name is the domain_name the user belongs too
    String profileName = domain_name + "/" + user;
         if (debug.messageEnabled()) {
    debug.message("creating profile for " + profileName);
    // create the user profile object
    newProfile = ProfileManager.createProfile(
    getSession(), profileName ,Profile.USER);
    UserProfile userProfile = (UserProfile)newProfile;
         // set the role the user is a member of. Default is to set
         // the users to the default role of the domain they surfed to
         StringBuffer roleName = new StringBuffer(64);
    // request.domain instead of domain_name if your doing this from a servlet ..
    Profile dp = getDomainProfile(domain_name);
    roleName.append(dp.getAttributeString("iwtAuth-defaultRole"));
         if (debug.messageEnabled()) {
    debug.message("setting role for " + user + " = " + roleName);
    userProfile.setRole(roleName.toString());
    newProfile.store(false);
    } catch (ProfileException pe) {
         debug.error("profile exception occured: ",pe);
    return;
    } catch (ProfileException pe) {
         debug.error("login exception occured: ",le);
    return;
    HTH ..

  • How to Acess a C fuction from Java Program

    Hi
    I want to write a 'C' PRogram which will recognize the newely connected USB port .Please Suggest me the header files required for the C Program. and Where they are.
    Then I have to Call the 'C' Function From a java Program.
    I want the Process for this entire scenario.
    Thanks
    Madhu

    Hi,
    You have a good start at http://jusb.sourceforge.net/?selected=api
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                               

  • How do you start a java program with more RAM alloaction

    Hi
    can anyone please tell me how to start a java program to start with lots of RAM (RAM size is sent as a parameter), I have seen it somewhere and now I cant remember it. I have a server application to run this way.
    thanks and rgds
    sunil

    see the tooldocs of java: http://java.sun.com/j2se/1.4/docs/tooldocs/tools.html

  • Java program consumes far more ram on linux than on windows - why ?

    Hello dudes,
    i encountered a problem and i dont know how to solve it. i've a java application that consists of several classes and 3 threads. it consumes about 7 mb on win2k but up tp 100 mb on SuSE Linux and shows up 13 threads.
    is this something wrong with java or with linux? have any of you guys already faced the same problem and solved it ?
    thanks for any replies.

    Be careful. The Linux ps command by default shows the individual threads of a Java program as separate processes when they are in fact not. The fact you have 13 threads is normal, most are for housekeeping and appear on Windows as well.
    I can't speak to the total memory utilization, but make sure you aren't adding up the memory of each of the 13 lightweight processes (threads) and counting the same memory usage 13 times.
    Chuck

  • Java program not updating in correct sequence in applet

    Greetings,
    I have a java program with interactive graphic components. After completely writing the program, I create two shells ( or handle): an application shell with JFrame and an applet shell with JApplet. The application version of the program works fine. But the applet version skips some (middle) steps in the painting process when responding to user inputs.
    Does anyone have any ideas as to what's going on?
    I am not able to embed code snippets because my Internet has not being working and am finger typing this on my cellphone.
    Thanks for any help.

    My cable person won't come before Monday so I am struggling for now. Thanks for the replies, though.
    More info:
    1) both shells are extremely basic. They both simply add the drawing panel like so:
    DrawingPane drawingPanel = new DrawingPanel();
    add(drawingPanel);//frame.add for application
    the application uses statc main; the applet uses init. Nothing more.
    2) the program paints the hands and fingers of a stick figure red or green dependring on which foot of the figure is clicked.
    3) the application version works completely
    4) the applet version updates the right hand the first time; but not on subsequent clicks. More mysteriously, although it skips the hand, it still go on to update the fingers.
    5) No I don't know about event threads yet.
    Thanks.

  • How can my java program launch other applications?

    can anyone link me, provide some keywords, or information on how a java program can execute another program... for example, a button click would launch acrobat, firefox, or (in particular) another java application.

    don't read all that much fantasy.
    I've read Eddings' Belgariad and Malloreon, which I really liked at the time but which are not even in the same league as GRRM. The characters are much more one-dimensional, and the plot gets cornier as you go along.
    IVE READ BELGARIOD... AGREE THAT IT WAS PRETTY SHALLOW AND I READ IT AFTER LOTR SO IT WAS SUCH A PALE RIPOFF IN COMPARISON
    His Elenium and Tamuli series were a little better, but still far from Ice and Fire.
    Tolkein, of course, but you've probably heard of him. :-)
    Donaldson's Mirror of Her Dreams and A Man Rides through were good.
    HAVENT READ THESE, WILL ADD TO MY LIST, THANKS!
    Terry Brooks' Shanara series is supposed to be pretty good, and I think Anne McCaffery's Dragonriders of Pern series is considered to be among the classics, but I've never read either one.
    READ SOME BROOKS AND FOUND IT SHALLOW LIKE EDDINGS. HAVE READ MCCAFFERY BUT NOT DRAGONRIDERS, AND THE TRILOGY I READ WAS OK BUT THE TONE WAS REALLY GOOFY. A GROUP OF REFUGES ON A NEW PLANET AT A TIME WHEN THE HUMAN RACE IS ENSLAVED BY ALIENS, AND THE BOOK SEEMED TO FOCUS ON HOW FUN BUILDING A CAMP WAS ON THE NEW PLANET AND EVERYONE WAS REALLY PEPPY WHICH FELT ODD GIVEN THE CIRCUMSTANCES OF THE SETTING.
    Michael Moorcock's Elric series was very good, also very dark. It was kind of... I don't know... odd. Like you'd want to light up a bong and put on some Floyd while reading it.
    HAVENT READ EITHER, ANOTHER FOR THE LIST, THANKS AGAIN!
    There's another series of 2 or 3 books that I read a few years ago and really liked, but I can't for the life of me remember the author, the books, any characters names...
    P.S. If you want to talk about a nag of a female character, you gotta love (as in hate) Cersei. She gets her on POV in Feast. Good stuff.
    YEAH I LIKE CERSEI ACTUALLY. GRRM IS GOOD IN HOW THERE REALLY IS NO MAIN CHARACTER AND EVERYONE IS VERY EXCITING TO READ. RJ ON THE OTHERHAND HAS A DEFINATE CENTRAL CHARACTER TO THE PLOT, AND CHAPTER AFTER CHAPTER OF SOME OF THE FEMALE POV'S GOT AGGRAVATING ESPECIALLY WHEN THEY NAG SO MUCH THE TRUER HEROS OF THE STORY (MY OPINION)... ITS LIKE, SHUT YOUR MOUTH AND LET THEM SAVE THE DAY ALREADY... HEHE... BUT YOU'LL SEE OR HAVE A DIFFERENT OPINION ENTIRELY.
    to you i recommend orson scott card... you've probably read ender's game but he has some really good fantasy too... the homecoming series (first book call of earth or memory of earth) was really good, and the alvin maker series is ok plotwise but the characters are incredible... i found a lot of humor and witty dialog in that series and enjoyed it immensely. anyways, thanks again for the list additions, will read feast of crows first, hopefully soon. glad to hear you're liking it... some reviews on amazon weren't stellar.

  • CAN i CALL OLAP DML THROUGH JDBC IN JAVA PROGRAM

    I HAVE ORACLE V 9.2.0.1.0 AND AFTER CREATING A CUBE FROM ENTERPRISE CONSOLE I HAVE TO GO WITH EITHER SQL PACKAGES OR OLAP DML PROGRAMS ,SO PLS GIVE ME PROPER WAY AND LINK OF SOURCES TO WORK WITH OLAP DML IN JAVA PROGRAMS
    CAN I USE AS PREPARED STATEMENT OR CREATE STATEMENT IN JAVA
    TO CALL OLAP DML? BECAUSE NORMALLY WE MUST USE OLAP WORKSHEET TO EXECUTE OLAP COMMANDS
    Message was edited by:
    user594151

    The access OLAP objects via Java you have two options. You can code directly against the OLAP API and I think someone has already provided you with the link to the supporting documentation. The OLAP API docs provide worked examples on access OLAP metadata and retrieving OLAP data. However, this is extremely low level coding. An alternative is to use the Business Intelligence Beans. Oracle Business Intelligence Beans enables developers to productively build business intelligence applications that take advantage of the rich OLAP functionality in the Oracle database. OracleBI Beans includes presentation beans - graph and crosstab, data beans - query and calculation builders and persistence services, which may be deployed in both HTML client and Java client applications. OracleBI Beans is seamlessly integrated into Oracle JDeveloper to provide the most productive development environment for building custom BI applications. For more information goto the the BI Beans home page
    http://www.oracle.com/technology/products/bib/index.html
    Specifically on executing OLAP DML see the following example:
    Developing a Dashboard Application with Oracle BI Beans:
    http://www.oracle.com/technology/products/bib/1012/viewlets/MS%20Developing%20Executive%20Insight.html
    Adding controls to execute OLAP DML      This viewlet demonstrates how to quickly and easily add the controls to execute OLAP DML models that can be executed to update the What If presentation.
    http://www.oracle.com/technology/products/bib/1012/viewlets/Pages/What_If_Analysis_Part_4_viewlet_swf.html
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • How to make a java program, that can be used by c++ application

    I'm developing a Java web application (WEBapp), but I have also a c++ program.
    C++ program must use WEBapp method to communicate on the web.
    How to make a Java public function that accept value, elaborate, then return the resul to c++ application?

    jschell wrote:
    You have C code.
    You have Java code.
    The two must communicate.I have a c++ program, and a Java program.
    C++ program wants to communicate on the web (send text), and I'm trying to add this functionality to it creating a Java program.
    NOW THE PROBLEM? How c++ program can use java-program (in local) to send data on the web?
    You can just JNI to communicate either from java to C++ or from C++ to java. That is direct communication in that there is a single process involved. Thus you will no longer have a java application and a C++ application but rather a single application.I don't know JNI, i found http://java.sun.com/docs/books/jni/ and I think is too difficult to implement?
    You can use files or sockets to communicate. Using sockets allows for any number of additional protocols including the previously mentioned web services. Those methodologies would allow more than one application to exist.I developed yesterday a java-side-interface using socket (in local host 127.0.0.1). So the c++ program must write or read to/from the socket to comunicate to java (then the java program send data on the web).
    Finally it might be the case that you have a C++ application which you cannot modify. In that case then you MUST use whatever input/output mechanism that it supports. There is no choice. And until you have fully determined what those mechanisms are it is pointless to discuss a solution.I can modify the application, but I don't have developed it. The c++ application use a third-part dll (taken from SKYPE) to comunicate on the web: I have to remove the dipendence from this dll, and add the java program: java program must substitute the dll. It must be non-invasive to the c++ program. DLL calls can be "send(data)" or "receive(data)" or similar.
    For this do you think that JNI is a must, or I can use soket on local host?

  • Java Programming @ SAP - the poor cousin?

    Hi!
    Recently I' ve started a kind of poll in the Java forums asking if someone knew any enhancement possibilities for java-side development at SAP mentioning the ABAP customer exits, BADIs, customer includes and enhancement spots as example.
    Guess how many answer I received - from WDJ, Java Programming, NWDI and NW Java from: None! All the gurus who usually bubble over with wisdom remained wondrous silent. I also run over help pages searching for some hints regarding this - in my opinion fundamental - questions, with the same result.
    Has really nobody at SAP spent a thought about one of the most precious features SAP offers its customers - the possibility to enhance delivered standard-programs and thereby adapt them to their needs without modification?
    How are we as Java programmers then supposed to stand the mistrustful glances of our ABAP collegues who wonder why there has been so much noise about this Java thing in the recent years. Thinking about the disadvantages a developer working with Java at SAP has to bear compared to his ABAP collegue - no direct data access, no comfortable debugging possibilities, lots of standalone tools with strange UIs (SDM Remote GUI, Visual Admin - only to name the least glorious ones - he to manage and - last, not least - no chance to enhance SAP Standard programs modification free I have to agree upon one ABAPers opinion on Java: "The hype is over!".
    Regards from a very pessimistic Java Developer
    Thomas
    PS: Does anybody know a way to unbureaucraticly swap a Java certification against an ABAP one?

    I get the question - should I do my development in ABAP or Java - quite often. My answer has become "It Depends."  I getting pretty good at those ambiguous consulting answers, aren't I.
    In all seriousness I really do think the answer depends upon several things.  As a company or development group you should analyze the skills that you already have in house.  As you have seen the two development environments are quite close.  The advantages of one over the other will continue to vary over time.  ABAP will add nice features from Java and vise versa.  In the end it is more important that companies leverage their skill sets and existing infrastructure (Software Lifecycle Landscape) to their maximum. 
    If you are already a java shop then it makes sense to continue down that development path because your developers will still be very efficient even if they have to access ERP and other SAP application logic and data via RFC or Web Services. 
    On the other hand, ABAP certainly isn't as dead as some people claimed it would be by now. Thanks to Web Services ABAP has more flexibility than ever before.  It isn't nearly the closed box that it used to be.  Also the workbench team isn't going to stop innovating either. 
    The next question I get is what does SAP do internally when deciding on a language to use.  To a large extent they use the same criteria - what existing skill sets do I have to work with.  They also look at where the data is located. 
    That means products like Portal aren't about to change from Java to ABAP.  On the other hand ERP suite development is still heavily ABAP.  The new UIs coming from ERP will primarily be done in Web Dynpro ABAP. 
    Even in some newer products that haven't been released yet - the UI was done in Java or Visual Composer and the backend business logic was done in ABAP. It is all about taking advantage of the unique strengths of each environment and the skill sets you have in each.
    In the end I don't think Java is the poor cousin any more than ABAP is going to die.  Look at NetWeaver CE and the huge investment SAP has made on top of Java Development there.  At the same time our investment in Java has not come at the cost of the ABAP environment.  Innovations will continue to take place there as well.  I can assure you that within SAP it is the hope and goal to have two top notch development environments within NetWeaver.
    Now let me share a little story with you.  My background is obviously ABAP and I doubt I will ever lose my particular passion for the environment.  At the same time I have done a fair bit of NetWeaver Java development in the last year and half or so.  I'm not a super deep expert, but I can hold my own. 
    I recently had a requirement to build an MDM Application.  I only had two days in which to build it.  My choices were to use the Java API or the ABAP API.  They are quite similar and both meet all my interface requirements.  I was building a Web Dynpro UI, so the end user wouldn't be able to tell the difference.  Interfacing capabilities being the same and UI output being identical - my decision came down to the environment where I personally could be most efficient.  I could have completed the project in either environment.  But because I knew the ABAP Programming Environment (you know the stuff that goes beyond the basic syntax - the real knowledge that lets you squeeze every last drop of performance out of an application) so well I personally could build the best application in the shorter time in ABAP. 
    Now someone with a different background might well have taken the Java path and done just as well.  This is the advantage that SAP provides by continuing to support both ABAP and Java development.  Does every feature and function of both environements line up exactly - of course not.  I'm sure they never will.  But do these differences keep experts in either environment from being able to make any application do amazing things - certainly not.  Personally I feel less constrained in either ABAP or Java today than I have ever felt programming before.

Maybe you are looking for

  • Scan to email on Color LaserJet Pro MFP M177fw

    I am trying to download the Printable "Scan to Email" onto my  Color LaserJet Pro MFP M177fw but It keeps throwing an error? When I  bought the printer (yesterday) i was told that I could set it up to Scan in a document and have it automatically send

  • PL/SQL code problem for LOV

    Hi, I have developed an application using Apex 4.0 Now, i am trying to make a LOV for two columns in my table. Say column A and column B. Column A has four different values under it say x,y,z,w and column B has around 3 different values say 1,2 and 3

  • Sleep/Wake problem

    My 24" Intel iMac (10.5.6) is asleep and it won't wake up. I have tried another keyboard, in another USB port, and still no response. The sleep light is pulsing, and I quit all apps before putting it to sleep, I have even tried the power button, with

  • ITS Custom Login screen password expirey option?

    Hi all, We have included the custom login screen in the ITS service. By using login and password parameters in the service parameters. But in this the new custom login screen doesn't have the new password option or it cannot detect the password expir

  • About TextFileFormatProject SDK sample,  Windows, CS2

    I copied the TextFileFormatProject sample folder to another, for example, XXXFileFormatProject. and open the project in the new foler use VS2003, change some code in the fileFormatHandler file, for example the file extension and name parameter of Add