Here is the reference javaworld.com/
My favorite commands are:
// listing all files
jar tvf "fileJAR/EAR"
//updating a file in a JAR/EAR file
jar uvf "fileJAR/EAR" path/to/file/to/update
//extracting a file from a JAR/EAR/WAR file
jar xvf "fileJAR/EAR" path/to/file/to/extract
My Tips and Tricks for C#, C, C++, MatLAB, Java, LaTeX, Python and more!
Sunday, February 15, 2015
Friday, January 23, 2015
MySQL: a short introductory guide
Here is the link.
It covers pretty much everything the MySQL-newbie might need... installation, most used commands and some very useful tips!
This is the link you are looking for, if your goal is to learn SQL and MySQL!
It covers pretty much everything the MySQL-newbie might need... installation, most used commands and some very useful tips!
This is the link you are looking for, if your goal is to learn SQL and MySQL!
Tuesday, January 13, 2015
How to fix the error "user" is not in the sudoers file. This incident will be reported."
In order not to have this message anymore, you need to had "user" to the sodoers file.
To solve this issue, you need to log in a terminal as root (command: su) and then type the command visudo.
In the file it appears, locate the line containing:
root ALL=(ALL) ALL
and right below, add the line:
"user" ALL=(ALL) ALL
Where, obviously, "user" is the name of the user you want to add.
Close the file (ESC :w and :q OR just give ESC :x)
No more incidents to be reported! :)
To solve this issue, you need to log in a terminal as root (command: su) and then type the command visudo.
In the file it appears, locate the line containing:
root ALL=(ALL) ALL
and right below, add the line:
"user" ALL=(ALL) ALL
Where, obviously, "user" is the name of the user you want to add.
Close the file (ESC :w and :q OR just give ESC :x)
No more incidents to be reported! :)
Monday, January 12, 2015
How to configure a static IP address for a CentOS Virtual Machine
How to configure a static IP address. Here you find the useful reference I found:
http://www.doublecloud.org/
http://www.doublecloud.org/
Friday, December 12, 2014
Incompatible magic value 1347093252 in class file
The error describes exactly which is problem: your class file does not start as all java class should, i.e. with 3405691582 (or in hexadecimal CAFEBABE). Instead, your class starts with 1347093252 (hexadecimal 504B0304) that, as indicated in the reference below, it the beginning of a zip/jar file.
How can it happen? Well in my case, I got this problem when I created a jar file to store some of my classes and I used the command:
jar cf my_package1.jar /path/to/classes/*
and clearly something went wrong.
How did I solve it? I slightly changed the command for the jar file in:
jar cf my_package1.jar /path/to/classes/*.class
And everything went OK.
Reference:
http://www.coderanch.com/t/411141/java/java/Imcompatible-Magic-Number
How can it happen? Well in my case, I got this problem when I created a jar file to store some of my classes and I used the command:
jar cf my_package1.jar /path/to/classes/*
and clearly something went wrong.
How did I solve it? I slightly changed the command for the jar file in:
jar cf my_package1.jar /path/to/classes/*.class
And everything went OK.
Reference:
http://www.coderanch.com/t/411141/java/java/Imcompatible-Magic-Number
Labels:
1347093252,
corrupt,
error,
jar,
jar file,
JAVA,
magic class file,
zip
Wednesday, December 3, 2014
How to run 32 bit applications on a 64bit linux machine
Got the nasty "bad ELF interpreter" error message trying to run a 32bit command line application?
You probably miss some shared library!
How to solve it?
Run a check on the missing shared libraries using the command "ldd" (print shared library dependencies)
ldd <path_to_your_32bit_application>
then install the missing libraries. For example on CentOS/RedHat
yum provides <path_to_the_missing_library>
Done!
Example:
sudo yum provides /lib/libpthread.so.0
References:
http://stackoverflow.com/questions/8328250/centos-64-bit-bad-elf-interpreter
You probably miss some shared library!
How to solve it?
Run a check on the missing shared libraries using the command "ldd" (print shared library dependencies)
ldd <path_to_your_32bit_application>
then install the missing libraries. For example on CentOS/RedHat
yum provides <path_to_the_missing_library>
Done!
Example:
sudo yum provides /lib/libpthread.so.0
References:
http://stackoverflow.com/questions/8328250/centos-64-bit-bad-elf-interpreter
Sunday, November 23, 2014
Simple tips to make firefox opening new tabs quicker
Type in URL bar:
about:config
Click "I'll be careful, I promise" and then, look for:
Other tips:
Go Firefox! Go!
about:config
Click "I'll be careful, I promise" and then, look for:
- network.http.pipelining
- network.http.pipelining.maxrequests
Other tips:
- Clear cache and history
- Disable add-ons you are not using.
Go Firefox! Go!
Subscribe to:
Posts (Atom)