Sunday, April 25, 2010

Why Is Greek Yogurt The Healthiest Yogurt

Getting Started with Java Web Start Java

Some time ago I had to learn to use this definition of the Java platform to develop a small Swing application that would run via Java Web Start from a link in a Web application. To use Java Web Start is required above all make various settings, no programming.

To do this I followed these simple steps.

Steps to enable running from a web application JavaWebStart

1. Package the application
The first thing we do is package your application into a JAR file . In addition, to run our application from an application of JavaWebStart we digitally sign the JAR but this will be explained later. To package your application use the command line tool for Java. But in any case, you can use any tool available in our IDE, if one is available.
 
\u0026lt;MIAPLICACION_DIR>. \u0026lt;nombre-archivo-jar> Jar-cf. Jar \u0026lt;clase-java1>. \u0026lt;clase-java2> Class ;. \u0026lt;clase-javaN> class. class


2. Digital signature
We have almost finished our JAR, now we just signed. This digital signature is important since all applications run within a sandbox , a client security space in which to run the application. The steps are as follows.

a) Generate Keystore: From command line go to the directory bin of our installation of Java (JAVA_HOME ).
 
\u0026lt;JAVA_HOME> \\ bin> keytool-genkey-alias test-RSA-keystore keyalg test.jks

Then the file will be generated test.jks in the bin directory .

b)
The following will sign the JAR tool keytool available IUI IUI 2.4.1 keytool

With these steps we will have signed a packaged application that can run on the client. For more information about digital signing of listen to the podcast Javahispano not. 080 - Cryptography and Digital Signature .

3. Configuration file Java Web Start
Now create the configuration file of our application Java Web Start in your text editor of choice. The configuration file have the name we want and with the extension. jnlp ( holaMundo.jnlp ). You can find more information on how to create and more configuration options on the following link JNLP File Syntax.
 
\u0026lt;? Xml version = "1.0" encoding = "UTF-8"?>
\u0026lt;jnlp spec = "1.0 +" codebase =
"http://localhost:8080/ micontextoweb / javaws "
href =" TheTime.jnlp "
>
\u0026lt;! - Overview of our application ->
\u0026lt;information & # 62;
Hello \u0026lt;title> World \u0026lt;/ title>
\u0026lt;vendor> Jorge Ruiz Aquino \u0026lt;/ vendor>
\u0026lt;homepage href="/micontextoweb" />
\u0026lt; ; description> Sample file \u0026lt;/ description>
\u0026lt;/ information>
\u0026lt;offline-allowed/>
\u0026lt;! - Establishes permits for the application in the sandbox ->
\u0026lt;security>
\u0026lt;all-permissions/>
\u0026lt;/ security>
\u0026lt;! -
are listed the resources needed to implement the application,
as the required minimum version of Java, the location of the JAR of our APPLICATION & # 243, n,
addition to the external libraries to be used.
->
\u0026lt;resources>
\u0026lt;j2se version="1.5+" />
\u0026lt;jar href = "http://localhost:8080/ micontextoweb / javaws / AplicacionFirmada.jar "/>
\u0026lt;/ resources>
\u0026lt;! - Set the name of the class containing the method main () ->
\u0026lt;application-desc main-class="ClaseMain" />
\u0026lt;/ jnlp>

permits in our previous settings are needed, along with digital signature that we have added the JAR in the previous step.

Now we have our file AplicacionFirmada.jar and our own JavaWebStart holaMundo.jnlp , will these files and necessary libraries where appropriate within our Web server. In my case, it is on my Web server Apache Tomcat / micontextoweb / javaws / , as configured in the file. Jnlp, in paragraph .

4. JNLP support in the Web server
The following will ensure that the Web server supports files of type JNLP, which is the extension of the Java Web Start. To this should enable support the MIME type in the server configuration, for example, the Tomcat Web server can be enabled in the configuration file / conf / web. xml by adding a new mapping for the MIME type. By default Tomcat already has it enabled.
 
\u0026lt;mime-mapping>
\u0026lt;extension> jnlp \u0026lt;/ extension>
\u0026lt;mime-type> application/x-java- jnlp-file \u0026lt;/ mime-type>
\u0026lt;/ mime-mapping>


5. JNLP support in the Web browser

Later in our web application add a piece of Javascript code to verify that your browser supports the MIME type. Although now most browsers support this kind of files.
 
mimetypeCheck function ()
{/ / First, determine if
Webstart is available if (navigator.mimeTypes ['application / x-java-jnlp-file']) {
navigator.mimeTypes plugin = ['application / x-java-jnlp-file' ];

} else {document.write ("no association
jnlp file");}

/ / Next, check for Appropriate
family version for (var i = 0; i < navigator.mimeTypes.length; i++) {
plugin = navigator.mimeTypes [i] ;

}}
mimetypeCheck ();


6. Link to Web Start Java Web application
Finally, add a link on our Web application to download the JNLP application.
 
\u0026lt;a href="http://localhost:8080/micontextoweb/javaws/archivo.jnlp"> Download JNLP \u0026lt;/ a>



We are now ready to start Web server and test the execution of our first application Java Web Start.


luck with your first cup of Java Web Start.

Friday, April 23, 2010

How To Write A Reference Letter For Cousin

automotive social ideology

An interesting article that was published in the magazine Letras Libres in December last year that talks about how the cities have been dehumanized because of the car, and although their creation and use should not be demonized overuse This is leading to cities without much future.
A good read to reflect a while. Check it out here.

Wednesday, April 21, 2010

Poem For Forgiveness Near Friend

The thing is not to fall


few days ago a friend who has little to have started in this "bike pa 'everywhere," he told me of his second fall on the bike. The first was a collision with a car door after giving the Cerron suddenly opened the door, he could not be more to the left because he saw more cars coming, the fall left him pain in his left hand and a knock in the leg and the second occurred when cars stopped wanting to go beyond, passed between the first and second lane and right there a taxi passenger got out, returned to hit the door, but not landed on the floor, if you hit your hand right against the door when I had it said something that undoubtedly is the main thing for safe travel by bicycle through the city, said: "I am very distracted, I think if I put more attention, these things I would" in effect, is essential to be ever vigilant to keep your bicycle safety.

Sometimes I stop thinking and watch her circle in the city, in seconds watch a lot of things, intuit and anticipate others.

Pedestrians on a street corner, two things: either make you want to cross or want to stop a taxi or micro, because you have to dodge attention. Cars parked on the right, it's best to give sufficient space to avoid a door that opens, but if you can, observe and anticipate: if they are heads in the car (look for the medallion back or left mirror) insurance is a passenger can open the door, a parked car with the skulls on, two things: secure parking and just open the doors or is booting up and clog the road.
Take a full lane to avoid getting too close to exceeding the car, but although the rail regulation is yours, you are constantly turning over your left shoulder and see who is coming, it seems an uncommon practice but motorists that if they use your turn, that indicates that they want to turn and take your lane (the right) stay calm, make eye contact to tell them it's your space. When driving your view is always in front, looking for obstacles, potholes, bumps, sewers, waste-to avoid them you have two options: on the right or left, you decide, for it must be observed, this is another reason to travel the center of the lane sewers are always right.

Play is important to stay alert, sounds like patrols or ambulance siren, a horn-to-be annoying, a barking dog, the engine of a motorcycle or any vehicle, suggest things to you must anticipate, practice turn on your shoulders to look behind you, once this practice will be spontaneous.
thing I have learned during the time I walked in "the bike pa" everywhere "is that security makes oneself, the thing is not falling, and although I do not know a single rider is not fallen at least once, the important thing is to learn from the falls to NOT re-visit the ground.

Friday, April 16, 2010

Remove Hdd From Recorder

Dreams on wheels


Dreams on wheels (something) is the title of an exhibition that runs until April 26 at the Faculty of Architecture of the UNAM-CU. Do not let go, and if you want a little more information see here .

Thursday, April 8, 2010

Blueprints Of Battery Powered Blanket

And the books are for ... We already have winners

As promised, I had taken to post the winners of the books "The bike and its owner" - again thanks to Rogelio Garza for this gift, "the winners are and Paola Karina Tavera Amaro who correctly answered each question.



The answers are these:
1. What is the title of the song Bat for lashes posted a few months ago on this blog? What's a Girl To Do
2. What city are our friends the Macletas? The Macletas are Santiago de Chile.
3. How many urban cyclists link displayed on the blog? 11 links.
4. Mention the name of one of the cultural tours that have been posted here. Cultural cycle route across the ancient lands of the Benito Juárez.
5. When and where was the last congress of urban cycling in which we had opportunity to participate? It was in Guadalajara, 18, 19 and September 20



Well girls, congratulations, hope you enjoy reading and that the happiest keep rolling!


See you next time.