Monday, January 25, 2010

iText tutorial: Merge & Split PDF files using iText JAR

In previous article about Generating PDF files using iText JAR, Kiran Hegde had described a nice and basic way of generating PDF files in Java using iTest JAR. It is a great starter tutorial for those who wants to start working with iText.
In one of the requirement, I had to merge two or more PDF files and generate a single PDF file out of it. I thought of implementing the functionality from scratch in iText, but then thought to google it and see if already someone have written code for what I was looking for.

As expected, I got a nice implementation of java code that merges 2 or more PDF files using iText jar. I thought of dissecting the code in this post and give credit to original author of the post.
Merge PDF files in Java using iText JAR

So here we go. First let us see the code.
view source
print?

001 package net.viralpatel.itext.pdf;
002
003 import java.io.FileInputStream;
004 import java.io.FileOutputStream;
005 import java.io.IOException;
006 import java.io.InputStream;
007 import java.io.OutputStream;
008 import java.util.ArrayList;
009 import java.util.Iterator;
010 import java.util.List;
011
012 import com.lowagie.text.Document;
013 import com.lowagie.text.pdf.BaseFont;
014 import com.lowagie.text.pdf.PdfContentByte;
015 import com.lowagie.text.pdf.PdfImportedPage;
016 import com.lowagie.text.pdf.PdfReader;
017 import com.lowagie.text.pdf.PdfWriter;
018
019 public class MergePDF {
020
021 public static void main(String[] args) {
022 try {
023 List pdfs = new ArrayList();
024 pdfs.add(new FileInputStream("c:\\1.pdf"));
025 pdfs.add(new FileInputStream("c:\\2.pdf"));
026 OutputStream output = new FileOutputStream("c:\\merge.pdf");
027 MergePDF.concatPDFs(pdfs, output, true);
028 } catch (Exception e) {
029 e.printStackTrace();
030 }
031 }
032
033 public static void concatPDFs(List streamOfPDFFiles,
034 OutputStream outputStream, boolean paginate) {
035
036 Document document = new Document();
037 try {
038 List pdfs = streamOfPDFFiles;
039 List readers = new ArrayList();
040 int totalPages = 0;
041 Iterator iteratorPDFs = pdfs.iterator();
042
043 // Create Readers for the pdfs.
044 while (iteratorPDFs.hasNext()) {
045 InputStream pdf = iteratorPDFs.next();
046 PdfReader pdfReader = new PdfReader(pdf);
047 readers.add(pdfReader);
048 totalPages += pdfReader.getNumberOfPages();
049 }
050 // Create a writer for the outputstream
051 PdfWriter writer = PdfWriter.getInstance(document, outputStream);
052
053 document.open();
054 BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,
055 BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
056 PdfContentByte cb = writer.getDirectContent(); // Holds the PDF
057 // data
058
059 PdfImportedPage page;
060 int currentPageNumber = 0;
061 int pageOfCurrentReaderPDF = 0;
062 Iterator iteratorPDFReader = readers.iterator();
063
064 // Loop through the PDF files and add to the output.
065 while (iteratorPDFReader.hasNext()) {
066 PdfReader pdfReader = iteratorPDFReader.next();
067
068 // Create a new page in the target for each source page.
069 while (pageOfCurrentReaderPDF < pdfReader.getNumberOfPages()) { 070 document.newPage(); 071 pageOfCurrentReaderPDF++; 072 currentPageNumber++; 073 page = writer.getImportedPage(pdfReader, 074 pageOfCurrentReaderPDF); 075 cb.addTemplate(page, 0, 0); 076 077 // Code for pagination. 078 if (paginate) { 079 cb.beginText(); 080 cb.setFontAndSize(bf, 9); 081 cb.showTextAligned(PdfContentByte.ALIGN_CENTER, "" 082 + currentPageNumber + " of " + totalPages, 520, 083 5, 0); 084 cb.endText(); 085 } 086 } 087 pageOfCurrentReaderPDF = 0; 088 } 089 outputStream.flush(); 090 document.close(); 091 outputStream.close(); 092 } catch (Exception e) { 093 e.printStackTrace(); 094 } finally { 095 if (document.isOpen()) 096 document.close(); 097 try { 098 if (outputStream != null) 099 outputStream.close(); 100 } catch (IOException ioe) { 101 ioe.printStackTrace(); 102 } 103 } 104 } 105 } If you see what the code does is pretty simple. 1. In main() method, we create a List of InputStream objects that points to all the input PDF files we need to merge 2. We call MergePDF.concatPDFs() static method passing list of input PDFs, OutputStream object for merged output PDF and a boolean flag that represents whether you need to include page numbers at the end of each page as command line arguments 3. In concatPDFs() method, first we convert List of InputStream objects to List of PdfReader objects in first while loop. And also we keep count of the total pages in all the input PDF files. 4. Next we create BaseFont object using BaseFont.createFont() method. This will be the font for writing page numbers 5. Next we create output objects to write our merged PDF file using Document class object and PdfWriter.getInstance() method 6. Finally we write all the input PDFs into merged output PDF iterating each PDF and then writing each page of it in two while loops 7. And then, close all the streams and clear all the buffers. Good boys do this ;-) So now we know how to merge PDF files into one, let us see the way to split a PDF file or extract a part of PDF into another PDF. Split PDF files in Java using iText JAR Let us see the code. view source print? 01 /** 02 * @author viralpatel.net 03 * 04 * @param inputStream Input PDF file 05 * @param outputStream Output PDF file 06 * @param fromPage start page from input PDF file 07 * @param toPage end page from input PDF file 08 */ 09 public static void splitPDF(InputStream inputStream, 10 OutputStream outputStream, int fromPage, int toPage) { 11 Document document = new Document(); 12 try { 13 PdfReader inputPDF = new PdfReader(inputStream); 14 15 int totalPages = inputPDF.getNumberOfPages(); 16 17 //make fromPage equals to toPage if it is greater 18 if(fromPage > toPage ) {
19 fromPage = toPage;
20 }
21 if(toPage > totalPages) {
22 toPage = totalPages;
23 }
24
25 // Create a writer for the outputstream
26 PdfWriter writer = PdfWriter.getInstance(document, outputStream);
27
28 document.open();
29 PdfContentByte cb = writer.getDirectContent(); // Holds the PDF data
30 PdfImportedPage page;
31
32 while(fromPage <= toPage) { 33 document.newPage(); 34 page = writer.getImportedPage(inputPDF, fromPage); 35 cb.addTemplate(page, 0, 0); 36 fromPage++; 37 } 38 outputStream.flush(); 39 document.close(); 40 outputStream.close(); 41 } catch (Exception e) { 42 e.printStackTrace(); 43 } finally { 44 if (document.isOpen()) 45 document.close(); 46 try { 47 if (outputStream != null) 48 outputStream.close(); 49 } catch (IOException ioe) { 50 ioe.printStackTrace(); 51 } 52 } 53 } In above code, we have created a method splitPDF () that can be used to extracts pages out of a PDF and write it into another PDF. The code is pretty much self explanatory and is similar to the one to merge PDF files. Thus, if you need to split an input.pdf (having 20 pages) into output1.pdf (1-12 pages of input.pdf) and output2.pdf (13-20 of input.pdf), you can call the above method as follow: view source print? 01 public static void main(String[] args) { 02 try { 03 MergePDF.splitPDF(new FileInputStream("C:\\input.pdf"), 04 new FileOutputStream("C:\\output1.pdf"), 1, 12); 05 MergePDF.splitPDF(new FileInputStream("C:\\input.pdf"), 06 new FileOutputStream("C:\\output2.pdf"), 13, 20); 07 08 } catch (Exception e) { 09 e.printStackTrace(); 10 } 11 } Feel free to bookmark the code and share it if you feel it will be useful to you sumber: http://viralpatel.net/blogs/2009/06/itext-tutorial-merge-split-pdf-files-using-itext-jar.html

Selengkapnya...

Monday, November 02, 2009

REPOSITORY KARMIC KOALA LOKAL -INDONESIA

## REPOSITORY LOKAL -INDONESIA



##kambing.ui.edu (UI, Telkom, Indosat, OpenIXP, INHERENT)

deb http://kambing.ui.edu/ubuntu karmic main restricted universe multiverse

deb http://kambing.ui.edu/ubuntu karmic-updates main restricted universe multiverse

deb http://kambing.ui.edu/ubuntu karmic-security main restricted universe multiverse

deb http://kambing.ui.edu/ubuntu karmic-backports main restricted universe multiverse

deb http://kambing.ui.edu/ubuntu karmic-proposed main restricted universe multiverse






##mirror.cbn.net.id (OpenIXP)

deb http://ubuntu.cbn.net.id/Ubuntu karmic main restricted universe multiverse

deb http://ubuntu.cbn.net.id/Ubuntu karmic-updates main restricted universe multiverse

deb http://ubuntu.cbn.net.id/Ubuntu karmic-security main restricted universe multiverse

deb http://ubuntu.cbn.net.id/Ubuntu karmic-backports main restricted universe multiverse

deb http://ubuntu.cbn.net.id/Ubuntu karmic-proposed main restricted universe multiverse



##komo.vlsm.org

deb http://komo.vlsm.org/ubuntu karmic main restricted universe multiverse

deb http://komo.vlsm.org/ubuntu karmic-updates main restricted universe multiverse

deb http://komo.vlsm.org/ubuntu karmic-security main restricted universe multiverse

deb http://komo.vlsm.org/ubuntu karmic-backports main restricted universe multiverse

deb http://komo.vlsm.org/ubuntu karmic-proposed main restricted universe multiverse



##indika.net.id (OpenIXP)

deb http://ubuntu.indika.net.id/ karmic main restricted universe multiverse

deb http://ubuntu.indika.net.id/ karmic-updates main restricted universe multiverse

deb http://ubuntu.indika.net.id/ karmic-security main restricted universe multiverse

deb http://ubuntu.indika.net.id/ karmic-backports main restricted universe multiverse

deb http://ubuntu.indika.net.id/ karmic-proposed main restricted universe multiverse



##ftp.itb.ac.id (ITB, INHERENT)

deb ftp://ftp.itb.ac.id/pub/ubuntu karmic main restricted universe multiverse

deb ftp://ftp.itb.ac.id/pub/ubuntu karmic-updates main restricted universe multiverse

deb ftp://ftp.itb.ac.id/pub/ubuntu karmic-security main restricted universe multiverse

deb ftp://ftp.itb.ac.id/pub/ubuntu karmic-backports main restricted universe multiverse

deb ftp://ftp.itb.ac.id/pub/ubuntu karmic-proposed main restricted universe multiverse



## www.foss-id.web.id (Telkom)

deb http://dl2.foss-id.web.id/ubuntu karmic main restricted universe multiverse

deb http://dl2.foss-id.web.id/ubuntu karmic-updates main restricted universe multiverse

deb http://dl2.foss-id.web.id/ubuntu karmic-security main restricted universe multiverse

deb http://dl2.foss-id.web.id/ubuntu karmic-backports main restricted universe multiverse

deb http://dl2.foss-id.web.id/ubuntu karmic-proposed main restricted universe multiverse


Selengkapnya...

Monday, October 26, 2009

Memanggil Service WebMethods melalui PL/SQL

Pada contoh ini, ada beberapa fungsi penting yang digunakan untuk memanggil webservices yang terdapat pada Oracle, yaitu UTL_HTTP dan XMLTYPE, tapi fungsi-fungsi ini hanya bisa dijalankan untuk veri 9i keatas, untuk 8i kayaknya harus bikin fungsi pakai native Java-nya. Fungsi utama untuk memanggil webservice atau request (dengan metode POST/GET) pada PL/SQL terletak pada fungsi UTL_HTTP. Sedangkan XMLTYPE digunakan untuk parsing xml.

Berikut ini adalah contoh API untuk memanggil services pada webMethods, setelah disesuaikan format envelope-nya dengan API pada webmethods.


----------------------------code------------------------------------------------

CREATE OR REPLACE PACKAGE WEBMETHOD.soap_api AS
-- --------------------------------------------------------------------------
-- Name : http://forum.swamedia.co.id
-- Author : Bhangun
-- Description : API untuk memanggil web services pada webMethods.
-- Ammedments :
-- When Who What
-- =========== ======== =================================================
-- 21-OCT-2009 Bhangun Initial Creation
-- --------------------------------------------------------------------------

TYPE t_request IS RECORD (
method VARCHAR2(256),
service VARCHAR2(256),
namespace VARCHAR2(256),
body VARCHAR2(32767),
envelope_tag VARCHAR2(30)
);

TYPE t_response IS RECORD
(
doc XMLTYPE,
envelope_tag VARCHAR2(30)
);



PROCEDURE set_proxy_authentication(p_username IN VARCHAR2,
p_password IN VARCHAR2);

FUNCTION new_request(p_method IN VARCHAR2,
p_service IN VARCHAR2,
p_namespace IN VARCHAR2,
p_envelope_tag IN VARCHAR2 DEFAULT 'SOAP-ENV')
RETURN t_request;


PROCEDURE add_parameter(p_request IN OUT NOCOPY t_request,
p_name IN VARCHAR2,
p_type IN VARCHAR2,
p_value IN VARCHAR2);

FUNCTION invoke(p_request IN OUT NOCOPY t_request,
p_url IN VARCHAR2,
p_action IN VARCHAR2)
RETURN t_response;

FUNCTION get_return_value(p_response IN OUT NOCOPY t_response,
p_name IN VARCHAR2,
p_namespace IN VARCHAR2)
RETURN VARCHAR2;

END soap_api;
/
--------------------------------------------------------------------------


ini Body-nya
-------------------------code-------------------------------------------------
CREATE OR REPLACE PACKAGE BODY WEBMETHOD.soap_api AS
-- --------------------------------------------------------------------------
-- Name : http://www.oracle-base.com/dba/miscellaneous/soap_api
-- Author : DR Timothy S Hall
-- Description : SOAP related functions for consuming web services.
-- Ammedments :
-- When Who What
-- =========== ======== =================================================
-- 04-OCT-2003 Tim Hall Initial Creation
-- 23-FEB-2006 Tim Hall Parameterized the "soap" envelope tags.
-- 08-JUN-2006 Tim Hall Add proxy authentication functionality.
-- --------------------------------------------------------------------------

g_proxy_username VARCHAR2(50) := NULL;
g_proxy_password VARCHAR2(50) := NULL;


-- ---------------------------------------------------------------------
PROCEDURE set_proxy_authentication(p_username IN VARCHAR2,
p_password IN VARCHAR2) AS
-- ---------------------------------------------------------------------
BEGIN
g_proxy_username := p_username;
g_proxy_password := p_password;
END;
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
FUNCTION new_request(p_method IN VARCHAR2,
p_service IN VARCHAR2,
p_namespace IN VARCHAR2,
p_envelope_tag IN VARCHAR2 DEFAULT 'SOAP-ENV')
RETURN t_request AS
-- ---------------------------------------------------------------------
l_request t_request;
BEGIN
l_request.method := p_method;
l_request.service := p_service;
l_request.namespace := p_namespace;
l_request.envelope_tag := p_envelope_tag;
RETURN l_request;
END;
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
PROCEDURE add_parameter(p_request IN OUT NOCOPY t_request,
p_name IN VARCHAR2,
p_type IN VARCHAR2,
p_value IN VARCHAR2) AS
-- ---------------------------------------------------------------------
BEGIN
p_request.body := p_request.body||'<'||p_name||' xsi:type="'||p_type||'">'||p_value||'';
--DBMS_OUTPUT.PUT_LINE('<'||p_name||' xsi:type="'||p_type||'">'||p_value||'');
END;
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
PROCEDURE generate_envelope(p_request IN OUT NOCOPY t_request,
p_env IN OUT NOCOPY VARCHAR2) AS
-- ---------------------------------------------------------------------
BEGIN

p_env := '<'||p_request.envelope_tag||':Envelope xmlns:'||p_request.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/" ' ||
' xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">' ||
'<'||p_request.envelope_tag||':Body>' ||
'<'||p_request.method||':'||p_request.service||' xmlns:'||p_request.method||'="'||p_request.namespace||'">' ||
p_request.body ||
'' ||
'' ||
'';


END;
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
PROCEDURE show_envelope(p_env IN VARCHAR2) AS
-- ---------------------------------------------------------------------
i PLS_INTEGER;
l_len PLS_INTEGER;
BEGIN
i := 1; l_len := LENGTH(p_env);
WHILE (i <= l_len) LOOP
DBMS_OUTPUT.put_line(SUBSTR(p_env, i, 60));
i := i + 60;
END LOOP;
END;
-- ---------------------------------------------------------------------

-- ---------------------------------------------------------------------
PROCEDURE check_fault(p_response IN OUT NOCOPY t_response,
p_env IN VARCHAR2) AS
-- ---------------------------------------------------------------------
l_fault_node XMLTYPE;
l_fault_code VARCHAR2(256);
l_fault_string VARCHAR2(32767);
BEGIN
l_fault_node := p_response.doc.extract('/'||p_response.envelope_tag||':Fault',
'xmlns:'||p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/');
IF (l_fault_node IS NOT NULL) THEN
l_fault_code := l_fault_node.extract('/'||p_response.envelope_tag||':Fault/faultcode/child::text()',
'xmlns:'||p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
l_fault_string := l_fault_node.extract('/'||p_response.envelope_tag||':Fault/faultstring/child::text()',
'xmlns:'||p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
--RAISE_APPLICATION_ERROR(-20000, l_fault_code || ' - ' || l_fault_string||'-->>'||p_env);
RAISE_APPLICATION_ERROR(-20000, p_env);
END IF;
END;
-- ---------------------------------------------------------------------

-- ---------------------------------------------------------------------
FUNCTION invoke(p_request IN OUT NOCOPY t_request,
p_url IN VARCHAR2,
p_action IN VARCHAR2)
RETURN t_response AS
-- ---------------------------------------------------------------------
l_envelope VARCHAR2(32767);
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_response t_response;
BEGIN
generate_envelope(p_request, l_envelope);
show_envelope(l_envelope);
l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.0');
IF g_proxy_username IS NOT NULL THEN
UTL_HTTP.set_authentication(r => l_http_request,
username => g_proxy_username,
password => g_proxy_password,
scheme => 'Basic',
for_proxy => TRUE);
END IF;
UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_envelope));
--UTL_HTTP.set_header(l_http_request, 'SOAPAction', p_action);
UTL_HTTP.write_text(l_http_request, l_envelope);
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.read_text(l_http_response, l_envelope);
UTL_HTTP.end_response(l_http_response);
l_response.doc := XMLTYPE.createxml(l_envelope);
l_response.envelope_tag := p_request.envelope_tag;
l_response.doc := l_response.doc.extract('/'||l_response.envelope_tag||':Envelope/'||l_response.envelope_tag||':Body/child::node()',
'xmlns:'||l_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/"');
------------------liat
show_envelope(l_response.doc.getstringval());
check_fault(l_response,l_envelope);
RETURN l_response;
END;
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
FUNCTION get_return_value(p_response IN OUT NOCOPY t_response,
p_name IN VARCHAR2,
p_namespace IN VARCHAR2)
RETURN VARCHAR2 AS
-- ---------------------------------------------------------------------
BEGIN
RETURN p_response.doc.extract('//'||p_name||'/child::text()',p_namespace).getstringval();
END;
-- ---------------------------------------------------------------------

END soap_api;
/
---------------------------------------------------------------------------


ini fungsi untuk memanggil soap_api
-----------------------------code----------------------------------------------
CREATE OR REPLACE FUNCTION WEBMETHOD.getdata (param IN VARCHAR2)
RETURN VARCHAR2
AS
l_request soap_api.t_request;
l_response soap_api.t_response;
l_return VARCHAR2(32767);
l_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_method VARCHAR2(32767);
l_service VARCHAR2(32767);
l_soap_action VARCHAR2(32767);
l_result_name VARCHAR2(32767);

BEGIN
-- Set proxy details if no direct net connection.
--UTL_HTTP.set_proxy('server', NULL);
--UTL_HTTP.set_persistent_conn_support(TRUE);

-- Set proxy authentication if necessary.
soap_api.set_proxy_authentication(p_username => 'Administrator',
p_password => 'manage');

l_url := 'http://localhost:5555/soap/rpc';
l_method := 'riset';
l_namespace := 'http://www.webmethods.com/'||l_method;
l_service := 'getUp';
l_soap_action := '';
l_result_name := 'hasil';

l_request := soap_api.new_request(p_method => l_method,
p_service => l_service,
p_namespace => l_namespace);

soap_api.add_parameter(p_request => l_request,
p_name => 'input',
p_type => 'xsd:string',
p_value => param);

l_response := soap_api.invoke(p_request => l_request,
p_url => l_url,
p_action => l_soap_action);

--l_return := soap_api.get_return_value(p_response => l_response,
-- p_name => l_result_name,
-- p_namespace => l_namespace);

RETURN null;--l_return;
END;
/

---------------------------------------------------------------------------



ini contoh untuk memanggil fungsinya:

----------------------------code------------------------------------------------
DECLARE
RetVal VARCHAR2(200);
PARAM VARCHAR2(200);

BEGIN
PARAM := 'bhangun';

RetVal := WEBMETHOD.GETDATA ( PARAM );
COMMIT;
END;
----------------------------------------------------------------------------


dan ini adalah hasilnya :

----------------------------hasil------------------------------------------------
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">


bhangun


xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:root="1">
BHANGUN


----------------------------hasil------------------------------------------------


Untuk sementara ini fungsi soap_api.get_return_value sengaja tidak digunakan karena belum nemu format XPath untuk response-nya di webMethod. Keluarannya juga baru dalam bentuk output di konsol tapi nanti bisa disesuaikan dengan kebutuhan, mau dimasukan kedalam tabel, langsung diambil value-nya ato terserah.... Laughing hehhe maklum soalnya baru nyoba PL/SQL lagi jadi kudu belajar dulu yg lain-lainya Wink

Silahkan dikembangkan lagi.... Selamat mencoba!!

Selengkapnya...

Friday, October 09, 2009

Driver untuk Toshiba Satellite A215-s5818

Driver untuk Toshiba Satellite A215-s5818 di link ini:

http://www.laptopbeep.com/drivers-for-satellite-a215-s5818

Selengkapnya...

Monday, September 14, 2009

Customize Path Setting di .bashrc

## CUSTOMIZE PATH SETTING di .bashrc

######### APPLICATION HOME tulis disini

JAVA_HOME=/home/homename/opt/java/current
MAVEN_HOME=/home/homename/opt/maven/current
GLASSFISH_HOME=/home/homename/opt/glassfish/current
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
##ORACLE_HOME=/usr/lib/oracle/10.2.0.4/client
LAMPP_HOME=/home/homename/opt/lampp
JAVAFX_HOME=/home/homename/opt/javafx/current
DERBY_HOME=/home/homename/opt/glassfish/current/javadb

######### Tambahkan pada path disini mengikuti pola yg sudah ada.
######### ingat #PATH selalu disimpan terakhir

PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$ORACLE_HOME/bin:$GLASSFISH_HOME/bin:$LAMPP_HOME:$ORA/etc/init.d:$JAVAFX_HOME/bin:$DERBY_HOME/bin$PATH
##
ORACLE_SID=XE;

######### export masing-masing path, dipisahkan per baris lebih memudahkan
######### ingat PATH selalu ditempatkan terakhir
export JAVA_HOME
export MAVEN_HOME
export GLASSFISH_HOME
export ORACLE_HOME
export ORA
export ORACLE_SID
export LAMPP_HOME
export JAVAFX_HOME
export DERBY_HOME
export PATH



Selengkapnya...

Al-Quran

This Day in History