ubuntu 16.04 openjdk安装配置 、phpEclipse插件安装、配置Xdebug

网友投稿 266 2022-09-16

ubuntu 16.04 openjdk安装配置 、phpEclipse插件安装、配置Xdebug

相关环境: ubuntu16.04 php7.0 Xdebug2.4 openjdk version “1.8.0_91”

openjdk的安装及配置

#安装openjdk:edemon@linux:~\$ sudo apt install default-jreedemon@linux:~$ whereis jvmjvm: /usr/lib/jvmedemon@linux:~$ cd /usr/lib/jvmedemon@linux:/usr/lib/jvm$ lsdefault-java java-1.8.0-openjdk-amd64 java-8-openjdk-amd64edemon@linux:/usr/lib/jvm/java-1.8.0-openjdk-amd64$ lsASSEMBLY_EXCEPTION docs jre man THIRD_PARTY_READMEbin include lib src.zip#修改配置文件:edemon@linux:/usr/lib/jvm/java-1.8.0-openjdk-amd64$ sudo gedit ~/.bashrc#加入内容:export JAVA_HOME=/usr/lib/jvm/usr/lib/jvm/java-1.8.0-openjdk-amd64 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATHedemon@linux:/usr/lib/jvm/java-1.8.0-openjdk-amd64$ source ~/.bashrcedemon@linux:/usr/lib/jvm/java-1.8.0-openjdk-amd64$ java -version#出现下面内容则正确:openjdk version "1.8.0_91"OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)#测试:edemon@linux:~/Documents/java_space$ cat t.javaimport java.util.*; public class t { public static void main(String[] args) { System.out.println("hello"); }}edemon@linux:~/Documents/java_space$ javac t.javaedemon@linux:~/Documents/java_space$ lshello.java t.class t.javaedemon@linux:~/Documents/java_space$ java thello

Eclipse 上装插件

#安装eclipse:edemon@linux:~\$ sudo apt install eclipse

PHPEclipse相关URL :

PHPEclipse - ​​new software

workwith右边——add。输入name和URL.

安装成功后,重启即可。

pdt的快速上手:

​​selected wizard could not be started.

Plug-in org.eclipse.php.ui was unable to load class org.eclipse.php.internal.ui.wizards.PHPProjectCreationWizard. An error occurred while automatically activating bundle org.eclipse.php.ui (272).

简单,只要我们新建一个文件夹,在使用这个文件夹作为php工作空间即可

或者:

edemon@linux:/usr/share/applications$ eclipse -clean

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

新选一个工作空间即可。

但不能正常的新建php文件,应该是少了某些步骤

相关URL: ​​​​​​)

tar -zxvf xdebug-2.4.0.tgz -C Xbug2.4 #解压到Xbug2.4

cd Xbud2.4

cd ./Xbug2.4

cd xdebug-2.4.0

sudo apt-get install php7.0-dev

phpize

make ./configure

sudo ./configure

sudo make

make test

sudo make install

sudo cp ~/Downloads/Xbug2.4/xdebug-2.4.0/modules/xdebug.so /usr/lib/php/7.0/

sudo gedit /etc/php/7.0/apache2/php.ini #配置php.ini

加入:

zend_extension = /usr/lib/php/7.0/xdebug.so

sudo /etc/init.d/apache2 restart

打开phpinfo有出现:

相关反馈效果:

edemon@linux:~/Downloads/Xbug2.4/xdebug-2.4.0$ make testBuild complete.Don't forget to run 'make test'.=====================================================================PHP : /usr/bin/php7.0 PHP_SAPI : cliPHP_VERSION : 7.0.4-7ubuntu2.1ZEND_VERSION: 3.0.0PHP_OS : Linux - Linux linux 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64INI actual : /home/edemon/Downloads/Xbug2.4/xdebug-2.4.0/tmp-php.iniMore .INIs : CWD : /home/edemon/Downloads/Xbug2.4/xdebug-2.4.0Extra dirs : VALGRIND : Not used=====================================================================TIME START 2016-06-08 11:24:21=====================================================================No tests were run.edemon@linux:~/Downloads/Xbug2.4/xdebug-2.4.0$ sudo make installInstalling shared extensions: /usr/lib/php/20151012/ +----------------------------------------------------------------------+ | | | INSTALLATION INSTRUCTIONS | | ========================= | | | | See for instructions | | on how to enable Xdebug for PHP. | | | | Documentation is available online as well: | | - A list of all settings: | | - A list of all functions: | | - Profiling instructions: | | - Remote debugging: | | | | | | NOTE: Please disregard the message | | You should add "extension=xdebug.so" to php.ini | | that is emitted by the PECL installer. This does not work for | | Xdebug. | | | +----------------------------------------------------------------------+edemon@linux:~/Downloads/Xbug2.4/xdebug-2.4.0$ sudo /etc/init.d/apache2 restart[ ok ] Restarting apache2 (via systemctl): apache2.service.

但是后来使用eclipse新建php工程文件时出现过java.lang.NullPointerException,以及Could not open the editor: The editor class could not be instantiated. 这些问题实在不知怎么解决。。谁能解决它们请留言,谢谢。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:python与正则表达式
下一篇:algorithm 题集五 (16.07.20)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~