开发者

how to deploy log4j only use notepad

i am a Java beginner and i want to use log4j , but i hate eclipse. I use programmer's notepad to write python and开发者_StackOverflow javascript. So how to use log4j if I use programmer's notepad

what can i do ,

log4j_demo
     --HelloLog4j.java
     --lib
          ---log4j-1.2.8.jar
          ---log4j.properties

thanks


I am not aware of the tool you are using but all you need to do is to make sure log4j jar and your log4j.properties is in the classpath


Checkout the log4j page: http://logging.apache.org/log4j/1.2/manual.html. They have no hard bound dependency on using eclipse. Any text editor will suffice.


You can use any text editor to write Java. Unlike Python and Javascript you must compile Java code before it can be executed. javac (Java Compiler) is included in the Java Development Kit.

Oracle has a short tutorial on how to compile and run Java.


I think that the short answer is that Programmer's Notepad doesn't have much support for Java, but you can do it if you are prepared to "wing it". This forum thread may be helpful.

And of course, the other approach is to use Programmer's Notepad as just an editor, and run javac or ant from the command line to do your builds, etc.

Either way, to use log4j you simply need to make sure that the relevant JAR file is on the classpath.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜