How to Compile and run a GUI project made in Netbeans from shell

hi all .....

I develpoed a java project using Netbeans .The project has GUI also (JFrame and various layout ) . The project is building and running fine through netbeans .But when I tried to compile the source files (*.java files) from shell , I failed .

The project has two files MainFrame.java (JFrame file and this file has the public static void main method ) and helloworld.java (simple java class file). But the "src" folder created by netbeans (at project location) contains one more file named "MainFrame.form" . Moreover netbeans was using two jar files (AbsoluteLayout.jar and Swing-layout-1.0.jar .

I tried to compile the two .java files . helloworld.java compiled successfully but the MainFrame.java didnt. I used the command :

linux:~/netbeans projects/Network tool/src/mytool # javac -classpath ".;AbsoluteLayout.jar;Swing-layout-1.0.jar;" MainFrame.java

The 14 errors were encountered. MOst of them were like :

MainFrame.java:138: package org.jdesktop.layout does not exist

org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);

^

Help, suggestion or guidance of any type is welcomed .(Keep in mind that project is running fine when done using netbeansIDE).

waiting for reply....

[1304 byte] By [justborna] at [2007-10-2 17:48:06]
# 1

Hello,

1. The .form file was used by Netbean's GUI builder to create the .java and is not needed for compilation.

2..../src # javac -classpath "..." mytool/*.java

I guess the package mytool was not coped with.

Alternatively it is worth to use the ant build tool also used by Netbeans.

Then you can make a jar from the class files, indicate in the manifest.mf file:

1. the main class

2. the library jars

joop_eggena at 2007-7-13 19:06:05 > top of Java-index,Developer Tools,Java Compiler...
# 2
Did you find any solution to this? How do solve this problem? I am getting the same problem. Please guide me if you have solution.Regards
nikhil_shravanea at 2007-7-13 19:06:05 > top of Java-index,Developer Tools,Java Compiler...