peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thread closed, double posting is not welcome.
Stick to original post.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Guys, please drop this mocking it doesn't help any of us.

@loozax you should be aware that there is a rule on this forum which says "We only give homework help to those who show effort". So presuming that you still on this task I would recommend you do some coding, post code and ask questions related to code or specific issue and not general request to do your homework

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

first open browser you have and type tomcat root address like http://localhost:8080/foldername/file.jsp press enter

I'm sorry, but you just wasted time by providing no value info

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That is what I suspected, but did not want to feel you bad if I ask directly "did you included all libraries and put them in right place?" some people lately take it as rude

PS: You should also have look into servlets and JSTL to minimize use of scriplets in your JSPs

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you list resources as their are organized on the server like
PROJECT_FOLDER

  • JSPs (files)
  • WEB-INF (folder)
    • lib (folder)
    • web.xml (file)
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I can`t run with eclipse too !!!

That is hell of the description too!

What about telling us what you actually doing as what you have installed and if basic things work...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Here are few suggestions:

1) Your code is growing and becoming more difficult to manage. It is good practice to put each screen in its own class and either pass instance of Display from screen to screen or do something like this article
2) Instead of using arrays create a simple Memo object that can hold "long" type for date&time and string for memo comment. Something like

public class Memo{
    private long dateTime;
    private String comment;

    public Memo(){}

    public Memo(long dateTime, String comment){
        setDateTime(dateTime);
        setComment(comment);
    }

    public void setDateTime(long dateTime){
       this.dateTime = dateTime;
    }

    public long getDateTime(){
       return dateTime;
    }

    public void setComment(String comment){
        this.comment = comment;
    }

    public String returnComment(){
        return comment;
    }
}

this become more organized and more efficient then limited size arrays, especially if you decide to store Memo object in vector and pass along for various reasons (reading multiple records from RMS, putting them in Memo objects, storing in vector and passing for further processing)

3)I believe this is school assignment so I will not push you for advanced GUI like CustomItem or Canvas. However I would recommend re-do your application flow. On application start I would show option to "Add Memo" and "View Memos" in form of List. Once add memo selected I would proceed to your current screen with calendar and text area where you will collect data from user and store them.
On other hand view memos should receive either collection of data or query RMS …

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can either type in all vertex coordinates by hand ( I would not recommend to do this if they not simple shapes like cube or sphere) or you can create model in 3D environment like 3D Studio Max (over kill if you are not part of larger company in mobile development) or Blender (free). Here is an example how to get 3D model (m3g file extension) into MIDlet pg. 297- 302 for start

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

To put everybody mind in peace here is your "why essential, but what about Ramy and Scott".

I made nomination of essential for featured poster which was approved. My reasons to do so? In very short period essential is here, he become great asset. Most of his post (some 3/4 of all his posts) are supported by coding to help with issue or provide an example on which to explain suggested approach. There is no moaning or making fun of poster, essential is straight to the point.
I do not care how long you here, how many posts you made and if people giving you reputation points. What I care is what you post and is it helpful. Do this and you can be next nominee.

So do not blame dani or davey for not knowing who is good in what, as they cannot spend whole time looking on quality of posts in every forum section.

Nick Evan commented: Hell yeah +24
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you please provide code so we can try to find out what is going on?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As BestJewSinceJC already mention for syntax highlighting you should use code=java
[code=java]System.out.println("Colour Syntax"); [/code] will come as

System.out.println("Colour Syntax");

As for posting errors received from application we leave posting format on you. What is important to as is the use of code tags on posted code (which some people refuse to do and receive pointless infractions and sometimes even ban)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You missing closing bracket on PreviousButtonHandler class

class PreviousButtonHandler implements ActionListener {

        public void actionPerformed(ActionEvent e) {
            int numItems = theInventory.getNumItems();
            if (numItems != 0) {
                index = (--index) % numItems;
            }

            if (index < 0) {
                index = numItems - 1;
            }

            if (numItems == 0) // catches for last entry not needed because we add a blank entry at zero but just in case
            {
                JOptionPane.showMessageDialog(null, "That's the last entry.", "Please try again", JOptionPane.ERROR_MESSAGE);
            }

            repaintGUI();
        }
    }

and after adding this one you will need to delete one at the end of the code (end of VhsInventory class). Look like while you been adding new handlers you placed them directly in PreviousButtonHandler class.

PS: You should also start putting classes in they own files. Code is growing and difficult to maintain

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Show what you did so far and we will do our best to help you

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Closing thread, attracting unwelcome attention of spammers

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

OK, before I start doing anything, would you care to explain what this application is supposed to do?
From what I seen so far I guess you trying to create some sort of memo holder or diary where you will keep a note associated with date and time.
Can you confirm or correct me please?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@sneaker this all is nice, but you provided general advice on Java SE and question was for Java ME where you need WTK or so called mobile SDK

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm sorry I do not have access to Ubuntu, have look on this article if you can pick some tips. If it doesn't work out try to download one of custom SDKs like Nokia, SonyEricsson or traditional Sun SDK that comes with own installers and just add them to NetBeans (this is Windows tutorial how to add JDK/SDK to NetBeans, but principle is same)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

hey!! i do not have d code but do plz forward me the code by 3rd August if u get...its very urgent

Here is "d code"

PS: We work at our own convenience and your urgency doesn't mean nothing to us. Sorry...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You will get use-to-it. Main issue with there site is the speed. Members complains about for ages and so far nothing been done

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Hi,

I need to compare MySQL, MS SQL 2008 and Oracle.

Do you know of any link where this comparison takes place? I found a few comparign MySQL and MS SQL 2000 but not with MS SQL 2008 and Oracle too.

Can you please help?

Thanks

Josh

This is trivial question and easily solved with some Google search so apply your self to this simple task and do it. If you have more specific question you more then welcomed to ask

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you showcase how you do single selection in first place so we do not break your current flow in application and just build on it.

PS: Your urgency mean nothing to us, we help when we can not when somebody demands it...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Off topic: Just do not tell me you are from Westminster University or I start laughing. This is traditional assignment there.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Already missing you, good luck with everything AD

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
  1. Please do not bump old threads in the future to just ask question of your own instead of providing some answer
  2. If you wish continue discussion, create new thread in appropriate forum section and do not forget to mention your level/confidence with which ever language you are about to use
  3. Thread closed as it is getting attention of "I want project idea" and "I want coding" and similar requests which are not beneficial
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Ouch, looks like I messed up big time without spotting my own mistake

import java.sql.*;

public class OracleConnect {
    public static void main(String[] args) throws SQLException {
        try {
            Class.forName("oracle.jdbc.OracleDriver");
            Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "username", "password");
            if (conn != null) {
                System.out.println("I am Connected to oracle database");
            }
            conn.close();
        }
        catch (Exception e) {
            System.out.println("ERROR : " + e);
            e.printStackTrace(System.out);
        }
    }
}
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
C:\TestDB>javac -cp ojdbc14.jar TestDB.java

C:\TestDB>java -cp .;ojdbc14.jar TestDB
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        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:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at TestDB.main(TestDB.java:22)
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

E-books, big issue if you get some like from O'Reilly they most likely out of date or illegal (which is big NO, NO here). The best you can do is limited preview from Google books like Beginning J2ME - From Novice to Professional or buy paper copy (if you decide to buy then you may want to go for newer version called Kicking Butt with MIDP and MSA: Creating Great Mobile Applications).
As for the calls, book show you basics how to start call, but it will not explain how to handle activities once connection established and also I'm not sure if there is functionality of finding out last called number. You may have more chances on this with Android, Symbian or Windows CE that are able query underlying operating system of device

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This is getting interesting.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class TestDB {

  public static void main(String args[]) {
    Connection con = null;

    try {
      Class.forName("com.mysql.jdbc.Driver").newInstance();
      con = DriverManager.getConnection("jdbc:mysql://128.0.0.1:3306/dbName",
        "username", "password");

      if(!con.isClosed())
        System.out.println("Successfully connected to " +
          "MySQL server using TCP/IP...");

    } catch(Exception e) {
      //System.err.println("Exception: " + e.getMessage());
      e.printStackTrace();
    } finally {
      try {
        if(con != null)
          con.close();
      } catch(SQLException e) {}
    }
  }
}

While I'm able to run above code, from command line I will receive following stack trace

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        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:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at TestDB.main(TestDB.java:22)

PS: Java version 1.6.0_12

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

plzz somebody help me.i am still stuck at it!!

plzz mods someone help!!

Would be nice if you notified if you tried above recommendations and what happen instead of crying for help.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1) You will use id or name attribute of data field from which you want to retrieve data
2) Sessions

For example on use of both of them have look at this post

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can do it through one of the meta tags inside the head block of html document. This will redirect user in 1 sec to next page. So if you leave it empty visitor should hardly notice

<meta http-equiv="refresh" content="1; url=database.jsp" >

and little masking inside web.xml

<servlet>
       <servlet-name>Database</servlet-name>
       <servlet-class>GetFirstData</servlet-class>
    </servlet>

    <servlet-mapping>
       <servlet-name>Database</servlet-name>
       <url-pattern>/database.jsp</url-pattern>
    </servlet-mapping>

replace "GetFirstData" with name of your real servlet and you done

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Developing this site in asp.net would be a good choice because it has the built-in functionality to allow for secure logins, role-based content viewing, profile management, etc.

same can be achieved with JSP or PHP and there can be endless discussion on which is better. One for sure, there is lesser number IIS servers on the market then Apache and as far I'm concerned ASP wouldn't run on anything else, plus IIS hosting is more expensive then Apache

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Mayc2ph welcome to our forum

@RAJESHw7 please be advised that you are expected to use full sentence English and chat-room speak is not tolerated here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Few things you can try

  • If you insisting on using classpath then you should use following declaration E:\Coraclexe\app\oracle\product\10.2.0\server\jdbc\lib
  • On other hand you can direct your IDE where to look for connector, importing JAR for Eclipse here and NetBeans and IntelliJ IDEA here
  • Also check your connection string if @HOST should not be replaced by @localhost, but this is not related to class not found error
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you please close this thread then? If left open it may get unwelcome attention of "want to be members" in reality spammers. Thanx

(Below last post there will something like "Mark this thread solved" or similar so just click on it)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
  1. No need to shout with explanation marks, that will not get you faster respond
  2. This is not necessary E:/oraclexe/app/oracle/product/10.2.0/server/jdbc/lib/ojdbc14.jar
  3. ojdbc14.jar or ojdbc14_g.jar will not help you as documentation clearly state "classes for use with JDK 1.4 and 1.5"
  4. Therefore you either need to use lower JDK or get Oracle 11g and download ojdbc6.jar (Classes for use with JDK 1.6.)

Have nice day.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There is no need for expert. The error spell it out clearly for you

java.lang.[B]ClassNotFound[/B]Exception: oracle.jdbc.OracleDriver
java.lang.[B]ClassNotFound[/B]Exception: oracle.jdbc.OracleDriver

You either do not have connection drivers at all or you did not let application know where to find this driver (either add it through IDE or on compile provide classpath with location of this driver). To download go here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

this code does't hv any error try with this

  1. Use full sentence English.
  2. We are trying to help Monica so she learn in the process and not to give full solution so she would fail her class. Don't you think any of us could do it long ago and in more advanced and sophisticated way?
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

OK, your trouble, to begin with, starts with else statement here

else{
    /*{ extra bracket*/System.out.print ("Alphabetical Order of your name is:");

There is extra opening bracket, then followed be 3 for loops with ";" between loop body and opening bracket (same applies for if statement in second for loop). First for loop also encapsulate some weird declaration or assignment attempt len ([c]=name.charAt (c)); . And to close it for now there is one extra closing bracket after 3rd for loop.

Can you please sort these problems for now?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Not that I do not want help but here is a rule which state We only give homework help to those who show effort, in the meaning show us what you tried so far and we will direct you. Do not expect people to do your homework, that way you never learn.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you post your updated code please, so we see what you tried and where can be problem?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Have look at this section from SCJP study guide

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

i don't get it T_T ...

i try to change .. and put my logic in your code ..

but it full of error T_T

please ... help me.. i need it now T_T ...

Without seeing changes you made to your original code we cannot advice. So please post your code and we will try our best to advice you...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Have look on this example http://www.ibm.com/developerworks/web/library/wa-aj-enable2/index.html and try to apply to your case

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@axeeffect2002, why you think I did not provided solution for all the errors in provided code? I wanted Monica to do it, so she learn something new. Error correction is an essential skill that you need to learn, because IDE will not do it for you.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You have extra closing bracket.
Plus you need to change all this "s.o.p" replace with proper System calls, add statement to while loop on line 61, check use of declared variable names not just random names (line 18,25), line 15 check declaration in for loop plus I guess there will be more

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Well structured database would be beneficial

PS: Bumping old post is not best idea, you should have created new thread.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Closing thread getting attention of people who are not willing to pay for study materials as they should!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thread attracting to much of spammer, therefore closed