Wednesday, July 17, 2013

How to get rid of "The libs.CopyLibs.classpath property is not set up" ... error message in NetBeans

Recently I tried to build a Java project using ant command, I received the infamous CopyLibs BUILD-FAIL message.

 $ ant

/opt/tomcat-sbillah/webapps/graph2/nbproject/build-impl.xml:786: The libs.CopyLibs.classpath property is not set up.
This property must point to
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
of NetBeans IDE installation and is usually located at
/java/ant/extra folder.
Either open the project in the IDE and make sure CopyLibs library
exists or setup the property manually. For example like this:
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar



To fix this issue I used below steps.

  1. Find "private.properties" file from "nbproject/private/private.properties" location in your project folder.
  2. Comment (#) "user.properties.file" attribute in private.properties file. It is pointing to a local file location (This is the root cause)
  3. Find project.properties file from your source location. Add following attributes to the file.
 libs.CopyLibs.classpath=
 libs.CopyLibs.javadoc=
 libs.CopyLibs.maven-pom=
 libs.CopyLibs.src=


 4. Download "org-netbeans-modules-java-j2seproject-copylibstask.jar" file from www.java2s.com/Code/JarDownload/org-netbeans-modules-java/org-netbeans-modules-java-j2seproject-copylibstask.jar.zip
  
 5. Save this Jar file to a folder (extras). Set its path to "libs.CopyLibs.src" attribute.
ex:   
libs.CopyLibs.src=C:/Deployer/java/dist/svn/vcelerity81/12009939/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar

6. Done !!

Reference : 

http://sbillah.blogspot.sg/2013/03/how-to-get-rid-of-libscopylibsclasspath.html
 

Sunday, May 26, 2013

Working copy locked error in tortoise svn while committing

Right Click on folder(that has your svn files) -> TortoiseSVN -> CleanUp
This will surely solve your problem. I did this lots of time.. :)

Tuesday, March 6, 2012

php.exe is not recognized as an internal or external command

When you try to create a new yii web application then you need to add php.exe location to your system path.

On Windows XP goto


Control Panel > System > Advanced > Environment Variables > System Variables > Edit > Variable value

And at the end of the current contents add a semicolon followed by your path to php

Friday, March 2, 2012

Enabling oci8 in windows xp


  • You need to download the oracle instant client following the link below

    http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html and click the instant client package basic. Download it and after that you unzip it.
  • Then u put the path of that instant client in the Environment Variable
  • Uncomment
  • Uncomment the "extension=php_oci8.dll" in the php.ini file (To find your php.ini file you can run the phpinfo.php page)
  • then restart your pc. check the phpinfo.php
  • then you can see phpinfo page as above.
  • To enable pdo support to oracale database uncomment extension=php_pdo_oci.dll which is in PECL region

Sunday, May 29, 2011

Firefox 4 change: input type image only submits x and y, not name when clicked. Keyboard as before

Firefox 4.0 beta — as well as IE and Opera — do not send name/value for input type=”image”; only .x and .y coordinates are sent.

Note, this is when clicking the input image with a mouse. When navigating using keyboard, focusing on it, and pressing enter, then the name does get submitted.

If you need to use an image button as a submit button in a form then you have to pass a hidden value to process the form.

EX:





then in test.php page

isset($_post['passvalue'])

{

process the request

}



?>







Firefox 4 change: input type image only submits x and y, not name when clicked. Keyboard as before

Firefox 4.0 beta — as well as IE and Opera — do not send name/value for input type=”image”; only .x and .y coordinates are sent.

Note, this is when clicking the input image with a mouse. When navigating using keyboard, focusing on it, and pressing enter, then the name does get submitted.

If you need to use an image button as a submit button



Firefox 4 change: input type image only submits x and y, not name when clicked. Keyboard as before

Firefox 4.0 beta — as well as IE and Opera — do not send name/value for input type=”image”; only .x and .y coordinates are sent.

Note, this is when clicking the input image with a mouse. When navigating using keyboard, focusing on it, and pressing enter, then the name does get submitted.

If you need to use an image button as a submit button in a form then you have to pass hidden value



Sunday, May 15, 2011

How to set windows look and feel in JFrame GUI in java

public static void main(String[] args) {
try
{

UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
catch (Exception e) { }

new SwingApplication(); //Create and show the GUI.
}

Monday, May 2, 2011

Linux Commands

tar Commands

1. Creating an uncompressed tar achieve.

tar cvf filename.tar filename/foldername


In the above command:
  • c – create a new archive
  • v – verbosely list files which are processed.
  • f – following is the archive file name
ex:

tar cvf abc.tar myfile.txt
tar cvf pqr.tar myfolder

2.
Creating a tar gzipped archieve using option cvzf


To use gzip compression on the tar archive, use the z option as follows.

tar cvzf filename.tar.gz dirname/

tar cvzf filename.tar.gz filename

In the above command

  • c – create a new archive
  • v – verbosely list files which are processed.
  • f – following is the archive file name
  • z– filter the archive through gzip
ex:

tar cvzf filename.tar.gz filename.txt

3. Extracting (untar) a file using tar command

tar xvf filename.tar

In the above command

  • x – extract files from archive.
  • v – verbosely list files which are processed.
  • f – following is the archive file name

ex:

tar xvf filename.tar

4. Extracting a gziped tar achieve.

tar xvfz filename.tar.gz

In the above command
  • x – extract files from archive.
  • v – verbosely list files which are processed.
  • f – following is the archive file name
  • z- uncompressing a gzipped tar achieve.

tail Command

Example 1:

tail mytextfile.txt
-  The above command list the last 10 lines of the file "mytextfile.txt"

tail mytextfile.txt -n 100

- The above command list last 100 lines of the file "mytextfile.txt"

tail -f mytextfile.txt 
- The above command displays the last 10 lines and then update the file as new lines are being added
- This is a very useful command to watch log files in realtime

tail -f access.log | grep 127.0.0.2

- The above command can use to filter the output of the file

Monday, March 21, 2011

X startup failed in Fedora 10

When I install fedora 10 in my PC it does not show the X start up. It performs the text mode installation.

Cause:
* If the graphic card is not support or can not be auto detected the installer goes to the text mode.

Solution:
* You can try the xdriver=vesa to force graphical install using the VESA graphics driver.

* To do this you have to edit boot option.

*Press tab button and enter xdriver=vesa