Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33

Thread: putting java class online

  1. #26
    Member
    Join Date
    Oct 2012
    Posts
    133
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Re: putting java class online

    i printed the value in paint method in frond middle and end. still no null.

  2. #27
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: putting java class online

    That's good that you are not getting the exception any more. Strange that it only happened once.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #28
    Member
    Join Date
    Oct 2012
    Posts
    133
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Re: putting java class online

    i still getting the same error on web. but when i use eclipse there is no error or no null.

  4. #29
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: putting java class online

    I don't understand what you are doing???

    To find the problem, you need to execute the code that has the problem, not some other version.

    Keep adding println() statements to show the variables used on each line until you see the variable that is null.

    Copy and post the whole contents showing the print outs and the exception error message
    If you don't understand my answer, don't ignore it, ask a question.

  5. #30
    Member
    Join Date
    Oct 2012
    Posts
    133
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Re: putting java class online

    To find the problem, you need to execute the code that has the problem, not some other version.
    i dont know what u saying here. i am execute the code that has the problem which is my Main.java. on line 204. and i am keep adding println() statment but they have some value in it. i dont understand why its give me error on web. i am test on web bc its an applet. that why i said in ecipse it works fine no error. but when i run it web, i get a error.

    again the error was :
    error: ExceptionInInitializerError
    more detail:
    Java Plug-in 10.17.2.02
    Using JRE version 1.7.0_17-b02 Java HotSpot(TM) Client VM
    User home directory = C:\Users\dave
    ----------------------------------------------------
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    ----------------------------------------------------
    CacheEntry[http://localhost/E_COMMERCE/menu_pag...ground.class]: updateAvailable=true,lastModified=Wed Mar 20 20:14:30 EDT 2013,length=1492
    Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
    at Main.paint(Main.java:204)
    at sun.awt.RepaintArea.paintComponent(Unknown Source)
    at sun.awt.RepaintArea.paint(Unknown Source)
    at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPri vilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPri vilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPri vilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

  6. #31
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: putting java class online

    Where is the line that your println() prints out BEFORE the statement with the error?
    If you don't understand my answer, don't ignore it, ask a question.

  7. #32
    Member
    Join Date
    Oct 2012
    Posts
    133
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Re: putting java class online

    i cant print it before the error. i dont think u understand that i am saying.

    again there are no error in eciples. in eciples the applet works and run fine.

    problem is when i try to load the applet in web by using <applet> tag.
    on web i get a error. take a look at image. error.jpg

  8. #33
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: putting java class online

    You need to find what variable has the null value. A way to do that is to print out the values of the variables in the statement where the error occurs and see which one has the null value. Executing the code in the IDE does not cause the error so its a waste of time executing the code there. Execute it where the error happens.

    Images aren't any good. You need to copy the program's output that is shown in the java console and paste it here.

    I'm done for tonight. Back tomorrow.
    If you don't understand my answer, don't ignore it, ask a question.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. About Java online course
    By geek101 in forum The Cafe
    Replies: 3
    Last Post: October 3rd, 2012, 12:06 PM
  2. Which is the best place to get java tutorial online??
    By texsas12 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 2nd, 2012, 07:45 PM
  3. Java Online Compiler
    By sb24 in forum Java Theory & Questions
    Replies: 15
    Last Post: March 23rd, 2012, 09:50 AM
  4. [SOLVED] Putting Trajectory of a Projectile formula in Java form.
    By mwebb in forum Java Theory & Questions
    Replies: 2
    Last Post: March 2nd, 2012, 07:23 PM
  5. online system on java
    By u-khan1 in forum Paid Java Projects
    Replies: 0
    Last Post: March 8th, 2011, 06:02 AM