-
Notifications
You must be signed in to change notification settings - Fork 20
Non Maven Java project with Eclipse
Sanghyuk Jung edited this page Apr 5, 2016
·
14 revisions
Make sure JRE version 1.6 or later is installed and used in Eclipse.
-
Check your java version on the command line.
java -version
-
Check settings in Eclipse 'Project > Properties > Java compiler'
Download multiline-string-0.1.2.jar and save it on your local machine.
- Go to 'Project > Properties > Java Build path > Libraries'
- add 'multiline-string-0.1.1.jar' file by 'add JARS..' or 'add External JARs..' button.
- Go to 'Project > Properties > Java compiler > Annotation Processing '
- Select 'Enable project specific settings'
- Select 'Enable annotation processing'.
- Go to 'Project > Properties > Java compiler > Annotation Processing > Factroy Path'
- add 'multiline-string-0.1.2.jar' file by 'add JARS..' or 'add External JARs..' button. It will create '.factorypath' file on your project folder.
Create a class for test and run it. The following example shows how to use the @Multiline
annotation.
import org.adrianwalker.multilinestring.Multiline;
public class Hello {
/**
Hello!
Multiline-string!!
*/
@Multiline private static String msg;
public static void main(String[] args) {
System.out.println(msg);
}
}
It will write the following message to the console.
Hello!
Multiline-string!!
Include 'multiline-string-0.1.2.jar' in the '-classpath' option.
javac -classpath multiline-string-0.1.2.jar Hello.java