解決從github下載web的源碼部署到eclipse的問題,githubeclipse

來源:互聯網
上載者:User

解決從github下載web的源碼部署到eclipse的問題,githubeclipse

2015年6月2日 天氣晴
github官網:https://github.com/
以下以pdf.js作為案例說明:https://github.com/mozilla/pdf.js
1).點擊案例網站右側的Download ZIP將源碼下載下來,並解壓

注意:當然也可以通過HTTPS clone URL 及Clone in Desktop的方式把源碼下載下來,在此不做說明

2).在解壓檔案的web目錄下找到viewer.html檔案,把該檔案重新命名尾碼為.jsp的檔案。

注意:當然也可以通過查看線上demo的的源碼,並把demo源碼拷貝到對應的jsp檔案即可

3). 按部就班的把js、css檔案整合到web項目中

注意:方便起見,最好分別建一個js、css分別用來放js及css檔案

4).運行eclipse中的項目,反覆結合Googlechrome的控制台console查看報錯問題,並進行解決,直到全部錯誤消失為止

另外,上傳者也提供了一種比較好的方式來獲得代碼,下面簡單說一下

1).To get a local copy of the current code, clone it using git:

$ git clone git://github.com/mozilla/pdf.js.git$ cd pdf.js

注意:Git for Windows:http://msysgit.github.io/,直接安裝即可

2).Next, install Node.js via the official package or via nvm. If everything worked out, run

$ npm install

to install all dependencies for PDF.js.

注意:nodejs下載官網為:http://nodejs.org/,打不開的情況下可以翻牆或者時用其他網站替代。對安裝有問題,可以參考一下W3CSCHOOL.CC這個網址;對nodejs不瞭解,可以查看一下百度百科

3).Finally you need to start a local web server as some browsers do not allow opening PDF files using a file:// URL. Run

$ node make server

4).and then you can open

http://localhost:8888/web/viewer.html
It is also possible to view all test PDF files on the right side by opening

http://localhost:8888/test/pdfs/?frame
注意:找不到pdf.js這個檔案夾的時候,可以通過EveryThing這個軟體進行搜尋。EveryThing為:http://www.voidtools.com/

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.