1)All java & oracle related Sample
classpaths and compilation, run commonds and java related class paths:
Core java path:
==============
set
path=C:\Program Files\Java\jdk1.6.0\bin;
Core java
classpath1:
=====================
set
classpath=%classpath%;
Core java
classpath2:
======================
set
classpath=C:\Program Files\Java\jdk1.6.0\jre\lib\rt.jar;C:\Program
Files\Java\jdk1.6.0\lib\tools.jar;
Java normal
programs compilation & run:
====================================
javac
<filename>.java
java
<filename>
Java package
programs compilation &run:
======================================
javac
<filename>.java
&
javac -d .
<filename>.java
java
<filename> & java <packagename>/<classname>
Java applet
programs compilation &run:
=====================================
javac
<filename>.java
appletviewer
<filename>.java
For servlet
classpath:
======================
set
classpath=C:\Program Files\Apache Software Foundation\Tomcat
6.0\lib\servlet-api.jar;%classpath%;
For jsp
classpath:
==================
set
classpath=C:\Program Files\Apache Software Foundation\Tomcat
6.0\lib\jsp-api.jar;%classpath%;
For jstl classpath:
==================
set
classpath=E:\JSTL\jakarta-taglibs-standard-1.1.2\lib\jstl.jar;E:\JSTL\jakarta-taglibs-standard-1.1.2\lib\standard.jar;%classpath%;
For struts
classpath:
=====================
E:\struts-2.0.11\lib\xwork-2.0.4.jar;E:\struts-2.0.11\lib\struts2-core-2.0.11.jar;
E:\struts-1.3.8\lib\struts-extras-1.3.8.jar;E:\struts-1.3.8\lib\struts-core-1.3.8.jar;
For hibernate
classpath:
========================
set
classpath=H:\java_work\hibernate-3.2\lib\antlr-2.7.6.jar;H:\java_work\hibernate-3.2\lib\dom4j-1.6.1.jar;
H:\java_work\hibernate-3.2\lib\log4j-1.2.11.jar;H:\java_work\hibernate-3.2\lib\jta.jar;H:\java_work\hibernate-3.2\lib\commons-logging-1.0.4.jar;
H:\java_work\hibernate-3.2\lib\commons-collections-2.1.1.jar;H:\java_work\hibernate-3.2\lib\cglib-2.1.3.jar;H:\java_work\hibernate-3.2\lib\asm.jar;
H:\java_work\hibernate-3.2\lib\ant-antlr-1.6.5.jar;H:\java_work\hibernate-3.2\hibernate3.jar;
For spring classpath:
=====================
set classpath=E:\spring.jar;E:\commons-logging.jar;%classpath%;
For jboss
classpath:
==================
set
classpath=E:\jboss-5.1.0.GA\client\jbossall-client.jar;.
Glashfish path:
==================
path=C:\Sun\AppServer\bin;%path%;
set
classpath=C:\Sun\AppServer\lib\appserv-rt.jar;C:\Sun\AppServer\lib\javaee.jar;%classpath%;
For Weblogic
server classpath:
==========================
set
classpath=C:\bea\wlserver_10.3\server\lib\weblogic.jar;%classpath%;
For log4j tool
classpath:
====================
set
classpath=C:\bea\wlserver_10.3\common\lib\log4j.jar;
Oracle ojdbc14
classpath:
=======================
set
classpath=C:\oracle\product\10.1.0\db_1\jdbc\lib;C:\oracle\product\10.1.0\db_1\jdbc\lib\ojdbc14.jar;%classpath%;
Oracle path:
============
set
path=E:\oracle\product\10.1.0\db_2\bin;E:\oracle\product\10.1.0\db_2\jre\1.4.2\bin\client;
E:\oracle\product\10.1.0\db_2\jre\1.4.2\bin;%SystemRoot%;%SystemRoot%\System32\Wbem;
Mysql path:
============
set
path=C:\Program Files\MySQL\MySQL Server 5.0\bin;
2)Create jar,war,rar files by using
commond prompt:
jar cf <any
name>.jar .
jar cf <any
name>.war .
jar cf <any
name>.rar .
3)Create Sample.Bat file(Hint:Bat
file java file we have to create same directory):
javac swamy.java
java swamy
pause
|
4)Java JDBC Drivers based on orcle
database:
Type 1:
========
sun.jdbc.odbc.JdbcOdbcDriver [SJOJ]
"jdbc:odbc:oradsn","scott","tiger" [JOOST]
Type-2:
=======
orcle.jdbc.OracleDriver [OJO]
"jdbc:oracle:oci:@<sid>","scott","tiger" [JOOST]
Type-3:
=======
ids.sql.IDSDriver
[ISI]
jdbc:ids://localhost:12/conn?dsn='oradsn1'&user='scott'&pwd='tiger' [JILCDUP]
Type 4:
=========
"oracle.jdbc.OracleDriver"
[OJO]
"jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger" [JOTL1OST]
5)copy & paste
scott user data into Oracle XE(expression edition):
================================================================
step-1:
=======
open
oracle(i.e.,where is it instal)--->search for scott.sql & open with
notepad--->copy the data
step-2:
=======
> now, open the SqlCommandPrompt.
> connected to the database
administrator user and password
> then,connected to the scott user
6) In your Github fork, you need to keep your master branch clean, by clean I mean without any changes, like that you can create at any time a branch from your master. Each time that you want to commit a bug or a feature, you need to create a branch for it, which will be a copy of your master branch.
When you do a pull request on a branch, you can continue to work on another branch and make another pull request on this other branch.
Before creating a new branch, pull the changes from upstream. Your master needs to be up to date.
$ git pull
Create the branch on your local machine and switch in this branch :
$ git checkout -b [name_of_your_new_branch]
Push the branch on github :
$ git push origin [name_of_your_new_branch]
When you want to commit something in your branch, be sure to be in your branch. Add -u parameter to set-upstream.
You can see all the branches created by using :
$ git branch -a
Which will show :
* approval_messages
master
master_clean
Add a new remote for your branch :
$ git remote add [name_of_your_remote] [name_of_your_new_branch]
Push changes from your commit into your branch :
$ git push [name_of_your_new_remote] [url]
Update your branch when the original branch from official repository has been updated :
$ git fetch [name_of_your_remote]
Then you need to apply to merge changes if your branch is derivated from develop you need to do :
$ git merge [name_of_your_remote]/develop
Delete a branch on your local filesystem :
$ git branch -d [name_of_your_new_branch]
To force the deletion of local branch on your filesystem :
$ git branch -D [name_of_your_new_branch]
Delete the branch on github :
$ git push origin :[name_of_your_new_branch]
The only difference is the: to say delete, you can do it too by using GitHub interface to remove branch: https://help.github.com/articles/deleting-unused-branches.
If you want to change default branch, it's so easy with GitHub, in your fork go into Admin and in the drop-down list default branch choose what you want.
If you want create a new branch:
$ git branch <name_of_your_new_branch>