java - Compiling and Running a netbeans GUI Application in Unix commandline -
i need make gui application class , want make sure can transfer netbeans project using gui builder (i know how make without it, that's more time consuming , think neater without me guessing coordinates etc. , use netbeans gui builder) netbeans onto unix , compile it. here's did made new jframe form (using netbeans gui builder) called startframe.java , called menuframe.java. (keep in mind ran no errors in netbeans) startframe creates new instance of menuframe , opens on it's first run. transferred of onto unix system. @ first tried compiling it, of course got errors, saying org.jdesktop... isn't found.
okay i've searched stackoverflow , web this. ended getting swing-layout-1.0.4.jar libraries in netbeans. i'm kind of new @ compiling command line, put them in same folder, , while in directory. did
javac startframe.java -cp swing-layout-1.0.4.jar
and got error noclassdeffoundexception: menuframe though in same folder. tried
javac startframe.java menuframe.java -cp swing-layout-1.0.4.jar
and compiled fine no errors. created 6 files startframe.class startframe$1.class startframe$2.class startframe$3.class startframe$4.class menuframe.class tried running
java -cp swing-layout-1.0.4.jar startframe
and had noclassdeffoundexception: startframe. searched web fixes , stack overflow , found similar (not exact though) problems this, none of fixed it.
the file dist/readme.txt
tell how proceed. type ant -p
@ command line see available commands: ant run
good.
addendum:
the machine doesn't have ant installed
that unusual, should verify it. may need add current directory path, e.g.
java -cp .:swing-layout-1.0.4.jar startframe
Comments
Post a Comment