Blog

Category Filtering: 'Java'

Remove Filter


Netbeans on MAC, cvs over ssh connection problems

Posted by Luis Majano
Mar 23, 2006 00:00:00 UTC
I need help trying to make netbeans 5.0 connect to my CVS repository via SSH. I have created my ssh keygen pairs on my laptop and on the server, so when I go into the terminal and type:

ssh -l luis www.domain.com

I get logged in directly without any challenge. My key pairs work. I then go to Netbeans to the CVS module and click checkout.

I fill out the EXT part of the repository and for ssh connection I choose external shell and type:

ssh -l luis www.domain.com

Then click on next and it says "Checking network connection...."

It stays there forever.....

I am not behind a firewall or proxy. So I have no clue whatsoever, what wuold be wrong. Under Eclipse, cvs just connects fine!! So its not my connection.

Please help!!! Netbeans is my IDE of choice for JAVA development, but I need to start verisoning using CVS and I cannot make this work. Thanks

Oracle's SQL Developer, Better than Toad

Posted by Luis Majano
Mar 21, 2006 00:00:00 UTC
Finally Oracle came up with their own graphical tool for creating and browsing database objects. This is the perfect companion to Oracle XE. The look and feel is great and the responsiveness of the application is amazing. It has all the tools that I need as an Oracle developer to finally develop on any platform. Yep, totally JAVA!!! This is amazing!! The tool has SQL worksheets, SQL formatting, PL/SQL snippets, a great help system, a great PL/SQL editor, which will keep beign improved on. Overall, the application is great, and best of all, I can finally run this on my Mac and get rid of my DB PC. Ohh, and did I mention that it is also free!! Thank you Oracle!!

Oracle SQL Developer is a new, free graphical tool that enhances productivity and simplifies database development tasks. With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, as well as create and save your own.

SQL Developer can connect to any Oracle Database version 9.2.0.1 and later. We support SQL Developer running on Windows, Linux and Mac OSX.

Link:

http://www.oracle.com/technology/products/database/sql_developer/index.html

Anyways, here are some good screenshots for you:

Java's gettickcount(), How to get the current time in milliseconds

Posted by Luis Majano
Nov 07, 2005 00:00:00 UTC
Coldfusion has a great function called "gettickcount()" which basically gives you the current time in milliseconds. This is a great function to time code. Look at the example below:

<cfset stime = getTickCount()>

<!--- All my code to time here --->

<cfloop from="1" to="100" index="i">

<cfoutput>testing #i#</cfoutput>

<!--- Make a call here --->

</cfloop>

<cfset totalTime = getTickCount() - stime>

<cfoutput>The total time of execution for the code was: #totalTime#</cfoutput>

This utility is great. The question is, how do I do this in Java?? Well very simple, we use the System class. The following is a simple snippet of how to time in java.

double stime = System.currentTimeMillis();

//My Code Here


for(int i=0;i< 1000; i++){

System.out.println(i);

}

double TotalTime = System.currentTimeMillis() - stime;

//Display Total Time


System.out.println("Total Time of Execution: " + TotalTime + "ms.");

There you go!! Now you can time your java code.

Coldfusion-Java Snippet: Get your Operating System's File Separator.

Posted by Luis Majano
Sep 27, 2005 00:00:00 UTC
Every wonder a nice, quick and easy way of getting your Operating System's file separator character??

Well, I have several times. Thanks to our collaborator Ariel Gonzalez, and his java expertise. We take a look at the java.lang.System class and its getProperty() Method.

There are several useful properties that you can get from this class, some of them are listed below:

Coldfusion Snippet: Make a sleep timer using Java

Posted by Luis Majano
Sep 13, 2005 00:00:00 UTC
This snippet utilizes the power of java to create an execution sleep timer. There are various applications for this snippet, but the purpose of the snippet is to provide you with a mechanism of making the coldfusion thread sleep for a period of time. Please be careful when setting the timer variable since it might just lock the execution thread.

I have also included a copy-paste snippet of my actual CFC function.

The snippet is actually very simple:

<cfset thread = CreateObject("java", "java.lang.Thread")>

<cfset thread.sleep(arguments.milliseconds)>

The ultimate database query Tool, Aqua Data Studio

Posted by Luis Majano
Sep 07, 2005 00:00:00 UTC
I have been recently introduced to this great database utility tool, Aqua Data Studio

It is an incredible database tool, you can connecto to Oracle, MySQL, MS Sql, DB2, or an JDBC complaint database. It has an incredible Procedure Editor, Query Analyzer, Schema Browser, and best of all, written in JAVA.

The GUI is great and provides great graphical browsing of any database. I truly love this utility.

You can download it from here. Please check it out.

Refreshing Coldfusion Web Service Stubs

Posted by Luis Majano
Sep 06, 2005 00:00:00 UTC
Coldfusion introduced the use of web services in coldfusion MX and what a great feature. However, there are some intricacies on this feature. Web Service stubs, stubs are created by Java in order to define the signature of a web service. This holds the request and response headers, the arguments and their data types. So if a change in signature occurs, the stubs need to be refreshed or recreated. You can either do this programmatically or manually.

Most of the time the programatic approach will work, but sometimes these little bastards persist. So you have to follow a procedure and clean them out. Below you will find the programmatic way first:

<cfobject type="JAVA"

action="Create"

name="factory"

class="coldfusion.server.ServiceFactory">


<cfset RpcService = factory.XmlRpcService>


<cfset RpcService.refreshWebService("http://testwebsite/webservice/myservice.cfc?wsdl")>

Coldfusion Snippet: Get your local server hostname

Posted by Luis Majano
Sep 06, 2005 00:00:00 UTC
This is a pretty useful snippet for a clustered environment. It is a simple java snippet to get your local server host name. Please remember that if your servers are Unix based, this values are retrieved from the /etc/hosts file.

<cfset inet = CreateObject("java", "java.net.InetAddress")>

<cfset inet = inet.getLocalHost()>

<cfoutput>#inet.getHostName()#</cfoutput>

Site Updates

Archives

Entries Search