Academic Tutorials



English | French | Portugese | German | Italian
Home Advertise Payments Recommended Websites Interview Questions FAQs
News Source Codes E-Books Downloads Jobs Web Hosting
Chats

Weblogic Tutorial
WebLogic Tutorial Introduction
The WebLogic Workshop Development Environment
Developing Applications
Applications and Projects
Workshop File Types
Debugging Your Application
Managing the Build Process
Compile a Single Java File
Source Control Systems
Message Logging
Working with Java Controls
Developing Web Applications
Designing Asynchronous Interfaces
Handling XML with XMLBeans
Building Integration Applications
Building Portal Applications
Developing Enterprise JavaBeans
The Life Cycle of an Entity Bean
Session Beans
Developing Message-Driven Beans
WebLogic Workshop Security Overview
Deploying an Application

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting
Network Sites


Compile a Single Java File


Previoushome Next






How Do I: Compile a Single Java File?

To selectively compile a single JAVA file, you can integrate a custom compilation script into the Workshop IDE by declaring the custom script as an "external tool".
A D V E R T I S E M E N T
You can then pass single JAVA files from the IDE to the custom script.

Declaring a Custom Compilation Script as an "External Tool"


  1. On Windows operating systems, open the the Workshop Preferences file located at C:\Documents and Settings\[Windows_user_name]\.workshop.pref.
  2. Edit the element <component name="workshop.workspace.tools.CustomToolAction"> to include your custom compilation script. This element determines the options that appear in the menu bar Tools-->External Tools.
        <component name="workshop.workspace.tools.CustomToolAction">
          <node name="javac">
            <option name="capture" value="true" />
            <option name="command" value="compile.cmd  "${file.path}"" /> 
            <option name="directory" value="C:\build_scripts" />
            <option name="interactive" value="false" />
          </node>
        </component>
    The element <node name="javac"> causes a menu option named "javac" to appear on the menu bar Tools-->External Tools.



    The element <option name="directory" value="C:\build_scripts" /> tells Workshop where to look for your build script (you can place the build script in any local directory).

    The element <option name="command" value="compile.cmd" "${file.path}" /> tells Workshop to pass the currently open file to the build script.

Place the Custom Compilation Script in the Appropriate Directory


  • Save your build script in the directory specified in the element <option name="directory" value="C:\build_scripts" />. Below is a build script that you can use as a template.

    compile.cmd
        set PATH=D:\jdk1.4.2_04\bin;
      
        set CLASSPATH=MyClasses
       
        set CLASS_DIR=C:\bea\weblogic81\samples\workshop\SamplesApp\WebApp\WEB-INF\classes
       
        javac -d %CLASS_DIR% -classpath %CLASSPATH% %1
       
        echo compiled %1
       
        popd

To compile a JAVA file, open the file in the Workshop IDE, and select Tools-->External Tools-->javac. The compile results will be displayed on the javac tab.

 




How Do I: Use a Custom Ant Build for an Application?


WebLogic Workshop uses a standard Ant build process for all applications. You can create a custom Ant build file for an application that extends the standard build process or uses different build targets altogether. If you want to extend or modify the standard build process, you should first export the standard application build file and begin by modifying that file.

To Export the Standard Application Build File

  1. Choose Tools-->Application Properties to display the Application Properties dialog.
  2. In the left-hand pane, select Build.
  3. In the Build Type pane, click Export to Ant File. A dialog appears informing that the exported_build.xml file has been stored in the root of the application folder. Click OK.

The exported Ant file contains a set of standard tasks and targets for managing the build for your application.

Note the class workshop.core.WlwBuildTask called by the "wlwBuild" task is the same class called by the command line tool wlwBuild.cmd.

    <taskdef name="wlwBuild" classname="workshop.core.WlwBuildTask"
	classpath="${weblogic.home}/workshop/wlw-ide.jar"/>

The most important target in the Ant file is the "build" target.

  <target name="build">
    <!-- Builds the full application creating an ear at the specified location.
         The server classpath parameter is used, but may be omitted if the server home directory
         configured in Workshop is accessible. -->
    <wlwBuild work="${app.dir}/${work.file}" serverclasspath="${server.classpath}">
       <build outputdir="${output.dir}" outputfilename="${output.file}"/>
    </wlwBuild>
  </target>

Note that the following parameters are available for the "build" target:

project: String. Name of a specific project within the application to build. If omitted, the entire application will be built.

outputdir: String file path. Directory where build output file(s) will be placed. Defaults to application directory. May not be applicable for some types of project build.

outputfilename: String file path. Filename to use for output archive. Defaults to appname.ear. May not be applicable for some types of project build.

nodebug: Boolean value. Turns debugging information on or off. If no value is specified, the value is set to false.

noear: Boolean value. Specifies whether an EAR file should be generated for the application build. If no value is specified, the value is set to false. Not applicable for a project build.

To Create a Custom Ant Build File

You can use the standard exported build task and add additional build (sub)targets, or you can create a new ant file. To add a new task, you must use the <taskdef> element:

<taskdef name="myTask" classname="myTask" classpath="AllMyClass.jar"/>

Use the classpath attribute to specify the physical location of the JAR file as shown above, or you can specify the location when you change the project properties to use the custom build file as is described next.

You can also create a custom build process for an individual project within your application. Again, you should begin by exporting the standard build file and modifying that file.

To Export the Standard Project Build File

  1. Open the target application in WebLogic Workshop.
  2. From the Tools menu, select Project properties, then the target project name.
  3. In the Project Properties dialog, from the left-side navigation panel, select the Build node.
  4. In the section labeled Build Type, click the Export to Ant file button.
  5. An Ant file named exported_build.xml is generated and placed in the project's root directory, e.g., BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebServicesexported_build.xml.

To Use the Project Build File

  1. Choose Tools-->Project Properties--><projectname> to display the Project Properties dialog.
  2. In the left-hand pane, select Build.
  3. In the Ant Settings area, click Browse, navigate to the new build file and click Open.
  4. If your build file contains a new task definition without a classpath attribute, click Add JAR to specify the location of the Ant task. Navigate and select the file, then click Select JAR.
  5. In the Build Type area, select Use Ant Build.
  6. From the Build Target drop-down list, select the build target.
  7. Click OK.
The Ant window will now appear in WebLogic Workshop, listing the various targets. From this window you can run a target by double-clicking it.

 




How Do I: Call wlwBuild.cmd from an Ant build.xml file?


The following topic explains how to create an Ant task that calls the command line tool wlwBuild.cmd. wlwBuild.cmd is used to create application-level EAR files or project-level JAR files for deployment to a production server.

To create an Ant build.xml file, you can either auto-generate a build.xml file or you can write the file by hand.

To auto-generate an Ant build.xml file for the application

  1. Open the target application in WebLogic Workshop.
  2. From the Tools menu, select Application properties.
  3. In the Application Properties dialog, from the left-side navigation panel, select the Build node.
  4. In the section labeled Export, click the Export to Ant file button.
  5. An Ant file named exported_build.xml is generated and placed in the application's root directory, e.g., BEA_HOME/weblogic81/samples/workshop/SamplesApp/exported_build.xml.
The generated Ant file contains two tasks by default: "build" and "clean". When calling the build file from the command line, use the -f flag to name the file exported_build.xml:
    C:\bea\weblogic81\samples\workshop\SamplesApp>ant -f exported_build.xml build

To build selected projects with the application, modify the <build> element within the exported_build.xml file. By adding the attribute project="Schemas", only the Schemas project will be build:

  <target name="build">
    <!-- Builds the full application creating an ear at the specified location.
         The server classpath parameter is used, but may be omitted if the server home directory
         configured in Workshop is accessible. -->
    <wlwBuild work="${app.dir}/${work.file}" serverclasspath="${server.classpath}">
       <build outputdir="${output.dir}" outputfilename="${output.file}" project="Schemas"/>
    </wlwBuild>
  </target>

See the documentation within the exported_build.xml file for more information about specifying output directories, output file names, etc.

You can also export an Ant build.xml file for building an individual project in much the same way as you do for the application.

To auto-generate an Ant build.xml file for a project

  1. Open the target application in WebLogic Workshop.
  2. From the Tools menu, select Project properties, then the target project name.
  3. In the Project Properties dialog, from the left-side navigation panel, select the Build node.
  4. In the section labeled Build Type, click the Export to Ant file button.
  5. An Ant file named exported_build.xml is generated and placed in the project's root directory,


Be the first one to comment on this page.




  Weblogic Tutorial eBooks

No eBooks on Weblogic could be found as of now.

 
 Weblogic Tutorial FAQs
More Links » »
 
 Weblogic Tutorial Interview Questions
More Links » »
 
 Weblogic Tutorial Articles

No Weblogic Articles could be found as of now.

 
 Weblogic Tutorial News

No News on Weblogic could be found as of now.

 
 Weblogic Tutorial Jobs

No Weblogic Articles could be found as of now.


Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previoushome Next

Keywords: Compile a Single Java File, WEBLOGIC, WebLogic, WebLogic tutorials, WebLogic tutorial pdf, history of WebLogic, How To Deploy An Application Using WebLogic , learn WebLogic

HTML Quizzes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML Quiz
XML Quizzes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizzes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizzes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizzes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizzes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building Quizzes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizzes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizzes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizzes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizzes
Oracle Quiz
MySQL Quiz
Operating System Quizzes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizzes
Testing Quiz
Firewalls Quiz
SAP Module Quizzes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizzes
Corba Quiz
Networking Quiz
Microsoft Office Quizzes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizzes
Financial Accounting Quiz
Managerial Accounting Quiz
Testimonials | Contact Us | Link to Us | Site Map
Copyright ? 2008. Academic Tutorials.com. All rights reserved Privacy Policies | About Us
Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Jobs Assist | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Webhosting in India | Dedicated Server in India | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Tests World | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World | Important Websites
Copyright ? 2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved.