The Source for Java Technology Collaboration


Home | Changes | Index | Search | Go

Back to Documentation Page

Bulding Your first app with binary realasse.

1 Getting working "Project Looking Glass

The very first step is getting working Project Looking Glass, any information You can find here or on Forum.

After getting working lg3d You should add lg3d-core.jar to your OS CLASSPATH or in Your favorite IDE add to "Project Libaries" lg3d-core.jar. This JAR include all Lg3D? API and must be in visibly for Your Java Compiler (javac)

2 How write application

You can find here or here s some information about writing simple app. Also You can download lg3d-incubator sources. There You can find many useful code.

3. Writing Jar MANIFEST file.

After writing and compiling Your first app You must pack it to jar file. You can use standard command line command "jar" or use IDE Gui for that. When You pack app to jar You will need to edit jar manifest file. It is in your jar in folder META-INF/MANIFEST.MF. The configuration listens to the following parameters in the manifest file:

3.1 Config-File:

This specifies the location of the lgcfg config file within the

application jar. This configuration file is in the same format as the

other lgcfg files (eg it is a XML encoded object). The script adds the

jar to the classpath, therefore any images/classes/files within the jar

are available to the config file. More about lgcfg You can find http://wiki.java.net/bin/view/Javadesktop/FirstIncubatorapp in step 5.

3.2 Main-Class:

This is the standard manifest parameter that specifies the class file to

execute when executing a jar (eg java -jar syntax).

3.3 Icon-Filename:

The name of an icon can also be provided by the parameter Icon-Filename: If this isn't

provided a default icon will be used (/resources/images/icon/defaultapp.png) from lg3d-core.jar

There are two ways to write MANIFEST.MF.



One is without *.lgcfg file.

Manifest-Version: 1.0

Specification-Title: Tutorial1 Specification

Created-By: 1.4.2_07 (Sun Microsystems Inc.)

Main-Class: Tutorial2 //Main Class of Application

Icon-Filename: Tutorial2.png //Path to icon image in Your JAR file

Implementation-Title: Tutorial2

Specification-Version: 0.7.0

Specification-Vendor: Project Looking Glass Tutorials

Implementation-Version: 0.7.0



And second with lgcfg file

Manifest-Version: 1.0

Specification-Title: Tutorial3 Specification

Created-By: 1.4.2_07 (Sun Microsystems Inc.)

Implementation-Title: Tutorial3 //Main Class of Application

Specification-Version: 0.7.0

Specification-Vendor: Project Looking Glass Tutorials

Implementation-Version: 0.7.0

Config-File: tutorial3.lgcfg //Path to lgcfg file in Your JAR file

about writing *.lgcfg "looking glass configuration file" file You find here in step 5.

4.Running Project Looking Glass with Your first App

When You compile Your app, pack to JAR and edit MANIFEST.MF You are redy to Copy JAR to Lg3d_HOME/ext/app/ and run lg3d-dev script in Lg3d_HOME/bin folder. You should see Your app in the taskbar of Project Looking Glass.

Topic FirstTestapp . { Edit | Ref-By | Printable | Diffs r3 < r2 < r1 | More }
 XML java.net RSS

Revision r3 - 08 Jun 2005 - 19:12:10 - Main.radeczka
Parents: WebHome > ProjectLookingGlass > DocumentImprovementProjects > DocumentationPage