Thursday, December 18, 2014
Creating Jar file from the command line
The Java Development Kit includes a command-line program named jar that can be used to create jar files. If all your classes are in the default package (like most of the examples in this book), then the jar command is easy to use. To create a non-executable jar file on the command line, change to the directory that contains the class files that you want to include in the jar. Then give the command
jar cf JarFileName.jar *.class
jar file with class that has a main method:
Main-Class: ClassName
where ClassName should be replaced by the name of the class that contains the main() routine.
jar cmf ManifestFileName JarFileName.jar *.class
to create the jar file. (The jar command is capable of performing a variety of different operations. The first parameter to the command, such as "cf" or "cmf", tells it which operation to perform.)
By the way, if you have successfully created an executable jar file, you can run it on the command line using the command "java -jar". For example:
java -jar JarFileName.jar
Saturday, December 13, 2014
UNIX command - How can I extract a range of lines from a text file on unix?
sed -n 1,3000p filename > newfile
SQL Forcing the current identity value to a new value
USE AdventureWorks2012;
GO
DBCC CHECKIDENT ('Person.AddressType', RESEED, 10);
GO
http://msdn.microsoft.com/en-ca/library/ms176057.aspx
Thursday, December 11, 2014
Installing Incredible PBX for CentOS 6.5 or 7
Installing Incredible PBX for CentOS 6.5 or 7
cd /root
wget http://incrediblepbx.com/incrediblepbx11.4.centos.tar.gz
tar zxvf incrediblepbx*
./IncrediblePBX*
Reset the FreePBX Administration Interface Password (http://localhost/admin)
/root/admin-pw-change
Subscribe to:
Posts (Atom)