Redian新闻
>
Dos and Don'ts about classpath
avatar
Dos and Don'ts about classpath# Java - 爪哇娇娃
m*t
1
I have seen too many people, including myself, falling for
classpath issues while developing in Java. So here's something
from my experience to help newbies out:
1. Always try to find a Win2K/XP or Linux for your development
work. The DOS prompt of Win98 is simply insufficient for serious
Java development.
2. Grow yourself some good habit. Before just shoveling a jar
onto a classpath, always ask yourself, "does it belong here?"
I have seen a lot of developers hacking their classpath just
for
avatar
xt
2

Agree. It Win98 sucks. I use NT though. :)
I add one thing: make sure you have only *one* copy of everything
in your classpath. You don't want to end up with multiple copies
which could give you headache on the LinkageError or version conflicts.
In DOS mode, use setlocal ... endlocal to make sure that your classpath
settings are strictly local. Also you could use -classpath option

【在 m******t 的大作中提到】
: I have seen too many people, including myself, falling for
: classpath issues while developing in Java. So here's something
: from my experience to help newbies out:
: 1. Always try to find a Win2K/XP or Linux for your development
: work. The DOS prompt of Win98 is simply insufficient for serious
: Java development.
: 2. Grow yourself some good habit. Before just shoveling a jar
: onto a classpath, always ask yourself, "does it belong here?"
: I have seen a lot of developers hacking their classpath just
: for

avatar
F*n
3
Use an IDE you will solve all these problems.

【在 m******t 的大作中提到】
: I have seen too many people, including myself, falling for
: classpath issues while developing in Java. So here's something
: from my experience to help newbies out:
: 1. Always try to find a Win2K/XP or Linux for your development
: work. The DOS prompt of Win98 is simply insufficient for serious
: Java development.
: 2. Grow yourself some good habit. Before just shoveling a jar
: onto a classpath, always ask yourself, "does it belong here?"
: I have seen a lot of developers hacking their classpath just
: for

avatar
m*t
4

Actually not. One thing not so good about IDE is that it does
too many things for you, one of them being forming the classpath
for you automatically. For example, NetBeans (at least as of 3.3)
forms both compile and run-time classpaths from all the filesystems
you mount, regardless if it's src, or lib, or whatever other folder
you just mounted for convenience. On top of that, it has its own
running classpath included automatically, too.
Fortunately, new generations of IDE's have been adding

【在 F****n 的大作中提到】
: Use an IDE you will solve all these problems.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。