Development Notes

Plenty of activity in the background but nothing noted here yet!


Developing applications for Java SE 5

Note: If you create your application using JDK 6 but you need the application to also run on Java SE 5, you can have the IDE generate its code to use the Swing Layout Extensions library instead of the classes in Java SE 6. Open the ContactEditorUI class in the GUI Editor. In the Inspector, expand the ContactEditorUI node and choose Form ContactEditorUI. In the Properties window, change the value of the Layout Generation Style property to Swing Layout Extensions Library.

Distributing and Running Standalone GUI Applications

To prepare your GUI application for distribution outside of the IDE:

* Zip the project's dist folder into a ZIP archive. (The dist folder might also contain a lib folder, which you would also need to include.)

To run a standalone GUI application from the command line:

  1. Navigate to the project's dist folder.
  2. Type the following:
java -jar <jar_name>.jar 
Note: If you encounter the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group

Ensure that the file references the currently installed version of the Swing Layout Extensions Library.

Java Notes

Java DB - Derby

  • Download and setup environment variables
  C:\> set DERBY_INSTALL=C:\Apache\db-derby- 
  C:\> set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;.
Unix Korn Shell:
  export DERBY_INSTALL=/opt/Apache/db-derby- 
  export CLASSPATH=$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbytools.jar:. 

Now you should be able to run ij the interactive SQL scripting tool.

To create a database (embedded mode)

> connect 'jdbc:derby:MyDbTest;create=true';
> exit;

To reconnect to the already created database

> connect 'jdbc:derby:MyDbTest';

To select all the database tables use:

> select tablename from sys.systables;

You default schema is APP so you need to specify the systables schema explicitly otherwise you get a “table/view does not exist” error.

Derby Backups

Using Derby with NetBeans 6.5

Derby Manuals

JTable Tutorial

development_activities.txt · Last modified: 2010/01/07 22:41 (external edit) · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki