Sunday, April 17, 2011

Java Simple Interactive Browser



Summary :

Simple interactive Java browser is basic simple browser show how we can use voice commands to navigate in web sites and use hyperlinks as a voice commands.

Project URL:

http://sourceforge.net/projects/simpleijb/

Features:

* Simple interactive Java browser is basic simple browser show how we can use voice commands to navigate in web sites and use hyperlinks as a voice commands.
* Uses Sphinx-4 is a state-of-the-art speech recognition system written entirely in the JavaTM programming language
* Uses FreeTTS library for text to speech.
* Uses Liquid Look and Feel (Swing)
* Simple and do not support Java Script.

How to run:

1) After download the program, extract the zip file and place voice folder in the "C:\"

2) Run the Browser.bat file.

In case you are using another operating system or you need to specify another location , download the source code (Netbeans project) and change the path in the source code plus change it in the myconfig.xml file.

Open any web site, click on extract icon to extract all hyperlinks into voice commands and enjoy using them (only 1st letter of the command is identified if it is not URL)
Some links will not be identified in the voice recognition dictionary (the main bad thing plus java script not supported)

Future Enhancements:

Use Java Browser Open Libraries to fix the Java Script issue.

Sunday, April 3, 2011

Profiling Weblogic Server Application using Netbeans Profiler

The idea behind this profiling is to have a better idea about the application performance using the Netbeans profiler that depends on the JVM capabilities..



We will do the following steps:

1) Open setDomainEnv.cmd and ensure the Sun JDK is already defined or add the definition yourself:

SET SUN_JAVA_HOME=C:\bea\jdk150_11

The profiler will not work unless it is a Sun JDK.
Mostly WebLogic come with 2 JDK one is Rocket and the other is Sun JDK.

2) In startWebLogic.cmd Switch web logic to use Sun JDK by the following line:

SET JAVA_VENDOR=Sun SET JAVA_HOME=C:\bea\jdk150_11

3) In startWebLogic.cmd point to profiler profilerinterface.dll & its library by the following line

SET JAVA_OPTIONS=-agentpath:"C:\Program Files\NetBeans 6.8\profiler3\lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\Program Files\NetBeans 6.8\profiler3\lib\"",5140 %JAVA_OPTIONS%

Now open Netbeans and do the following:

4) Go to the menu -->Tools & Java Platforms

Add Weblogic sun JDK to the current platoforms (the same you used in Weblogic configuration)

5) Go to the menu -->Profiler-->Advanced Command-->Run Profiler Calibratation
Select Weblgoic JDK

This will let Netbeans calibrate the JDK.

6) Go to the menu -->Profile --> Attach profiler

- Add filter: Inclusive (osa.ora.*) as filtration for the needed package classes.

- Select localhost , Weblogic 9 (works fine with Weblogic 10 as well).


Now the final steps, must do them in sync with each other:

7) Start the Weblogic server using startWeblogic.cmd, it will stop waiting for the profiler.

8) In Netbeans click on Attach the profiler.


Now enjoy using the Netbeans profiling tools for your application..

You can check the methods duration and number of invocation , the thread count, heap size , Garbage collection statistics ,etc..you need to check..

You can select what you want during configuring the profiler or later on by changing them.

This tutorial is done in WinXP and using Netbeans 6.8 and Weblogic 10.