Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29
  1. #11

    Default Re: Java java.lang.NoClassDefFoundError


    ahh mao diay.. so kung mag-run ka, i-apil pud diay nimo ang -classpath option? mao diay, wa ko kabantay dah naa man diay sa libro. hehe ahak oi. pero hasol man sige type sa classpath, unsaon man nga i-set na daan? naa na koy CLASSPATH variable sa environment variables pero dili man gihapon pwede..

  2. #12

    Default Re: Java java.lang.NoClassDefFoundError

    Kung WinXP imo gigamit

    Control Panel > System > Advanced > Environment Variables

    Under System Variables

    Edit or Add (New), hibaw na ka unsa buhaton pagmakita na nimo ang display, basta use semicolon as separator sa classpath or path:

    Path
    Classpath

    ----------------------------------------------------------------
    This is not a consistent approach, and not all windows will respond accordingly so I recommend the other method but make a batch file for shorcut. So you don't have to type very long in every execution.

  3. #13

    Default Re: Java java.lang.NoClassDefFoundError

    ah ako na na gi-buhat kana mga Environment variables. ang path sa package man i-butang sa? wala man gihapon. hehe. unsaon man na ang batch file?

  4. #14

    Default Re: Java java.lang.NoClassDefFoundError

    Go to command prompt then type

    For example

    copy con myproject.bat

    <Press Enter>

    java -cp c:\main\;c:\shared_class\;c:\mysqlconj\mysql-connector-java-3.1.12\mysql-connector-java-3.1.12-bin.jar\; Main

    <Press F6>

    myproject

    <Press Enter>

    Then enjoy viewing your java program

  5. #15

    Default Re: Java java.lang.NoClassDefFoundError

    ^wala ko ka-kuha ana nga command dah.. hehe. unsa na ang "copy con" nga command?
    akong package directory kay naa sa C:\Java\Packages, nya akong main program naa sa My Documents...

    naa pud ko lain question, lahi na topic pero ari lang ko post. hehe.
    nag himo ko lain .java file sa package, Rectangle.java, nya naa koy main program, MyRect.java. Post lang nako ang code.. hehe.
    Rectangle.java
    Code:
    package Geometry;
    public class Rectangle{
    	public Rectangle(){
    		point[0].setPoints(0,0);
    		point[1].setPoints(1,0);
    		point[2].setPoints(0,1);
    		point[3].setPoints(1,1);
    	}
    	public Rectangle(double point1_x,double point1_y,double point2_x, double point2_y){
    		point[0].setPoints(point1_x, point1_y);
    		point[3].setPoints(point2_x, point2_y);
    		point[1].setPoints(point2_x, point1_y);
    		point[2].setPoints(point1_x, point2_y);
    	}
    	public Rectangle(final Rectangle oldRect){
    		point[0] = oldRect.point[0];
    		point[3] = oldRect.point[3];
    		point[1] = oldRect.point[1];
    		point[2] = oldRect.point[2];
    	}
    	public double getWidth(){
    		return point[0].distance(point[1]);
    	}
    	public static void printRectangle(final Rectangle rect){
    		for(int i= 0;i<4;i++){
    			System.out.println("Corner"+(i+1)+" X: "+rect.point[i].getX()+" Corner"+(i+1)+" Y: "+rect.point[i].getY());
    		}
    		System.out.println();
    	}
    	Point&#91;] point = new Point[4];
    }
    MyRect.java
    Code:
    import Geometry.*;
    public class MyRect{
    	public static void main(String&#91;] args){
    		Rectangle myRect = new Rectangle(0,0,2,1);
    		Rectangle copyRect = new Rectangle(myRect);
    		printRectangle(myRect);
    		double width = myRect.getWidth();
    	}
    }
    mag-error lagi og "Symbol not found"? ang methods nako (printRectangle, getWidth) kay dil ma-work..

  6. #16

    Default Re: Java java.lang.NoClassDefFoundError

    bump lang ko.. ehehe

  7. #17

    Default Re: Java java.lang.NoClassDefFoundError

    You can use a simple text editor like a Notepad instead of copy con, actually you don't need a batch file if you don't mind typing long.

    Post your questions under Java Programming

  8. #18

    Default Re: Java java.lang.NoClassDefFoundError

    Why not try to use apache ant. It will make your java programming easier.

    http://ant.apache.org/

  9. #19

    Default Re: Java java.lang.NoClassDefFoundError

    Good idea, as long you no longer use win9x coz the latest version of ant no longer support this.

  10. #20

    Default Re: Java java.lang.NoClassDefFoundError

    Quote Originally Posted by javapenguin
    Good idea, as long you no longer use win9x coz the latest version of ant no longer support this.
    dili na support sa windows ang ant kay naa may nant http://nant.sourceforge.net/. According to the site : "NAnt is a free .NET build tool. In theory it is kind of like make without make's wrinkles. In practice it's a lot like Ant."

  11.    Advertisement

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

 
  1. Replies: 44
    Last Post: 07-14-2015, 04:46 PM
  2. nganung lisod2 man ang java programming lang
    By johndesc in forum Campus Talk
    Replies: 33
    Last Post: 06-21-2011, 08:03 PM
  3. Want To Buy: Java moss kanang barato lang
    By prince04 in forum Pets
    Replies: 7
    Last Post: 12-29-2010, 03:36 PM
  4. Mobile Java Games
    By Nezumix22 in forum Gizmos & Gadgets (Old)
    Replies: 23
    Last Post: 05-06-2005, 05:33 PM
  5. how to install java apps/games in motorola c651
    By 8088 in forum Gizmos & Gadgets (Old)
    Replies: 4
    Last Post: 04-18-2005, 03:40 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
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top