Tom Studer's Home Page
[ start | index | login ]
start > Java Stuff

Java Stuff

Created by tom. Last edited by tom, 3 years and 274 days ago. Viewed 1,048 times. #9
[diff] [history] [edit] [rdf]
labels
attachments

Web Performance Reports

java.util.Date Gotchas

...and more by Rodey Green on Dates:

Jar Dependencies Analyzer

A Great Free Java Profiler

Running it: Make sure libjmp.dll is on your library path or java process home directory (note: Windows doesn't support LD_LIBRARY_PATH - it simply uses PATH). Then start up your VM like:

java -Xrunjmp my.fine.java.Program

LaunchAnywhere Error "Can't launch executable"

This can happen if LaunchAnywhere selects an incompatible JRE or JDK on your hard-drive to run its installer. This was the case on my machine with IBM RAD (Rational Application Developer installed).

To solve the problem, insert the path to a "neutral" Java home "bin" directory in front of your PATH environment variable. I.e. simply install a JRE or JDK from the Java home page and insert the path to the 'bin' directory of that installation at the beginning of your user PATH environment variable.

By the way, you can launch a diagnostic console window for LaunchAnywhere by pressing the left control key during LaunchAnywhere start-up.

Sharing Java objects between applet class loader instances

This is not easily possible. Refer to the following links for more information:

However, the page Sharing Java objects between class loader instances presents a solution.

Self-Signed Java Applets

Generate a new keystore "testkey.keystore" as follows:

keytool -genkey -keyalg RSA -sigalg MD5withRSA -keystore
    testkey.keystore -alias testkey -validity 1460

Using this command, the keytool will generate a new keypair and create a self signed certificate for its public key. To create the certificate, the keytool will prompt for the necessary bits of X.509 information.

To sign the applet, use code similar to this (this code snipped was copied out of an Ant script):

<exec executable="${env.JAVA_HOME}/bin/jarsigner.exe">
    <arg value="-keystore"/>
    <arg value="testkey.keystore"/>
    <arg value="-storepass"/>
    <arg value="changeit"/>
    <arg value="-signedjar"/>
    <arg value="output.jar"/>
    <arg value="input.jar"/>
    <arg value="testkey"/>
</exec>

In order to run an applet signed with this key, the generated certificate may have to be imported into the Java plugin. For this, the certificate must be exported and stored in a file (e.g. 'testkey.cer'). The command line used to do this is:

keytool -export -alias testkey -file testkey.cer -keystore
    testkey.keystore

The default keystore password is 'changeit'

Please login to post a comment.
mouse_cartoon



< May 2012 >
SunMonTueWedThuFriSat
12345
6789101112
13141516171819
20212223242526
2728293031

snipsnap-help | More Help

Powered by SnipSnap 1.0b2-uttoxeter

Describe here what your SnipSnap is about!

Configure this box!

  1. Login in
  2. Click here: snipsnap-portlet-2
  3. Edit this box
snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt