OpenDDS Java Binding Developer Guide Example error

Following the OpenDDS Developer’s Guide РChapter 11 I ran into an error like this:

Using …/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg
CIAO_ROOT was used in the configuration file, but was not defined.
Generating ‘gnuace’ output using default input
Skipping Foo (Foo.mpc), it requires java.
Generation Time: 1s

I have solved following the suggestion from a post on sourceforge tracker that I report here just for an easy access on that info. (Personally I have user -features java=1 as parameter of the mwc.pl script)

Welcome to OpenDDS!

In $DDS_ROOT/java/INSTALL, in Step 4 (Configure TAO), there are
instructions for enabling Java support by setting java=1 in the appropriate
file(s) (depending upon your platform) or passing -features java=1 on the
mwc.pl command line when you build ACE+TAO. The recommended approach is to
set java=1 in $ACE_ROOT/bin/MakeProjectCreator/config/default.features so
it is always set whenever you run mwc.pl.

You can also enable Java support for OpenDDS when you install ACE+TAO with
the $DDS_ROOT/configure script with ./configure –java from $DDS_ROOT. See
$DDS_ROOT/INSTALL for more information on using the configure script and
run ./configure –help to see all the options.

(Note: If you are on Windows using Visual Studio, the command to run the
configure script is just configure from a Visual Studio command prompt.)

HTH,
Steve

“Job found still running after platform shutdown eclipse” Problem with my Eclipse Juno

English: Total Solar eclipse 1999 in France. *...

(Photo credit: Wikipedia)

Hi, it is some times that I don’t write new articles on my blog, this time I would like to report how I solved this problem on my running Eclipse workspace.

First of all I have deleted (as I have read in the past in many other sites ) the .snap files inside the org.eclipse.core.resources folder with a command like:

rm YOUR_WORKSPACE_FOLDER/.metadata/.plugins/org.eclipse.core.resources/.snap

but for me this has not been sufficient, so trying with every folder inside the .plugins I discovered that I simply need to delete (or rename) the folder org.eclipse.e4.workbench:

rm -rf YOUR_WORKSPACE_FOLDER/.metadata/.plugins/org.eclipse.e4.workbench

Starting again Eclipse this time worked and now I can again use it with all my previous configuration.
I have not googled to know what is the purpose of the data inside the org.eclipse.e4.workbench and also I have to say that of course I have tested only on my Eclipse Juno instance

Have a nice day

Eclipse Access Restriction Error

Clickide 3

Image via Wikipedia

When in Eclipse you have an error like: “Access restriction: The constructor AppletAudioClip(URL) is not accessible due to restriction on required library C:\Programmi\Java\jdk1.6.0_24\jre\lib\rt.jar” You simply need to follow these steps to avoid compilation error:

Click on the Properties of your project Go to Java Compiler–>Errors/Warnings search for “Deprecated and Restricted API” and set to warning “Forbidden reference (access rules)” item.

That’s it.

Enable keywords substitution using Eclipse and Subversion (SVN)

Vista-eclipse

Image via Wikipedia

To enable keywords substitution as I usually have with the CVS, you just need to enable a svn properties on the Eclipse project configuration.

These are the steps to activate the svn-keyword-substitution feature in Eclipse:

  1. Install Subclipse into your Eclipse application
  2. Right-mouse-click on your project folder, and choose Team => Set Property from the popup menu (note to click on the root of the project folder)
  3. Enter the property name:  svn:keywords
  4. Enter the text property:  Author Date Id Revision HeadURL
  5. Click the  Set property recursively checkbox
  6. OK

Note that on large project files this action could take also several minutes. Now keywords are substituted when you commit a file in SVN, just like they were by using CVS.  Also, you can shorten Revision to Rev and HeadURL to URL.

So if you now have a file like:

// File name: $HeadURL$
// Revision: $Revison$
// Last modified: $Date$
// Last modified by: $Author$
//
//  file description

commiting it to the SVN will result into:

//  File name: afile.php
//  Revision: 1
//  Last modified: 2010-11-4 14:53
//  Last modified by: quonn
//
//  file description

 

Java – Single Application Instance

Duke, the Java Mascot, in the waving pose. Duk...

Image via Wikipedia

If you want to prevent the user from running multiple copies of your Java application here are two approaches I could suggest you:
1) You can verify if a busy file exist. If one exists, abort. If not create one.  The process to test and create the file can be developed in the script file that triggers the application or in the application itself.  When the app exists it deletes the busy marker file. The main problem with this simple approach is if your app crashes, it won’t delete the busy file. You have to manually delete it before you can run the app again.

2) Another approach is to have your application open a ServerSocket on a particular port number. The OS will prevent other processes from opening a ServerSocket that uses the same port. If you start the application and are unable to open your ServerSocket (i.e. if you get an “address already in use” exception) assume that the application is already running. In that case, you can use a Socket to connect to the running application and pass it whatever commands you like, or just abort.

Source: http://mindprod.com/jgloss/singleinstance.html

Installing Java on CentOS 5.5

Trying to use the standard java distribution from Oracle (….Sun was acquired from Oracle…) could be a little confusing so I just link another blog were you find described the adopted solution for CentOS 5.2 but that is applyable also to CentOS 5.5.

http://chrisschuld.com/2008/10/installing-sun-java-on-centos-5-2/