Step-by-step set up a Java development environment under Linux

zhaozj2021-02-16  51

Sometimes you may need Java development under Linux, in fact, many companies are using Linux, this article tells how to build a Java development environment on Red Hat9.0. Event Eclipse3.0

Recently IBM released the official version of the Eclipse 3.0, we installed him and developed Java applications under Linux.

First download J2SDK1.4.2-linux-i586.bin from http://java.sun.com, download Eclipse3.0-sdk-linux-gtk.zip from http://www.eclipse.org first download them first To / TMP directory, then install J2SDK, copy JSDK1.4.2-Linux-i586.bin to / usr Enter CP J2SDK1.4.2-Linux-i586.bin / usr and then install ./j2sdk1.4.2-linux- I586.bin, the command execution will appear in the USR directory, the J2SDK1.4.2 directory set the environment variable, and enter the following command CD / etcvi profile to open this file in the file, finally add the following three export java_home = / usr / j2sdk1.4.2export path = & JAVA_HOME / BIN: & PATHEXPORT CLASSPATH =.: & Java_home / lib / RT.jar: & java_home / lib / Tools.ja then save files so js2dk We installed, pay attention to the current directory in the environment variable. We can write Test files to check, helloworld.javapublic class helloworld {public static void main (string [] args) {system.out.println ("Hello World in Linux");}} Javac HelloWorld.Java Java HelloWorld This can be seen Hello World in Linux output, this shows that the installation setting is successful. Here we install Eclipse3.0 to copy the downloaded files to / TMP, then execute unzip eclipse-sdk-3.0-linux-gtk.zip to get Eclipse in the current directory Folder cp -r eclipse / usrcd /usr/eclipse./eclipse We can see that Eclipse started, he will ask us where to put Workspace? You are set, and then write a HelloWorld's Project to test, usually there will be no problem. In this way, the Java development environment under Linux is set up, but Eclipse feels slower than Windows: (

转载请注明原文地址:https://www.9cbs.com/read-19385.html

New Post(0)