Welcome, Guest: Join Nairaland / LOGIN! / Trending / Recent / New
Stats: 2,552,658 members, 5,886,511 topics. Date: Wednesday, 30 September 2020 at 01:01 AM

Java Has Failed! - Programming (3) - Nairaland

Nairaland Forum / Science/Technology / Programming / Java Has Failed! (19599 Views)

Common Error In Laravel #1:solved File_put_contents Failed To Open Stream / Retrieving The COM Class Factory For Component With CLSID {587CCA26-D3FA-402C-B5A0-259DF7E96D55} Failed Due To The Following Error: 80040154. / Rynga Voip Issues - The Call Failed Due To Sound Device Problem On This Computer (2) (3) (4)

(1) (2) (3) (4) (5) (6) (7) (Reply) (Go Down)

Re: Java Has Failed! by africanboy(m): 4:04pm On Feb 10, 2006
@Fdeveloper, u r indeed right. i might seem to be selling 9ja short, but I am only recounting "the experiences I have had". You are somewhere else, like sbu where things are better and operate in the normal way. some of us are just "here".

most symbian apps are written using C++, some VB, and as I am sitting in my chair today, i still prefer symbian native apps to java apps on my phone. i have a java app (first aid - display a text of first aid tips) and some java games - incredibles, highway 3d, chips challenge) I have about 20+ other apps and they are not java, simply because as a consumer i feel more comfortable with the non java apps. the java apps are cool, dont get me wrong. its just my taste.

@sbu, u work in d work, earning pounds or whatever, do u know what it means to work on your own in Nigeria? some places in 9ja. no bad mouthing. thats not the topic. i still dont want to leave. but here where i work, usually 1 person has to handle every aspect of a project. urs may be better, i am telling you mine.

an experience, a client (director general of budget of one of our states) called on friday morning requesting for a budget process management solutions (web based) to be delivered on monday, and he specifically did not want an off the shelf solution because they are too expensive and do not understand their own "specific" workings. i got there on monday truly with functionality, all he complained about was the interface. thats how a lot of clients are in nigeria, maybe elsewhere.

this same man is used to quickbooks, but for one limitation (quickbookx can only take a maximum of 99,999,999:99) which will not work well for ministries considering our poor money value. to him, any application that has better functionality must look as fine as quickbooks. of course, functionality must be present, but interface is very important.

java is just to hard to learn, and i dont have time to take extra classes. i think i'll focus on inter-platform web solutions
Re: Java Has Failed! by mufutau: 7:11pm On Feb 10, 2006
I need to add my own 2 cents to this topic, without repeating prvs arguments
With refence to the "Java is too difficult" phrase.......Depends on your reference material, text & online information. Have to agree that some guides can alienate newbies, but I beg you to check this link & view sample chapters of "Head First Java" http://www.oreilly.com/catalog/hfjava2/
Its an excellent book written in a way that even a 7 year old can pick up programming skills with eases ( well, my nephew seems to agree with this)

There are loads of IDE tools to enable graphical programming ( JBuilder, JCreator Sun One studio etc) but I don't even bother with them anymore, just write my code in notepad & compile it entirely in Windows command prompt..really that easy like writing raw HTML instead of using dreamweaver - Have a look at this web page for an example http://java.sun.com/docs/books/tutorial/uiswing/learn/example2.html

I'd recommend Java for budding programmers as it focuses entirely on methods, classes, variables, etc instead of shielding code behind an IDE that does half of the work, leaving you in the dark when things go wrong

VB.studio IDEs offer advantages in the sense that you can drag & drop widgets onto the screen,then go in & write the code. This was how I started off in VB & Visual C++; By focusing on the code b4 the interface is designed ensures I don't have to wade through lines of code tracking errors ( Xtreme programming approach)
Yep, I've used VB & C++, not gonna rate Java above any program as each has its strengths & weaknesses ( VB : easy to knock out programs - C++ most powerful tool & fastest code but one needs to know what they're doing, no memory management whatsoever; Java - gets criticised by people unfamiliar with it, a great educational, development & deployment tool, garbage collection, Jini, Struts, Jakarta, Swing, RMI, CORBA, JDBC)
Re: Java Has Failed! by ogra2k2(m): 3:37am On Feb 13, 2006
africanboy, i dont really want to sound rude but ur comment on the "death" of java is a misplaced on, let's try to educate ouselves on some issues instead of being sentimental, 4 ur information JAVA is alive and well. Look beyond d java u know, read wide, look into devices, look all around u, Java is beyond d simple application programming u know, WAKE UP
Re: Java Has Failed! by Fdeveloper(m): 5:43pm On Feb 15, 2006
@africanboy, I take your point about the Symbian stuff and for the record, I live and work in Nigeria, in Lagos to be precise.

Omo Eko ni mi
Re: Java Has Failed! by africanboy(m): 11:42am On Feb 22, 2006
@F, aight, where u at? Could probably hook up wit u and learn. Maybe java, maybe not!
Re: Java Has Failed! by sbucareer(f): 6:23pm On Feb 22, 2006

Africanboy, you might want to visit Oracle Technology Network, which is the next big thing in the work place today. They are formulating the use of forms, BPEL using ADF in 10g versions of Oracle Fusion middleware. While you are at the site check out JDeveloper, which is the new thing now. Remember all these interesting tools runs on EJB or J2EE Application Server making fully use of Java.

My company is currently as I am talking to you migrating and rolling out JDeveloper for we developer and changing all our DML and all our middleware to Oracle Application Server 10g J2EE and Web Services.

Oracle is the new big boy in town and all these interesting tools are written and runs on Java, thank God for that. I can't wait to get my hands dirty on these tools next week when it all comes online at my work place.  grin grin
Re: Java Has Failed! by sbucareer(f): 6:38pm On Feb 22, 2006

BPEL means Business Process Execution Language and ADF means, Application Development Framework and DML means Data Manipulation Language (This is the Business Logic that either runs on your middle tier or in your Database) in case you were wondering, if you already know these meaning accept my apologies.

Re: Java Has Failed! by africanboy(m): 6:47pm On Feb 22, 2006
@sbu, would you mind posting me a CD containing all these tools. i use dial-up and downloading is a horror
Re: Java Has Failed! by sbucareer(f): 7:01pm On Feb 22, 2006

Africanboy I will refer you to someone on nairaland that I talk to regularly on my yahoo IM, I have actually FedEx him a whole lot of CDs with lots of interesting softwares. Maybe you can get it off him, that will enable you to meet at least one member of nairaland if you haven't already done so. I can't say his name here and I really do not know his handle. You can add me to your yahoo IM, when I get home I will accept you and do three way chat on yahoo with him, he stays at Lagos too in Surulere.

If not I will burn another one over the weekend and send it to you. But this should NOT give people the impression to ask me to burn CDs for them. Get to know these people here and contact them in Lagos or anywhere in Nigeria. Even better get them to burn it and post it to your within Nigeria.

Africanboy you have to list the freeware software you want. Don't ask for licensed ones because I will NOT burn them for you as it is a crime and illegal here in the UK.

Re: Java Has Failed! by pojutime(m): 4:39pm On Feb 23, 2006
Hi Y'all,
I am a Java newbie but since I dont have that much access to a pc to allow me to do my studying on a pc (via cd's or pdf's), I'm searching for Java books. Someone (mimoh_mi) I met here on nairaland recommended Headfirst Java by o'reilly but I
Re: Java Has Failed! by pojutime(m): 4:41pm On Feb 23, 2006
Hi Y'all,

I am a Java newbie but since I dont have that much access to a pc to allow me to do my studying on a pc (via cd's or pdf's) so I have to do my studying from Books, which I kinda like. I'm searching for Java books. Someone (mimoh_mi) I met here on nairaland recommended Headfirst Java by o'reilly but I can't seem to find this bnook in Lagos, Nigeria where I stay. I tried checking Francis Van-Lare (Ikeja) and CSS (CMS) but no results. Does anyone know where I can get it or does anyone have a copy I can photocopy or recommend any other good material for me.

Re: Java Has Failed! by sbucareer(f): 4:47pm On Feb 23, 2006

You can buy it here or amazon

Re: Java Has Failed! by pojutime(m): 5:32pm On Feb 23, 2006
Thanks sbucareer,

But it might be a little difficulty buying it from abroad- costs of freight, credit card etc. Thats why I asked if anyone knew where it was available in Nigeria.

Re: Java Has Failed! by alexis(m): 12:14am On Feb 28, 2006
What an interesting topic, I read the whole thread to the end. I really must say I learnt alot of everyone input, I will share the little that I know about software development and engineering.

I just started programming about a year ago, mostly web programming and client-server applications. I started off with HTML, XHTML, javascript and recently moved into PHP, PHP is wonderful, don't ask me why I didn't use ASP, ASPX, JSP or coldfusion. In january, we started java in school - I will tell all of you this, Java is the BOMB!.

If you truly understand the OOP concept, you won't have issues with java, although you have to read and get to know most of it's classes but the effort is worth it. I coded my first application in Java on a windows system using notepad and I ran exact on my iBook G4, it gave me the same result - I tested it on my Fedora 3 server and it produced the same result. No other programming language can take this feature from java - it is platform independent.

For everyone using Microsh*t, my advice to you is this - opensource is the fututre. Java may lag behind in speed but it is not noticable but sbucareer, php scripts are faster than jsp scripts anyday - that I will tell you.

In summary - Java is the future, .NET is not bad but if we don't have over $600 to buy a microsoft server then what happens? or if I want to run my apps I build using .NET on MAC what happens?
Re: Java Has Failed! by sbucareer(f): 2:42pm On Feb 28, 2006

Alexis, thank you for you analysis, here is a link to show my first applet I did in year one coursework, just an imitation of mobile phone sending voice/text to a pda.

Regarding my claim about Java is fast depends on the hardware and chip architecture it was ran on? If you run Java on a Sun fire E25k Server that scales up to 72 processor in one hardware and could execute 144 threads simultaneously, come on you can't beat that speed.

I remember my company got the contract of setting up and deployment platform and running all the web application that will enable 200 users to process their credit cards in just under 1 minutes. The was during the Tsunami crisis in Asia.

I was involved in the deployment and we used 150 Sun fire E25k Server and had Oracle OC4j on every simple instance that ran 10g version. We achieved these and our web application was obviously running on Java. We were able to process 200 transactions just under 1 minute that is some speed.

The problem with PHP is that you can't deploy PHP instances on a grid computing and would cause bottle neck on a transactional process, hence bring your business to a total stop.

We also accomplish the same business opportunity in Glastonbury one of the popular festival in the UK by processing 400 transactions just under 1 minute.

I am not advocating for Java anymore but I just want to share with you people what I/we at oracle has achieved by using java and sun systems hardware.

Re: Java Has Failed! by alexis(m): 8:48pm On Feb 28, 2006
sbucareer - I really haven't dived into java, I am just doing that but I was part of the team that built an sms application using php that talks to a java sms gateway. I am talking about over 300,000 subscribers accessing one mysql database, not at the same time though. It was first coded in jsp but I man - they had issues perhaps the coders didn't develop the app well but it was dead slow running on an MAC X server with 2 dual processors.

We converted the app to php and boy did it rock. I was called in to handle the mysql backend and debug certain aspects of the app but we finished the program in no time. I am not saying that php is better than java, no way. I am telling you that for web apps, using php or jsp with the same server software - php will beat jsp in terms of speed.

Thanks for the applet. I reckon you have alot of experience in java, I would appreciate if you coould mentor me. I want to code in java pretty well, so far - I'm loving it.
Re: Java Has Failed! by sbucareer(f): 10:02pm On Feb 28, 2006

Alexis, I know your stand on both language, but what I have always say to people is that, writing sloppy codes contributes to its execution time. See this two codes fragment and tell me which one will run fast?

int d = 9 > 1 ? 3 : 8;

and this

int d;
if( 9 > 1){
d = 3;
d= 8;

Both code does the same thing but the execution time will vary considerably. To be a good programmer, you need to have been programming for a considerable years.

So java may not be slow on the hands of a good programmer, forget the JVM as I know you will use it size as an argument. JVM on a big computer architecture with processing power will just do fine.

Re: Java Has Failed! by qleyo(f): 7:22pm On Mar 01, 2006
int d = 9 > 1 ? 3 : 8;

This will be much faster you have cut off two assignment operators for one. Unless of course somehwere else in your code you've overloaded = operator to do something else :-p
Re: Java Has Failed! by c0dec(m): 9:07pm On Mar 02, 2006
nope. there'll only be one assignment operation anyway. i think they both have the same speed.
Re: Java Has Failed! by mimohmi(m): 2:45am On Mar 06, 2006
Hi ,
Haven't been here for sometimes now. Well for those anti java people, you might be right in your own way.
But for me, with almost about 5 years java experience ( active 2 year now), i will tell you that java is still
a language for the future. The problems with us in this part of the world is that we don't get a nice place to learn
such a simple but yet powerful language.
Also, you should have it at the back of your mind that java just marked 10 years last year. For the portability,
you can't take it away from java. Personally, i run my java applications on both windows and Linux, without touching the
codes. In fact, if you have been following the growth, you will notice great changes with each new version. Year before
last, Tiger (5.0) came out with a buster, and now Mustang (6.0) is comming soon.
To mention few area that java is hitting fast, JSP,Servlet,JDBC, J2ME and developing middleware application
for distributed application(J2EE). Like the new JavaEE 5 just out offers some killing features.
All said and done. If you want to learn java, just log on to www.javaranch.com it's free.
Any other problem just post a thread here, will be watching out.
Re: Java Has Failed! by africanboy(m): 10:39am On Mar 06, 2006
Hi ,
   Haven't been here for sometimes now. Well for those anti java people, you might be right in your own way.
But for me, with almost about 5 years java experience ( active 2 year now), i will tell you  that java is still
a language for the future. The problems with us in this part of the world is that we don't get a nice place to learn
such a simple but yet powerful language.

Word, Bro!

All said and done. If you want to learn java, just log on to www.javaranch.com it's free.
Any other problem just post a thread here, will be watching out.
Thanks for the Link, checking it out
Re: Java Has Failed! by joftech(m): 10:27pm On Mar 08, 2006

int d = 9 > 1 ? 3 : 8;

This will be much faster you have cut off two assignment operators for one. Unless of course somehwere else in your code you've overloaded = operator to do something else :-p

This’s a classical example of obfuscated coding.
Re: Java Has Failed! by sbucareer(f): 12:17am On Mar 09, 2006

I like that language Obfuscation. Take a look at this Java program and see if you can make sense of it.

First create a directory called Menus and copy this code in an Editor save them in the Menus directory and compile them  and run the BasicMenuDemonstration class.

// Filename BasicMenuDemonstration.java.
// Providing a demonstration of the initial Interactive Menu.

package Menus;

import Menus.BasicMenu;

public class BasicMenuDemonstration {

public static void main( String argv[]) {

   String demoOptions[] =  { "This is the first option",
                             "This is the second option",
                             "This is the third option"};

   char demoCharChoice;
   int  demoIntChoice;                             

   BasicMenu demoMenu = new BasicMenu( "This is the title",
                                       "This is the prompt"wink;

      System.out.println( "\n\t\t Basic Menu demonstration "wink;
      System.out.println( "\n\n Testing the offerMenuAsChar() action ,  \n\n"wink;
      demoCharChoice = demoMenu.offerMenuAsChar();
      System.out.println( "\nYou chose " + demoCharChoice  + " from the menu."wink;

      System.out.println( "\n\n Testing the offerMenuAsInt() action ,  \n\n"wink;
      demoIntChoice = demoMenu.offerMenuAsInt();
      System.out.println( "\nYou chose " + demoIntChoice  + " from the menu."wink;

   } // End main
} // End  BasicMenuDemonstration

// Filename Menus/BasicMenu.java.
// Providing an initial Interactive Menu.

package Menus;

public class BasicMenu extends Object {

private String  theTitle;
private String  theOptions[];
private String  thePrompt = "Please enter your choice :";
private char    minimumOption;
private char    maximumOption;

private java.io.DataInputStream keyboard =
                new java.io.DataInputStream(  System.in);

   public BasicMenu( String title,
                     String options[],
                     String prompt) {
   int thisString;                     

     if ( title.length() > 0 ) {
        theTitle = new String( title);
     } // End if.
     theOptions = new String[ options.length];
     for ( thisString = 0;
           thisString < options.length;
           thisString++                  ) {
        theOptions[ thisString] = new String( options[ thisString]); 
     } // End for.     
     if ( prompt.length() > 0) {
        thePrompt = new String( prompt);
     } // End if.                                               
  } // End BasicMenu   

  public char offerMenuAsChar() {
  char validatedResponse;
     validatedResponse = getValidatedMenuChoice();
     return validatedResponse;
  } // End offerMenu
  public int offerMenuAsInt() {
  char responseAsChar  = offerMenuAsChar();

       return (responseAsChar - 'A') + 1;
  } // End offerMenu

  private void showMenu( ){
  int  thisString;
  char thisOption = 'A';                     

     setMinimumOption( thisOption);

     for ( thisString = 0;
           thisString < theOptions.length;
           thisString++  ) {
         showMenuLine( thisOption,  thisString);
     } // End for 
     setMaximumOption( --thisOption);     
  } // End showMenu 

  protected void showTitle(){ 
     if ( theTitle != null ) {
           System.out.println( "\t" + theTitle + "\n"wink;
  } // end fun showMenuOption.

  protected void showMenuLine( char menulabel, int menuText){ 
     System.out.println( menulabel + ".   " + theOptions[ menuText]);   
  } // end fun showMenuLine.

  protected void setMinimumOption( char setTo ){
     minimumOption = setTo;
  } // end fun setMinimumOption.

  protected void setMaximumOption( char setTo ){
     maximumOption = setTo;
  } // end fun setMinimumOption.

  protected char getValidatedMenuChoice(){

  String  fromKeyboard      = new String( ""wink;
  char    possibleResponse  = ' ';
  boolean isNotGoodResponse = true; 
     System.out.print( "\n" + thePrompt + " "wink;
     while ( isNotGoodResponse ) {
        try {
           // possibleResponse = keyboard.readChar();
           fromKeyboard =  new String( keyboard.readLine());
           if ( fromKeyboard.length() > 0 ) {
              possibleResponse  = fromKeyboard.charAt( 0);
           } else {
              possibleResponse  = ' ';
        } catch( java.io.IOException exception) {
           // do something
        } // End try/catch.

        possibleResponse = Character.toUpperCase( possibleResponse);
        isNotGoodResponse = ( (possibleResponse < minimumOption) ||
                              (possibleResponse > maximumOption) );

        if ( isNotGoodResponse ) {
           System.out.println( "\n Please enter a response between " +
                               minimumOption + " and " + 
                               maximumOption + "."wink;
           System.out.print( "\n" + thePrompt + " "wink;
        } // End if                 
     } // End while.
     return possibleResponse;   
  } // End fun getValidatedMenuChoice .
} // End BasicMenu

Study the above code very hard and try to make sense of it and tell me if Java is NOT fun. It might take you a day or two and you can modify the code free of charge to develop your application and tell me if you can write a faster code in ANY language better than this.  If you can post the same solution here so we can compare.

Re: Java Has Failed! by mimohmi(m): 2:00am On Mar 09, 2006
Ok africanboy, if speed seem to be a minus for java. Let's do a speed test. After installing the J2SE 5.0 (jdk), we are not testing
the 6.0 version(Beta) mind you. ok CD to C:\Program Files\Java\jdk1.6.0\demo\jfc\Java2D. In this folder you will see a file named
Java2Demo.jar. It's a demo program, won't tell you the content until you have done the speed test. run the file with this command.

To run just follow this steps.

1. go to dos prompt.
2. CD C:\Program Files\Java\jdk1.6.0\demo\jfc\Java2D
3. type this line to run it.

java -Dsun.java2d.opengl=true -jar Java2D.jar

4. then a second command.

java -jar Java2Demo.jar

Then for codings look at these short examples.

Old ways --- 1.4

ArrayList<Integer> list = new ArrayList<Integer>();
for (Iterator i = list.iterator(); i.hasNext()wink {
Integer value=(Integer)i.next();

New ways --- 5.0

ArrayList<Integer> list = new ArrayList<Integer>();
for (Integer i : list) { , }

Expecting you comments.
Re: Java Has Failed! by sbucareer(f): 2:24am On Mar 09, 2006

mimoh_mi, can you give a short tutorial on new Java 1.5 Generics. I am still writing my code based on 1.4 and previous.  I have studied some few books on Java 1.5 Generics but have not completely mastered it and my work place do not mind in which style you code as long as you solve problems.

Now, what was the purpose of Array<Integer> list = new Array<Integer>(); when you have to cast i back to Integer. And list is a type of Integer and why do you store it into Iterator? I know they are all Objects but what is <Integer> really doing in this code fragment?

Oky, sorry I have seen your solution for 1.5, oky, I understand now.
Re: Java Has Failed! by africanboy(m): 8:47am On Mar 09, 2006
looking at the code, java seems easy to understand, a little bit (using my knowledge of C), but my problem is getting the jdk, is it just me or is the website scaring me with over 100mb download. I am on dial-up @ the office no connection at home. even with a download manager, other workers and my other jobs suffers the heavy processing. sbu who is d guy u sent d CD and let me burn a copy.

after i must have written a couple of codes, then i will give feedback. also, i will try an produce the same code in VB & VB.NET without using the IDE once I get this code running.
Re: Java Has Failed! by sbucareer(f): 10:47am On Mar 09, 2006

Skima, I have posted the book and 4 CD's with the same content. It contains Sun IDE, MS Studio, Netbeans, J2SE 1.4, 1.5, Sun Application Server 8.1 RI, tomcat 4.1, Oracle 10g MYSQL, PHP 5, Apache Server and may more. I have send it today skima so look out in the post for arrival and anyone that is interested should contact skima. Sorry for the delay.

Re: Java Has Failed! by africanboy(m): 12:26pm On Mar 09, 2006
who is skima?
Re: Java Has Failed! by sbucareer(f): 3:26pm On Mar 09, 2006

Contact him here In case you want a slick preview of the DVD's contents login here and use these details

username: visitor
passwd: letmein

Re: Java Has Failed! by mimohmi(m): 3:24am On Mar 10, 2006
sbucareer, am working on new features of 5.0. Hope to make the post after my exams. The Generic stuff is to checked if a
parameter or an object passes IS-A test at compile time rather that at runtime, by specifying a type element as a parameter
in the class definition. To force a generic method, pass the type parameter as an argument. So doing, the rest is for the
compiler to ensure that only objects that passed IS-A test is allowed as parameter to the constructor or methods.
As of 5.0, Collection classes were made generic. eg

To declare a generic class

public class Bus<E>{
List lagos = new ArrayList<E>(); // ArrayList to hold on bus objects, lagos can only contain objects that IS-A Bus

public void addMolue(E molue) { // can only pass IS-A bus arguments
lagos.add(molue); // can only add IS-A Bus to lagos

To implement inheritance with generic classes, follow the normal java rules. eg

public class Vehicle<E extends Bus>{} // Vehicle can only contain IS-A Bus objects

More on it next week. Have a lovely weekend. Tomorrow is my D-Day.
Re: Java Has Failed! by sbucareer(f): 3:41am On Mar 10, 2006

Good luck tomorrow
Re: Java Has Failed! by blackweaver(m): 1:28pm On Mar 17, 2006
actually i don't think java is a very difficult language, as sbucareermentioned, try to rewrite that line of code in C/C++ actually i'm still more or less just learning both languages and am more familiar with C++ however i think making headway in java is easier; also, yes c/c++ used to be noticeably faster than java but i've heard that java's catching up.

(1) (2) (3) (4) (5) (6) (7) (Reply)

Viewing And Creating Reports In Java - Share Ur Experiences / Who Says Nigerians/africans Cannot Be Creative And Build From Scratch / Differences between Software engineering and Computer science.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2020 Oluwaseun Osewa. All rights reserved. See How To Advertise. 206
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.