java class tutorial

Java Clazz Utils 1.2.2
Java Clazz Utils offers you a full-featured and crossplatform Java bytecode viewer and decompiler which can support latest Java versions (from 1.4 till 1.6). more>>
Java Clazz Utils 1.2.2 offers you a full-featured and crossplatform Java bytecode viewer and decompiler which can support latest Java versions (from 1.4 till 1.6). It can be used both as command line tool and user application with Swing interface. It contains InfoJ, Decompiler and jclazz-GUI.
Major Features:
- InfoJ can be used to generate information about Java class. The output includes all possible data that can be extracted from class file: fields, methods, attributes, access flags, signatures, debug information, opcodes etc.
- Decompiler can be used to reproduce Java source code from compiled Java class file. It uses debug information to produce Java code which is nearly the same as original source file. Nevertheless, there are several restrictions and Java code constructions that prevent decompiler from producing the same code as original and even correct Java code. You can find out more about these cases below on this page.
- jclazz-GUI is user-friendly interface for quick start and easy to use.
Enhancements:
- Save of decompiled file writes to predefined file name - Fixed
- Condition structures "condition ? operation1 : operation2" were decompiled incorrectly - Fixed
- URL to bug reporting page is corrected
Runtime Java Class Editor 1.0
Runtime Java Class Editor is a tool for editing loaded (running) Java classes and much more. more>>
This helps you to test your application in an interactive way; altering running programs helping a trial and error approach to programming; testing code and saving it when its correct. Long running algorithms, such as simulations, can also easily be refined without the need for restarts or lose of data.
RJCE can be used to write a program from within itself ensuring high coupling between testing and development, with no delay before the outcome of any alterations.
RJCE allows scripts to run from within your application, allowing users to configure or extend an application dynamically, bypassing normal language access rules controlled by public, private and protected. This can be done by easily instatiating an instance of CodeEditorFrame from the rom.gui package.
RJCE permits faster development of applications by allowing easy migration from scripts to Java programs.
Java Tools 0.30
Java Tools is a lightweight integrated development environment for creating, compiling, and executing Java applications. more>>
Java Tools includes point and click access to the Java files, commands, and documents. It also includes a built-in text editor and user interface for the Java debugger.
It is intended for the new Java user who needs help getting started. Its also for the more experienced Java user who wants easy access to the Java commands and a text editor.
Main features:
- GUI with built-in help and small footprint.
- Point and click access to all files (Java, manifest, HTML, image and sound) and directories (package).
- Point and click access to all commands for compiling (javac), archiving (jar), documenting (javadoc), executing (java), debugging (jdb) and disassembling (javap).
- Point and click access to all documents (Java API Specification, Java Tools and Utilities, Java Features and Java Tutorial).
- Point and click creation of all files (Java, manifest and HTML) and directories (package).
- Point and click installation of distribution archive files (Java document, Java source code, Java Tutorial and Sun Tools).
- Automatic determination of class file dependencies for archiving (jar) and documenting (javadoc) Java files.
- Checking for unused, redundant and missing imports.
- Logging of all commands invoked by GUI.
- Code metrics for Java files.
- Built-in text editor (see Edit for details).
- Built-in user interface for the Java debugger with command-line editing and history.
- Self-installing executable (Java archive file).
- Comprehensive installation and user documentation for Java and Java Tools.
Task::Catalyst::Tutorial 0.03
Task::Catalyst::Tutorial is a Perl module that installs everything you need to learn Catalyst. more>>
SYNOPSIS
Installs the example "MyApp" described in Catalyst::Manual::Tutorial, and all its dependencies.
XML::Smart::Tutorial 1.6.9
XML::Smart::Tutorial is a Perl module with tutorials and examples for XML::Smart. more>>
SYNOPSIS
This document is a tutorial for XML::Smart and shows some examples of usual things.
asm2class 0.1.2
asm2class is an assembly Java to class file compiler. more>>
Asm2class is release under the terms of the GPL License. The current version of asm2class (0.1.2) is a beta version and allow generating class file from java assembly file that contains class definition, field definition, method definition and constructor definition.
This release support also abstract class, abstract method and native method definition.
Asm2class know more thatn 90% of the java assembly language. Asm2class can do dead code detection, uninitialized register detection.
Java for C++ 0.4
Java for C++ is a tool to generate C++-wrapper-classes for existing Java-classes. more>>
The implementation of the wrapper classes uses JNI (Java Native Interface) to call the "real" Java classes.
The C++-API to use these wrapper classes is very close to the API of the original Java classes. So developers of C++-software can use Java-classes as if they have been implemented in C++.
Enhancements:
- A problem where null values for method arguments, method return values, or field values caused some generated code to crash was fixed.
- Updating is strongly encouraged.
Java Platform Invoke API Demo (Linux) 2.01.04
Java Platform Invoke API (Demo version) for Linux, i386. Enables Java code to call native functions implemented in shared libraries like in Microsoft .NET Framework. Written for JSE 1.5.x and later. more>>
Java Platform Invoke API Demo (Linux) - Java Platform Invoke API (Demo version) for Linux/Unix, i386.
Enables Java code to call native functions implemented in shared link libraries like in Microsoft .NET Framework. Written for JSE 1.5.x and later.
Java platform invoke an API that enables Java code to call native functions implemented in shared libraries, such as those in the Linux API. It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed. This API supports implicit marshaling that makes Java coding with native functions very simple.
To consume a shared library functions you need
1.Identify functions in shared librarys.
Minimally, you must specify the name of the function and name of the the shared library that contains it.
2.Create a class to hold shared library functions.
You can use an existing class, create an individual class for each native function, or create one class that contains a set of related native functions. This class should extend CNativeLibrary. Use the annotation ImportLibrary to bind your class to the native library.
3.Create prototypes in Java code.
Write prototype of a native function as a method with signature that corresponds to the native function using data type map agreement. To identify the native function use the annotation Function. Mark the method with the native modifier.
4.Call a shared library function.
Call the method on your Java class as you would any other Java method. As parameters can be passed structures and implemented in Java callback functions.
Enhancements:
Version 2.01.04
System Requirements:JSE 1.5.x<<less
jclassinfo 0.19.1
jclassinfo is an information extractor for Java bytecode. more>>
Main features:
Class Information
- Java VM version required,
- super class,
- interfaces implemented. --general-info
- Constant pool dump --constant-pool
- Methods --methods
- Fields --fields
- Class attributes --attributes
Dependency Information
- Packages required --packages
- Classes required --classes
- Methods required --methods-ref
Options affecting verbosity
- Disassemble code --disasm
- Print limits and exception table for methods --verbose
- Print debugging information --method-debug-info
- Change visibility --visibility=< public | package | protected | private | synthetic >
Java Binary Enhancement Tool 3 R1
Java Binary Enhancement Tool is a Java assembler, dissassembler, and binary editor. more>>
JBET was developed as part of the DARPA Self-Protecting Mobile Agents project under the OASIS and Active Networks programs (contract number N66001-00-C-8602) in order to study automated software obfuscation.
The Java language was chosen for this project because of the (relative) ease of constructing binary editing tools provided by the large amount of type information present in the class files. Our two reports, the Obfuscation Techniques Evaluation Report, and the Obfuscation Report, are available from the download area. The obfuscation tool developed is not part of this release.
JBET was also used in the DARPA/AFRL Survivable Server project (contract number F30602-00-C-0183) to add additional security checks to the Java Standard Library. (The Java SecurityManager API does not support many desirable security checks, such as continued authorization of file accesses after opening.)
JBET was used to replace the native method references in the Java standard library with stubs that call a pluggable security policy. This tool, called Jpolicy, is also available for download at this website. Jpolicy is very incomplete at this time, but may be interesting to those working in Java security or changing the standard library themselves.
The internal representation of Java class files used by JBET is intented to make it easy for programmers to write Java binary code transforms. Each element of Java class files has a corresponding internal data structure: ClassInfo for entire classes, MethodInfo for methods, FieldInfo for fields, Snippit for code blocks, and Instruction for individual instructions. Snippit and Instruction understand Java opcode syntax and semantics, allowing automated creation of valid Java programs. A Java-compatible class verifier is also included.
Some code transforms are difficult to program directly by manipulating Java instructions. For those transforms, a directed acyclic graph (DAG) representation of code is available. In the DAG representation, each basic block has a corresponding DAG, with a set of input and output nodes. Edges in the graph connect "producer" nodes (such as constants, or the result of calculations) to "user" nodes (such as method calls or other calculations). Methods are divided into basic blocks and control flow is stored at the basic block level (possible because Java has only fixed jump targets)
JBET requires a Java 1.4 virtual machine to run, although it can operate on class files from earlier Java versions. The packaging and build environment supplied supports Linux and Windows with Cygwin; however, the build process is simple and could be performed manually on other platforms. Perl is required for regression testing.
Jpolicy requires a Java 1.4 virtual machine to build, either Linux or Windows NT/XP with Cygwin. gcc is required for building on Windows (supplied with Cygwin). The runtime system can be either Java 1.3 or 1.4 (with Suns JVM only), running on Linux or Windows NT/XP. Windows 9x and Windows 2000 may work as well, but have not been tested.
Installation
1. Install jdk 1.4.1.
2. Set CLASSPATH to jdk1.4.1/jre/lib/rt.jar
3. cd src; make
4. If that didnt work, examine the makefile. java or javac may not be in the path.
5. To build a jar file that can be used with "java -jar jbet.jar", run "make jar".
6. If you have perl installed, run the tests with "make test".
Optionally, run "make regen; make test".
Make a symbolic link from jbet3/bin/jbet to somewhere in your path.
Usage
JBET uses the JNI format for class names, and JNI type and method descriptors. For a summary of this syntax, use jbet help syntax. Suns JVM specification may also be helpful.
To look at a class disassembly, use jbet print. Try disassembling a class you have source for, and was built with debug info (-g): jbet -P < classpath > print < classname >. Suns JVM specification has an instruction reference.
Domino Javadoc Generator 0.4
Domino Javadoc Generator project aims to create a documentation to the Lotus Notes API for Java. more>>
The Lotus Notes API is delivered as a Java archive together with the original documentation in the native format of a Domino database with the IBM Domino Designer. The documentation can be read only in the Lotus Notes. Java-oriented tools cannot use it to display a description of a Java class, to browse classes and their methods or to offer an automatic code insertion based on a Java object and its class.
The goal is to create a Javadoc documentation together with a pseudo-source code of the Lotus Notes API. The documentation can be viewed, indexed and integrated to IDEs. The pseudo-source code can be integrated to IDEs to support object browsing and automatic source code insertion.
C# Java Virtual Machine 1.0.1
C# Java Virtual Machine is a tiny implementation of the Java VM, including simple native classes. more>>
Enhancements:
- The DbConnection class, which provides a connection to MS SQL or PostgreSQL using ADO.NET, was added.
- The Syst.MachineName method, which returns the machine name, was added.
- String.startsWith and String.endsWith functions were added.
- Some comments for VM.cs were written.
Java::JCR::Workspace 0.08
Java::JCR::Workspace is a Perl wrapper for javax.jcr.Workspace. more>>
This is an automatically generated package wrapping javax.jcr.Workspace with a nice Perlish API.
For full documentation of what this class does, see the Java API documentation: http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Workspace.html
The deviations from the API documentation include the following:
- You will need to use Perl, intead of Java, to make any use of this API. (Duh.)
The package to use is Java::JCR::Workspace, rather than javax.jcr.Workspace.
- All method names have been changed from Java-style camelCase() to Perl-style lower_case().
Thus, if the function were named getName() in the Java API, it will be named get_name() in this API. As another example, nextEventListener() in the Java API will be next_event_listener() in this API.
- Handle exceptions just like typical Perl. Java::JCR::Exception takes care of making sure that works as expected.
Sun Java Platform Enterprise Edition 5 Update 2
Sun Java Platform Enterprise Edition is the industry standard for developing portable, robust Java applications. more>>
Building on the solid foundation of Java SE, Java EE provides Web services, component model, management, and communications APIs that make it the industry standard for implementing enterprise class service-oriented architecture (SOA) and Web 2.0 applications.
DateTime::Format::Builder::Tutorial 0.7807
DateTime::Format::Builder::Tutorial is a quick class on using Builder. more>>
CREATING A CLASS
As most people who are writing modules know, you start a package with a package declaration and some indication of module version:
package DateTime::Format::ICal;
our $VERSION = 0.04;
After that, you call Builder with some options. There are only a few (detailed later). Right now, were only interested in parsers.
use DateTime::Format::Builder
(
parsers => {
...
}
);
The parsers option takes a reference to a hash of method names and specifications:
parsers => {
parse_datetime => ... ,
parse_datetime_with_timezone => ... ,
...
}
Builder will create methods in your class, each method being a parser that follows the given specifications. It is strongly recommended that one method is called parse_datetime, be it a Builder created method or one of your own.
In addition to creating any of the parser methods it also creates a new() method that can instantiate (or clone) objects of this class. This behaviour can be modified with the constructor option, but we dont need to know that yet.
Each value corresponding to a method name in the parsers list is either a single specification, or a list of specifications. Well start with the simple case.
parse_briefdate => {
params => [ qw( year month day ) ],
regex => qr/^(dddd)(dd)(dd)$/,
},
This will result in a method named parse_briefdate which will take strings in the form 20040716 and return DateTime objects representing that date. A user of the class might write:
use DateTime::Format::ICal;
my $date = "19790716";
my $dt = DateTime::Format::ICal->parse_briefdate( $date );
print "My birth month is ", $dt->month_name, "n";
The regex is applied to the input string, and if it matches, then $1, $2, ... are mapped to the params given and handed to DateTime->new(). Essentially:
my $rv = DateTime->new( year => $1, month => $2, day => $3 );
There are more complicated things one can do within a single specification, but well cover those later.
Often, youll want a method to be able to take one string, and run it against multiple parser specifications. It would be very irritating if the user had to work out what format the datetime string was in and then which method was most appropriate.
So, Builder lets you specify multiple specifications:
parse_datetime => [
{
params => [ qw( year month day hour minute second ) ],
regex => qr/^(dddd)(dd)(dd)T(dd)(dd)(dd)$/,
},
{
params => [ qw( year month day hour minute ) ],
regex => qr/^(dddd)(dd)(dd)T(dd)(dd)$/,
},
{
params => [ qw( year month day hour ) ],
regex => qr/^(dddd)(dd)(dd)T(dd)$/,
},
{
params => [ qw( year month day ) ],
regex => qr/^(dddd)(dd)(dd)$/,
},
],
Its an arrayref of specifications. A parser will be created that will try each of these specifications sequentially, in the order you specified.