Sunday, January 19, 2014
jar_java class file convert into java source file using software
This work note :
Before edit file (filename.class) convert into filename.java using java decompiler software..
1. At first install this software(java decompiler:SetupDJ312RN.exe)
2.open this software
3.open java class file
4.copy this code
5.paste another note pad and save it according its class name that means classname.java
jar Create :
*************
http://viralpatel.net/blogs/ create-jar-file-in-java- eclipse/
http://viralpatel.net/blogs/ convert-jar-to-exe-executable- jar-file-to-exe-converting/
http://docs.oracle.com/javase/ tutorial/deployment/jar/build. html
http://www.mkyong.com/java/ how-to-make-an-executable-jar- file/
Before edit file (filename.class) convert into filename.java using java decompiler software..
1. At first install this software(java decompiler:SetupDJ312RN.exe)
2.open this software
3.open java class file
4.copy this code
5.paste another note pad and save it according its class name that means classname.java
jar Create :
*************
http://viralpatel.net/blogs/
http://viralpatel.net/blogs/
http://docs.oracle.com/javase/
http://www.mkyong.com/java/
iReport(jasper) Instruction -1
3.7.6: iReport instruction(when software open then do it) or To Set the ORACLE
Driver to Connect the ORACLE database:
At first jar (ojdbc14.jar) put on desktop from anywhere then it will be call
from iReport software –> Tools –> options –> class path then click add jar button.
Sample (Help - Samples) run using by HSQLDB
1.7.0 version :
Report code apply in java class
public void showReport(String accID) throws JRException, ServletException, IOException{
Connection connection = null;
HttpServletResponse response=ServletActionContext.getResponse();
//HttpServletRequest request=ServletActionContext.getRequest();
String filename ="report2Appointment.jasper";//request.getParameter(“filename�);
String outputFileName ="report2Appointment";
//String reportType = request.getParameter("reportType");
String reportType ="pdf";
//String accID=request.getParameter("accNo");
Map parameters = new HashMap();
//All the parameter you want to pass to report write below way..
parameters.put("p_appoint_no", accID);
//parameters.put(“userFullName�, userFullName);
//DatabaseConnection db=new DatabaseConnection();
connection = dbc.connectDB();
ServletContext context = ServletActionContext.getServletContext();
String path = context.getRealPath("/");//.getContextPath();
JasperPrint jasperPrint = JasperFillManager.fillReport(path +"/Jasper"+ "/" +filename,parameters, connection);
System.out.println("Report Created…");
OutputStream ouputStream = response.getOutputStream();
JRExporter exporter = null;
if ("pdf".equalsIgnoreCase(reportType)) {
response.setContentType("application/pdf");
// If you want show the report in the browser then write “inline�
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
// If you want show the report out of the browser as a .pdf format then write “attachment�
//response.setHeader(“Content-disposition�, “attachment;filename=�+outputFileName+�.�+reportType);
exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("rtf".equalsIgnoreCase(reportType)) {
response.setContentType("application/rtf");
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
exporter = new JRRtfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("html".equalsIgnoreCase(reportType)) {
exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("xls".equalsIgnoreCase(reportType)) {
response.setContentType("application/xls");
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
exporter = new JRXlsExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("csv".equalsIgnoreCase(reportType)) {
response.setContentType("application/xls");
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
exporter = new JRCsvExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
}
try {
exporter.exportReport();
} catch (JRException e) {
throw new ServletException(e);
} finally {
if (ouputStream != null) {
try {
ouputStream.close();
} catch (IOException ex) {
}
}
}
}
**/ View report from project report jar will be store in the project library ( WEB-INF/lib/iReport.jar )
1.7.0 version :
Report code apply in java class
public void showReport(String accID) throws JRException, ServletException, IOException{
Connection connection = null;
HttpServletResponse response=ServletActionContext.getResponse();
//HttpServletRequest request=ServletActionContext.getRequest();
String filename ="report2Appointment.jasper";//request.getParameter(“filename�);
String outputFileName ="report2Appointment";
//String reportType = request.getParameter("reportType");
String reportType ="pdf";
//String accID=request.getParameter("accNo");
Map parameters = new HashMap();
//All the parameter you want to pass to report write below way..
parameters.put("p_appoint_no", accID);
//parameters.put(“userFullName�, userFullName);
//DatabaseConnection db=new DatabaseConnection();
connection = dbc.connectDB();
ServletContext context = ServletActionContext.getServletContext();
String path = context.getRealPath("/");//.getContextPath();
JasperPrint jasperPrint = JasperFillManager.fillReport(path +"/Jasper"+ "/" +filename,parameters, connection);
System.out.println("Report Created…");
OutputStream ouputStream = response.getOutputStream();
JRExporter exporter = null;
if ("pdf".equalsIgnoreCase(reportType)) {
response.setContentType("application/pdf");
// If you want show the report in the browser then write “inline�
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
// If you want show the report out of the browser as a .pdf format then write “attachment�
//response.setHeader(“Content-disposition�, “attachment;filename=�+outputFileName+�.�+reportType);
exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("rtf".equalsIgnoreCase(reportType)) {
response.setContentType("application/rtf");
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
exporter = new JRRtfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("html".equalsIgnoreCase(reportType)) {
exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("xls".equalsIgnoreCase(reportType)) {
response.setContentType("application/xls");
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
exporter = new JRXlsExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
} else if ("csv".equalsIgnoreCase(reportType)) {
response.setContentType("application/xls");
response.setHeader("Content-disposition", "inline;filename="+outputFileName+"."+reportType);
exporter = new JRCsvExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream);
}
try {
exporter.exportReport();
} catch (JRException e) {
throw new ServletException(e);
} finally {
if (ouputStream != null) {
try {
ouputStream.close();
} catch (IOException ex) {
}
}
}
}
**/ View report from project report jar will be store in the project library ( WEB-INF/lib/iReport.jar )
Java Imp URL
subject : java sms send
http://www.ipipi.com/help/send_text_message_using_java.htm
http://www.shikkhok.com/
http://www.java2s.com/
http://www.java.net
http://www.codemiles.com
Nice Link 1:
http://www.tutorialspoint.com
http://www.javatpoint.com
http://javaknowledge.info/
ER diagram :
http://www.studytonight.com/dbms/er-diagram
http://www.weberp4.com/
http://www.weberp4.com/industry-solutions/school-colleges/students-management.htm
Power point template Link :
http://www.free-power-point-templates.com/
Tag Library
http://grepcode.com/file/repo1.maven.org/maven2/javax.servlet/servlet-api/2.3/javax/servlet/jsp/tagext/TagSupport.java
Procedure
http://www.java2s.com/Code/Java/Database-SQL-JDBC/CallStoredProcedureInOracleAndPassInOutParameters.htm
http://www.ipipi.com/help/send_text_message_using_java.htm
http://www.shikkhok.com/
http://www.java2s.com/
http://www.java.net
http://www.codemiles.com
Nice Link 1:
http://www.tutorialspoint.com
http://www.javatpoint.com
http://javaknowledge.info/
ER diagram :
http://www.studytonight.com/dbms/er-diagram
http://www.weberp4.com/
http://www.weberp4.com/industry-solutions/school-colleges/students-management.htm
Power point template Link :
http://www.free-power-point-templates.com/
Tag Library
http://grepcode.com/file/repo1.maven.org/maven2/javax.servlet/servlet-api/2.3/javax/servlet/jsp/tagext/TagSupport.java
Procedure
http://www.java2s.com/Code/Java/Database-SQL-JDBC/CallStoredProcedureInOracleAndPassInOutParameters.htm
Oracle Info - 1 and Self note Script
Coloumn Index and Coloumn Level
Suppose Coloumn Index start by 1
Suppose Coloumn Level is NAME,DATE_BIRTH etc
*/ In Oracle Coloumn Level start from 1 and in java Coloumn Level start from 0 .
*/ http://md5decryption.com/
*******************************************************************
Search table name From Tables not too view (From Toad) :
*OPV_PAT%*
*******************************************************************
from java if value go(pass) database 2 rule :
1/ "+admission_no+" (If it is number that means private int admission_no)
2/ '"+admission_no+"' (If it is varchar that means private string admission_no)
*/ Java model class a Private int COUNTRY_ID means only indicate intiger vaue. (Here int is primitive type data type)
*/ Java model class a Private Intiger COUNTRY_ID means it indicates intiger or string value.
*******************************************************************
subject : oracle data type
http://docs.oracle.com/cd/B14117_01/server.101/b10759/sql_elements003.htm
subject : java sms send
http://www.ipipi.com/help/send_text_message_using_java.htm
<script language="javascript">
function getInputVal(td_id,numberId){
//alert(td_id);
alert("kk");
var name = td_id+numberId;
var valOne = document.getElementById(name).innerHTML;
//var valTwo = document.getElementById(numberId).innerHTML;
//var total = parseInt(valOne)+parseInt(valTwo);
alert(valOne);
}
</script>
concatanation : concatanation is add of two string result. So no need double cotation for string variable of name.
var valOne = document.getElementById(name).innerHTML
Not
var valOne = document.getElementById("sc").innerHTML;
*******************************************************************
Ques: What is sum and concatanation ?
sum : sum is add of two numeric value result.It is need for parseInt
*******************************************************************
<script language="javascript">
function getInputVal(td_id,numberId){
//alert(td_id);
alert("kk");
var sc = td_id+numberId;
var valOne = document.getElementById(sc).innerHTML;
//var valTwo = document.getElementById(numberId).innerHTML;
//var total = parseInt(valOne)+parseInt(valTwo);
alert(valOne);
}
</script>
*******************************************************************
*******************************************************************
Single cotation and double cotation And no cotation
=====================================================
<td onClick="getInputVal('record<%=i %>');"><a href="#" ><img src="images/editable.jpg" style="border:none;"/></a>
Direct value pass in function using by single or double cotation.such as-
<script language="javascript">
function getInputVal(td_id){
alert(td_id);
var val = document.getElementById(td_id).innerHTML;
alert(val);
//var val1 = document.getElementById("record1").innerHTML; and var val1 = document.getElementById('record1').innerHTML; same
alert(val1);
}
</script>
About no cotation
==================
value pass as parameter in function using by no cotation.such as-
<td onClick="getInputVal('record<%=i %>');"><a href="#" ><img src="images/editable.jpg" style="border:none;"/></a>
Direct value pass in function using by single or double cotation.such as-
<script language="javascript">
function getInputVal(td_id){
alert(td_id);
var val = document.getElementById(td_id).innerHTML;
alert(val);
}
</script>
*********************************************************
Suppose Coloumn Index start by 1
Suppose Coloumn Level is NAME,DATE_BIRTH etc
*/ In Oracle Coloumn Level start from 1 and in java Coloumn Level start from 0 .
*/ http://md5decryption.com/
*******************************************************************
Search table name From Tables not too view (From Toad) :
*OPV_PAT%*
*******************************************************************
from java if value go(pass) database 2 rule :
1/ "+admission_no+" (If it is number that means private int admission_no)
2/ '"+admission_no+"' (If it is varchar that means private string admission_no)
*/ Java model class a Private int COUNTRY_ID means only indicate intiger vaue. (Here int is primitive type data type)
*/ Java model class a Private Intiger COUNTRY_ID means it indicates intiger or string value.
*******************************************************************
subject : oracle data type
http://docs.oracle.com/cd/B14117_01/server.101/b10759/sql_elements003.htm
subject : java sms send
http://www.ipipi.com/help/send_text_message_using_java.htm
<script language="javascript">
function getInputVal(td_id,numberId){
//alert(td_id);
alert("kk");
var name = td_id+numberId;
var valOne = document.getElementById(name).innerHTML;
//var valTwo = document.getElementById(numberId).innerHTML;
//var total = parseInt(valOne)+parseInt(valTwo);
alert(valOne);
}
</script>
concatanation : concatanation is add of two string result. So no need double cotation for string variable of name.
var valOne = document.getElementById(name).innerHTML
Not
var valOne = document.getElementById("sc").innerHTML;
*******************************************************************
Ques: What is sum and concatanation ?
sum : sum is add of two numeric value result.It is need for parseInt
*******************************************************************
<script language="javascript">
function getInputVal(td_id,numberId){
//alert(td_id);
alert("kk");
var sc = td_id+numberId;
var valOne = document.getElementById(sc).innerHTML;
//var valTwo = document.getElementById(numberId).innerHTML;
//var total = parseInt(valOne)+parseInt(valTwo);
alert(valOne);
}
</script>
*******************************************************************
*******************************************************************
Single cotation and double cotation And no cotation
=====================================================
<td onClick="getInputVal('record<%=i %>');"><a href="#" ><img src="images/editable.jpg" style="border:none;"/></a>
Direct value pass in function using by single or double cotation.such as-
<script language="javascript">
function getInputVal(td_id){
alert(td_id);
var val = document.getElementById(td_id).innerHTML;
alert(val);
//var val1 = document.getElementById("record1").innerHTML; and var val1 = document.getElementById('record1').innerHTML; same
alert(val1);
}
</script>
About no cotation
==================
value pass as parameter in function using by no cotation.such as-
<td onClick="getInputVal('record<%=i %>');"><a href="#" ><img src="images/editable.jpg" style="border:none;"/></a>
Direct value pass in function using by single or double cotation.such as-
<script language="javascript">
function getInputVal(td_id){
alert(td_id);
var val = document.getElementById(td_id).innerHTML;
alert(val);
}
</script>
*********************************************************
java tutorial basic - 1
add some feature :
Java,
Java EE,
Java spring framework,
Design pattern,
SOA,
JPA,
Linux,
Maven,
Tomcat,
Spring security,
WebsSocket / server sent Event, Java Messaging,
Shell scripting,
Jboss,
Ontology and Matching Algorithms.
Wednesday, January 1, 2014
Subscribe to:
Posts (Atom)
