Results 1 to 4 of 4
  1. #1
    phudgens is offline Member
    Join Date
    Feb 2009
    Location
    Denver
    Posts
    1
    Rep Power
    0

    Default Location of java class libraries on Sun

    Hello everyone. I'm a brand new java programmer so be gentle with me! I'm working my way through "Sam's Teach Yourself Programming with Java" (up to chapter 15) and feel like so far everything is understandable. I've been running my programs on my PC and thought I'd try one on my Sun machine for fun, since that's where I ultimately want to run anyway. My program compiled w/o problem, but gave the following error when running:
    Exception in thread "main" java.lang.NoClassDefFoundError

    My research of this error seems to indicate that Solaris can't find the java.awt and javax.swing libraries. I can't find them and no one in the IT group seems to know either.

    Does anyone know where these libraries are normally installed on a Sun machine so that I can specify that location with the -classpath option when I run my programs?

    Thanks,

    Paul Hudgens
    Denver

  2. #2
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    6

    Default

    don't think this error is related to swing or awt. your problem might be with just the naming of your class and java file. what exactly are they?

  3. #3
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    have you tested out a simple hello world program on the sun machine?
    USE CODE TAGS--> [CODE]...[/CODE]
    Get NotePad++ (free)

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    As emceenugget says, this is not related to Swing/AWT libraries.

    Do you try the same class on both PCs? Try a simple class on Sun machine, like hello world. Still you get the same issue, check the class path setting up correctly. It can be the issue here.

Similar Threads

  1. digital sign libraries
    By Shuru in forum Advanced Java
    Replies: 4
    Last Post: 11-07-2008, 08:01 AM
  2. Replies: 3
    Last Post: 10-12-2008, 02:49 PM
  3. Java Extract PDF data from location XY
    By Unite in forum Advanced Java
    Replies: 1
    Last Post: 06-30-2008, 01:31 PM
  4. Replies: 3
    Last Post: 05-01-2008, 08:30 AM
  5. PoJoe Component Libraries 1.1
    By levent in forum Java Software
    Replies: 0
    Last Post: 06-08-2007, 10:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •