Posts

Creating Custom Code Panels using InstallAnywhere

Image
In this write-up lets look at the way to create a Custom Choose File Panel using InstallAnywhere(IA) tool. IA is a multi-platform software tool for creating customized installers.There are many documents available on IA that gives us a clear picture of IA and its features. This write-up assumes that the reader of this blog is aware of the basic features available in IA and has a licensed InstallAnywhere enterprise Edition and not InstallAnywhere standard edition.In this blog I am adding a small piece of code that tells us how to develop custom panels. In the Advanced Designer we can add a file chooser by using "Panel: Choose File" action. The code below produces the same output as IA's Choose File action minus 'Restore Default File'. To write a custom code panel ,it is necessary to write a class that extends CustomCodePanel class and override a couple of methods present in it. Here is the custom code that demonstrates a custom choose file panel. packag...

Get JBoss Version using Java Code

The following are the things we will be looking into now. a) How to get the JBOSS version from JBOSS zip file using java code? b) How to get the JBoss version from JBoss folder using java code? c) How to get the manifest details of a jar file that is present inside a Zip file? The actual version of JBoss can be determined by using the run.jar file present inside the bin folder of JBoss. It is not that difficult to get the manifest details of any jar file present either inside a folder or in a zip file[If you think it is difficult, don't worry,very soon we will make it easy for you] We are here trying to get the manifest details of the run.jar file, which answers all the questions we have posted above. The first method "getJbossVersion(String sourcefile)" in the code snippet below not only tells us how to get the Version of JBoss, but also tells us how to get the contents of MANIFEST.MF file that is present inside a jar file which in turn is again present insi...

Connecting to SQL Server 2000 and SQL Server 2005 DB using JAVA

After 'Connecting to Multiple DBs using torque',now lets get Connected to Sql Server db. Why always connecting to DB? Won't we have any other better topics than this. We do, but you will probably have to wait for that. There is a reason why this topic is been chosen.Though connecting to MS SQL Server-2000 and SQL server2005 sounds same , but its not. And I even wont say that there are huge changes that we need to do for this. There are few things that we definitely need to be aware of before connecting to either of these DBs. a) We need three jar files to connect to Sql Server 2000.If I say 3 jars in this blog, then they are msutil.jar,mssqlserver.jar,msbase.jar. If we Use these three jar files, then the driver that we need to use is "com.microsoft.jdbc.sqlserver.SQLServerDriver" b) Instead of using the 3 jars, we can use only one jar, sqljdbc.jar , to connect to SQL server 2000 DB. Now we need to use "com.microsoft.sqlserver.jdbc.SQLServerDriver...

Connecting to multiple Databases using Torque

To begin with, let me say that ,  “Torque”  is an Object Relational Mapping(ORM) Tool for Java. I have some expertise working with Torque when compared to iBatis and  Hibernate, so  I thought of sharing one of my experiences that I came across when I WAS using Torque[yes, that’s right I am not using Torque anymore]. The requirement here was to connect to two databases, fetch data from one database and insert it into another.  Fetching and inserting into Databases is a very basic thing that I would like not to discuss here (at least in this blog). However, before we Fetch or Insert, there are few more operations that we need to perform, and one of those is “Establishing a Connection with the database”. This write-up with a small example data explains us the concept of connecting to multiple DBs using the ‘Torque’ ORM tool. torque.properties file appears to be like this ##  Oracle DB Properties torque.database=default torque.database.default.adapter=oracle...