Visualizzazione post con etichetta JDK. Mostra tutti i post
Visualizzazione post con etichetta JDK. Mostra tutti i post

mercoledì 20 aprile 2011

DataNucleus AccessPlatform 3.0





The DataNucleus AccessPlatform provides persistence and retrieval of data to a range of datastores using a range of APIs, with a range of query languages. Software for persistence typically only caters for one type of datastore, or one API. DataNucleus is unique in that it supports all standardised persistence APIs for a very wide range of datastores . DataNucleus is the only persistence software certified JDO compliant. DataNucleus is continually innovating and pushing capabilities forward, as well as continually pushing forward the JDO spec. DataNucleus gives you the power to swap persistence API, and datastore when you want to. In fact it allows JPA mapping data to be used with JDO persistence, and vice versa - another unique feature of DataNucleus. Time to take advantage of this power ...


DataNucleus - Tutorial for JDO
An application can be JDO-enabled via many routes depending on the development process of the project in question. For example the project could use Eclipse as the IDE for developing classes. In that case the project would typically use the DataNucleus Eclipse plugin. Alternatively the project could use Ant, Maven or some other build tool. In this case this tutorial should be used as a guiding way for using DataNucleus in the application. The JDO process is quite straightforward.
  1. Step 0 : Download DataNucleus AccessPlatform
  2. Step 1 : Design your domain/model classes as you would do normally
  3. Step 2 : Define their persistence definition using Meta-Data.
  4. Step 3 : Compile your classes, and instrument them (using the DataNucleus enhancer).
  5. Step 4 : Generate the database tables where your classes are to be persisted.
  6. Step 5 : Write your code to persist your objects within the DAO layer.
  7. Step 6 : Run your application.
  8. Step 7 : Things to add.
The tutorial guides you through this. You can obtain the code referenced in this tutorial from SourceForge (one of the files entitled "datanucleus-samples-tutorial-*").

Parancoe 3 web framework

Parancoe is a project aiming to simplify the release of web applications promoting the convention over configuration philosophy and the DRY principle. This project is promoted by the JUG Padova, and everybody can partecipate.
Parancoe is a Java meta-framework aggregating in an useful way Hibernate/JPA, Spring 2, Spring MVC and, for the AJAX support, DWR.
Parancoe purpose is to give to developers a set of libraries ready to build standard web applications (which in most cases are just crud applications) without worrying of long and harmful configurations files. Parancoe will be composed of a full MVC stack.
Parancoe is open source and is released under the Apache License, Version 2.0.
Are you interested in the parancoe word meaning? A “parancoa” is a scaffolding in the dialect of the Venice (Italy) area.

Lot of time I don’t post something…
But the development of Parancoe is not death. I’m working at the next major release: Parancoe 3.0!
Some of the changes:
  • The persistence (generic DAOs) has its own independent project now: Lambico. It’s more evolved and robust.
  • Parancoe now uses Spring 3.0, with it latest evolution and improvements.
  • The suggested style for developing the controllers is the REST one.
  • The validation is JSR 303 – Bean Validation (according to Spring MVC 3.0).
  • We have a new subproject called Parancoe – Validation, for introducing some useful validator, ready for use. (what about a “new password” validator?)
You can start trying Parancoe 3 using the snapshots: Parancoe artifacts are already in our Maven snapshot repository.
For starting a new project based on Parancoe 3, use the “Parancoe Advanced Archetype”, typing the following command:

mvn -DarchetypeGroupId=org.parancoe \
    -DarchetypeArtifactId=parancoe-advancedarchetype \
    -DarchetypeVersion=3.0-SNAPSHOT \
    -DarchetypeRepository=https://oss.sonatype.org/content/repositories/snapshots \
    -Darchetype.repository=https://oss.sonatype.org/content/repositories/snapshots \
    -Darchetype.interactive=false \
    -DgroupId=org.myorg \
    -DartifactId=myapp \
    -Dpackage=org.myorg.padt \
    -Dversion=1.0-SNAPSHOT \
    --batch-mode \
    --update-snapshots \
    org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate


project page: http://www.parancoe.org/

giovedì 10 febbraio 2011

How to download and install prebuilt OpenJDK packages by apt-get

Ubuntu logo

On Ubuntu 10.04, do one of the following:
  • On the Gnome desktop (Ubuntu):
    • In the main desktop menu, choose "Add/Remove ..."
    • In the "Show" toggle box, select "All Open Source Applications"
    • Search for "OpenJDK"
    • Select the "OpenJDK Java Runtime" (openjdk-6-jre)
    • Confirm the installation of community maintained software
    • Press the "Apply Changes" button
  • On the KDE desktop (Kubuntu):
    • In the main desktop menu, choose "Add/Remove Programs"
    • In the "Adept Installer" search for "OpenJDK"
    • Select the "OpenJDK Java Runtime" (openjdk-6-jre)
    • Press the "Apply Changes" button
  • On the command line, type:
    $ sudo apt-get install openjdk-6-jre
The openjdk-6-jre package contains just the Java Runtime Environment. If you want to develop Java programs then install the openjdk-6-jdk package.
For more information on how to install Java on Ubuntu, including on versions prior to 8.04, please see the Ubuntu Java Community page.

Fedora logo

On Fedora 9 the OpenJDK 6 runtime and development packages are installed by default during any large-media install, such as from the Fedora 9 DVD.
If installing from a live image, such as a live CD or USB flash drive, add the OpenJDK 6 runtime after the install:
  • To install with the graphical package manager, follow Applications > Add/Remove Software and use search to find the package(s) to install.
  • To install from the command line:
    $ su -c "yum install java-1.6.0-openjdk"
    This package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.6.0-openjdk-devel package. You can also install all the OpenJDK 6 packages, including the API documentation, by using the wildcard java-1.6.0-openjdk*.
On Fedora 8 the OpenJDK 7 runtime and development packages are installed by default during any large-media install, such as from the Fedora 8 DVD, under the name IcedTea. If installing from a live image then follow the above instructions but replace 1.6.0-openjdk with 1.7.0-icedtea.

Red Hat Enterprise Linux, CentOS, etc.

The OpenJDK 6 packages are also available in EPEL, a community-run project which makes Fedora packages available to users of Red Hat Enterprise Linux 5, CentOS 5, and other RHEL 5 derivatives.
First install the package that enables the EPEL repository:
$ su -c "rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm"
Then add the OpenJDK 6 runtime, or the development package and related packages if so desired, by following the instructions above for Fedora.

openSUSE logo

On openSUSE 11.1, do one of the following:
  • On the Gnome desktop:
    • In the "Computer" desktop menu, choose "Install Software"
    • Search for "OpenJDK" in the software installer application
    • Select the java-1.6.0-openjdk package
    • Press the "Apply" button
  • On the command line, type:
    $ sudo zypper install java-1.6.0-openjdk
The java-1.6.0-openjdk package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.6.0-openjdk-devel package.

Debian logo

On Debian GNU/Linux 5.0 (lenny) , do one of the following:
  • On the Gnome desktop (Debian):
    • In the "System" desktop menu, choose submenu "Administration"
    • In the submenu, choose "Add/Remove Applications"
    • In the "Show" toggle box, select "All Open Source Applications"
    • Search for "OpenJDK"
    • Select the "OpenJDK Java Runtime" (openjdk-6-jre)
    • Confirm the installation of community maintained software
    • Press the "Apply Changes" button
  • On the command line, type:
    $ sudo apt-get install openjdk-6-jre
The openjdk-6-jre package contains just the Java Runtime Environment. If you want to develop Java programs then install the openjdk-6-jdk package.

Innovate on OpenSolaris

We are working on putting everything in place to start providing OpenJDK 7 builds in OpenSolaris package repositories beginning in July 2009.
If you want to have a head start, you can build OpenJDK 7 on OpenSolaris yourself now by following the instructions. In brief:
  • On the command line, type:
    $ pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2
    to install the build dependencies.
  • Set a handful of environment variables:
    $ export LANG=C PATH="/opt/SunStudioExpress/bin:${PATH}" ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_DEVTOOLS_PATH=/usr/bin ALT_CUPS_HEADERS_PATH=/usr/include/
  • Kick off the build:
    $ gmake
  • When the build finishes, the binaries will be in the
    build/solaris-i586/j2sdk-image
    subdirectory.

martedì 11 gennaio 2011

Install JDK 6 update 23 in Ubuntu 10.10




JDK (Java Development Kit) is a software that provides development tools for creating Java programs.

Installation


First we must download the package from the java website, select your platform, in our case Linux:



http://www.oracle.com/technetwork/java/javase/downloads/index.html

Here we go down the file "jdk-6u21-linux-i586.bin" to any folder, then leave where appropriate.

Now we have to give execute permissions:
sudo chmod +x jdk-6u23-linux-i586.bin

and install:
sudo ./jdk-6u23-linux-i586.bin

Now move the generated folder to a more appropriate directory:
sudo mv jdk1.6.0_23/ /usr/local

We set the new Java as one of the alternatives "java"
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/jdk1.6.0_23/bin/java" 1

Now we set the "new alternative" as real Java. This step makes the sun is the version used by default:
sudo update-alternatives --set java /usr/local/jdk1.6.0_23/bin/java

Now we do the same steps above for javac:

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/jdk1.6.0_23/bin/javac" 1
sudo update-alternatives --set javac /usr/local/jdk1.6.0_23/bin/javac



Now verify that everything works properly. Open the console and type:
java -version

If all is well, you should return the following:

java version "1.6.0_23"
Java (TM) SE Runtime Environment (build 1.6.0_23-B06)
Java HotSpot (TM) Client VM (build 17.0-b16, mixed mode, sharing)


For javac:
javac -version

If all is well back:
javac 1.6.0_23

If you have other installations of java / javac can be configured using the following commands:
sudo update-alternatives --config java
sudo update-alternatives --config javac


Also if you want setear JRE_HOME JAVA_HOME or as environment variables, we must go to:
sudo gedit /etc/environment

Here we record the routes where we have installed Java, in our case is as follows:
JAVA_HOME = "/usr/local/jdk1.6.0_23/bin/" (add)
JRE_HOME = "/usr/local/jdk1.6.0_23/jre" (add)
PATH ="...(other routes):$JAVA_HOME:$JRE_HOME (edit)


With this we finish the installation.