由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Java sucks big time!
相关主题
Java能帮我做这个project吗?How to build a java web service server?
求助Java Image Tools or APIAndroid C/C++ native calls Java APIs
如何从Java application打开windows打印机界面?再请教一个 编译错误
安装环境最麻烦了请问javax.portlet包在JDK的哪个jar文件里面(在线等)
Java 2D help..java SE 的源代码在哪里
Java3D or JOGL?这个闭包怎么写?
how to find out free disk space现在写代码还有人开着API么?
自己写一个Oracle的JDBC driver同一个Lock锁两次,性能比较差
相关话题的讨论汇总
话题: java话题: jni话题: isapi话题: api话题: disk
进入Java版参与讨论
1 (共1页)
v**d
发帖数: 186
1
老板要我查一下如何在java code中get free disk space available
我发现目前的jdk 1.5中根本没有这个功能,而且People have requested this feature
since at least 7 years ago http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4057701)and it is not until the next version of JDK (1.6, codename mustang) has Sun offered a resolution ( the API specification is at: http://download.java.net/jdk6/docs/api/java/io/File.html#getUsableSpace()).
我看了一下jdk 1.6的源代码,发现sun也不过是弄了一个JNI函数,调用Win32 API
function "BOOL GetDiskFreeSpaceEx(
LPCTSTR
R*******r
发帖数: 104
2
这就叫烂了,调JNI函数都是必然的,但是要在所有
平台上实现同一接口就费点事了。

feature


【在 v**d 的大作中提到】
: 老板要我查一下如何在java code中get free disk space available
: 我发现目前的jdk 1.5中根本没有这个功能,而且People have requested this feature
: since at least 7 years ago http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4057701)and it is not until the next version of JDK (1.6, codename mustang) has Sun offered a resolution ( the API specification is at: http://download.java.net/jdk6/docs/api/java/io/File.html#getUsableSpace()).
: 我看了一下jdk 1.6的源代码,发现sun也不过是弄了一个JNI函数,调用Win32 API
: function "BOOL GetDiskFreeSpaceEx(
: LPCTSTR

v**d
发帖数: 186
3
这么基本的功能拖了7,8年都不实现,sun根本没有把customer的需求放在眼里,况且这
个功能实现起来十分简单,每个平台上面一个小时就可以搞定吧,从写代码到调试完毕

【在 R*******r 的大作中提到】
: 这就叫烂了,调JNI函数都是必然的,但是要在所有
: 平台上实现同一接口就费点事了。
:
: feature
: 。

v**d
发帖数: 186
4
有多少用户喜欢自己写JNI函数?姑且不谈用户自己能否有能力写出来

【在 R*******r 的大作中提到】
: 这就叫烂了,调JNI函数都是必然的,但是要在所有
: 平台上实现同一接口就费点事了。
:
: feature
: 。

v**d
发帖数: 186
5
我今天很恼火的是,公司不仅要用这个狗屎功能,还tmd要在oracle里面用,java stored
procedure,很烦,屁大的个事要编译,load java class,export function,设什么狗
屎安全属性,弄半天
还有,jdbc里面的blob调用无法直接传到c++,而需要搞个临时table保存,然后用oci读
出来,真tnnd无聊

【在 v**d 的大作中提到】
: 有多少用户喜欢自己写JNI函数?姑且不谈用户自己能否有能力写出来
v**d
发帖数: 186
6
另外俺还要忍不住骂微软这坨又臭又硬的烂狗屎
IIS在3.0以及以前的版本很垃圾,要求isapi extension必须run in process,这样isapi
里面的随
便一个错误就会造成整个iis崩溃,但是公司的产品是在那个时候开始做的,所以所有功
能都是自己写的一个process,只用了isapi里面的一两个函数来取得extension_control_
block和把输出发给browser,这样程序的流程十分晦涩,到处都是tmd event,
WaitForSingleObject, shared memory transfer啥的,关键是最开始的设计文档由于实
现时的大量修改已经一无是处了,而整个系统的类有上千个,老夫花了好几个星期才算把
它摸熟了
微软和sun都是tmd垃圾,不过微软还好一点儿,总说还有一些长进。。。。

stored



【在 v**d 的大作中提到】
: 我今天很恼火的是,公司不仅要用这个狗屎功能,还tmd要在oracle里面用,java stored
: procedure,很烦,屁大的个事要编译,load java class,export function,设什么狗
: 屎安全属性,弄半天
: 还有,jdbc里面的blob调用无法直接传到c++,而需要搞个临时table保存,然后用oci读
: 出来,真tnnd无聊

v**d
发帖数: 186
7
另外公司的sb也真tmd傻,有现成的类不用,啥都要自己实现,说是为了好移植,搞isapi
移植个球,apache对它的支持又不好



control_



【在 v**d 的大作中提到】
: 另外俺还要忍不住骂微软这坨又臭又硬的烂狗屎
: IIS在3.0以及以前的版本很垃圾,要求isapi extension必须run in process,这样isapi
: 里面的随
: 便一个错误就会造成整个iis崩溃,但是公司的产品是在那个时候开始做的,所以所有功
: 能都是自己写的一个process,只用了isapi里面的一两个函数来取得extension_control_
: block和把输出发给browser,这样程序的流程十分晦涩,到处都是tmd event,
: WaitForSingleObject, shared memory transfer啥的,关键是最开始的设计文档由于实
: 现时的大量修改已经一无是处了,而整个系统的类有上千个,老夫花了好几个星期才算把
: 它摸熟了
: 微软和sun都是tmd垃圾,不过微软还好一点儿,总说还有一些长进。。。。

R*******r
发帖数: 104
8
Java 是狗屎,M$不也还就是照着做了一个。

isapi

control_



【在 v**d 的大作中提到】
: 另外俺还要忍不住骂微软这坨又臭又硬的烂狗屎
: IIS在3.0以及以前的版本很垃圾,要求isapi extension必须run in process,这样isapi
: 里面的随
: 便一个错误就会造成整个iis崩溃,但是公司的产品是在那个时候开始做的,所以所有功
: 能都是自己写的一个process,只用了isapi里面的一两个函数来取得extension_control_
: block和把输出发给browser,这样程序的流程十分晦涩,到处都是tmd event,
: WaitForSingleObject, shared memory transfer啥的,关键是最开始的设计文档由于实
: 现时的大量修改已经一无是处了,而整个系统的类有上千个,老夫花了好几个星期才算把
: 它摸熟了
: 微软和sun都是tmd垃圾,不过微软还好一点儿,总说还有一些长进。。。。

v**d
发帖数: 186
9
比起sun这个公司,java还算不了太狗屎

【在 R*******r 的大作中提到】
: Java 是狗屎,M$不也还就是照着做了一个。
:
: isapi
: 功
: control_
: 实
: 把

v**d
发帖数: 186
10
微软经常后发制人,毕竟后设计的东西可以吸取以前的东西的优缺点

【在 R*******r 的大作中提到】
: Java 是狗屎,M$不也还就是照着做了一个。
:
: isapi
: 功
: control_
: 实
: 把

相关主题
Java3D or JOGL?How to build a java web service server?
how to find out free disk spaceAndroid C/C++ native calls Java APIs
自己写一个Oracle的JDBC driver再请教一个 编译错误
进入Java版参与讨论
o**v
发帖数: 1662
11
isapi那个ext/filter两种模式都这样么?

isapi

control_



【在 v**d 的大作中提到】
: 另外俺还要忍不住骂微软这坨又臭又硬的烂狗屎
: IIS在3.0以及以前的版本很垃圾,要求isapi extension必须run in process,这样isapi
: 里面的随
: 便一个错误就会造成整个iis崩溃,但是公司的产品是在那个时候开始做的,所以所有功
: 能都是自己写的一个process,只用了isapi里面的一两个函数来取得extension_control_
: block和把输出发给browser,这样程序的流程十分晦涩,到处都是tmd event,
: WaitForSingleObject, shared memory transfer啥的,关键是最开始的设计文档由于实
: 现时的大量修改已经一无是处了,而整个系统的类有上千个,老夫花了好几个星期才算把
: 它摸熟了
: 微软和sun都是tmd垃圾,不过微软还好一点儿,总说还有一些长进。。。。

t****5
发帖数: 20
12
that's because java develpoers normally assume unlimited memory/disk/cpu.

feature


【在 v**d 的大作中提到】
: 老板要我查一下如何在java code中get free disk space available
: 我发现目前的jdk 1.5中根本没有这个功能,而且People have requested this feature
: since at least 7 years ago http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4057701)and it is not until the next version of JDK (1.6, codename mustang) has Sun offered a resolution ( the API specification is at: http://download.java.net/jdk6/docs/api/java/io/File.html#getUsableSpace()).
: 我看了一下jdk 1.6的源代码,发现sun也不过是弄了一个JNI函数,调用Win32 API
: function "BOOL GetDiskFreeSpaceEx(
: LPCTSTR

c****r
发帖数: 185
13
变通一下啦,用Runtime.exec()



【在 v**d 的大作中提到】
: 这么基本的功能拖了7,8年都不实现,sun根本没有把customer的需求放在眼里,况且这
: 个功能实现起来十分简单,每个平台上面一个小时就可以搞定吧,从写代码到调试完毕

v**d
发帖数: 186
14
反正java慢,多开个进程也无所谓?ft
c****e
发帖数: 1453
15
ispai dll里面写个messagebox,iis就挂在那里了,每人点那个box,hehe .

isapi

control_



【在 v**d 的大作中提到】
: 另外俺还要忍不住骂微软这坨又臭又硬的烂狗屎
: IIS在3.0以及以前的版本很垃圾,要求isapi extension必须run in process,这样isapi
: 里面的随
: 便一个错误就会造成整个iis崩溃,但是公司的产品是在那个时候开始做的,所以所有功
: 能都是自己写的一个process,只用了isapi里面的一两个函数来取得extension_control_
: block和把输出发给browser,这样程序的流程十分晦涩,到处都是tmd event,
: WaitForSingleObject, shared memory transfer啥的,关键是最开始的设计文档由于实
: 现时的大量修改已经一无是处了,而整个系统的类有上千个,老夫花了好几个星期才算把
: 它摸熟了
: 微软和sun都是tmd垃圾,不过微软还好一点儿,总说还有一些长进。。。。

g**********y
发帖数: 14569
16
If a language is BS just because it doesn't meet one of your need, then
perhaps there is, and will be absolutely NO good language for you.
I programmed 20 years. Java is so far the best language I've ever used.
Task like get free disk space is nothing to a language. Sun doesn't include
that not because it cannot, but doesn't want to.
I remember some comments from a book: If you put every useful function in a
String class, then nobody will use that class anymore. Because it is
ridiculously bloate

【在 v**d 的大作中提到】
: 老板要我查一下如何在java code中get free disk space available
: 我发现目前的jdk 1.5中根本没有这个功能,而且People have requested this feature
: since at least 7 years ago http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4057701)and it is not until the next version of JDK (1.6, codename mustang) has Sun offered a resolution ( the API specification is at: http://download.java.net/jdk6/docs/api/java/io/File.html#getUsableSpace()).
: 我看了一下jdk 1.6的源代码,发现sun也不过是弄了一个JNI函数,调用Win32 API
: function "BOOL GetDiskFreeSpaceEx(
: LPCTSTR

R*******r
发帖数: 104
17
That disk size is a useful function and will be included in
java 1.6, it's easy to get around, still, a pure java support
would be neat.

into

【在 g**********y 的大作中提到】
: If a language is BS just because it doesn't meet one of your need, then
: perhaps there is, and will be absolutely NO good language for you.
: I programmed 20 years. Java is so far the best language I've ever used.
: Task like get free disk space is nothing to a language. Sun doesn't include
: that not because it cannot, but doesn't want to.
: I remember some comments from a book: If you put every useful function in a
: String class, then nobody will use that class anymore. Because it is
: ridiculously bloate

v**d
发帖数: 186
18
对于file class来说,取到文件系统的基本信息是最基本的功能之一
同样的如果string class没有最基本,最常用的功能,它就是垃圾
不要告诉我你什么都自己实现,reinvent the wheel本来就是很愚昧的事情,除非迫不得

至于吹嘘说什么自己编程多少年简直太可笑了,连这种基本的API是否需要都看不明白。
。。

into

【在 g**********y 的大作中提到】
: If a language is BS just because it doesn't meet one of your need, then
: perhaps there is, and will be absolutely NO good language for you.
: I programmed 20 years. Java is so far the best language I've ever used.
: Task like get free disk space is nothing to a language. Sun doesn't include
: that not because it cannot, but doesn't want to.
: I remember some comments from a book: If you put every useful function in a
: String class, then nobody will use that class anymore. Because it is
: ridiculously bloate

T*****e
发帖数: 361
19
Hi guys, be cool.
I really enjoy your discussion. Thanks.




【在 v**d 的大作中提到】
: 对于file class来说,取到文件系统的基本信息是最基本的功能之一
: 同样的如果string class没有最基本,最常用的功能,它就是垃圾
: 不要告诉我你什么都自己实现,reinvent the wheel本来就是很愚昧的事情,除非迫不得
: 已
: 至于吹嘘说什么自己编程多少年简直太可笑了,连这种基本的API是否需要都看不明白。
: 。。
:
: into

c*****t
发帖数: 1879
20
While I sympathize with your particular sitation, I felt that checking
disk size is NOT the top priority for Java programmers, because 1) there
are tons of other bugs, 2) specific issues often has to be dealt with
AFTER users have encountered. I personally could hardly ever see people
would use the check disk size functionality other than file downloaders.
Also, it is not trivial to decide the available disk space :) You only
list the Windows implementation, now what about Unix systems?
I can

【在 v**d 的大作中提到】
: 对于file class来说,取到文件系统的基本信息是最基本的功能之一
: 同样的如果string class没有最基本,最常用的功能,它就是垃圾
: 不要告诉我你什么都自己实现,reinvent the wheel本来就是很愚昧的事情,除非迫不得
: 已
: 至于吹嘘说什么自己编程多少年简直太可笑了,连这种基本的API是否需要都看不明白。
: 。。
:
: into

相关主题
请问javax.portlet包在JDK的哪个jar文件里面(在线等)现在写代码还有人开着API么?
java SE 的源代码在哪里同一个Lock锁两次,性能比较差
这个闭包怎么写?编程最重要的是逻辑思维能力
进入Java版参与讨论
v**d
发帖数: 186
21

Thus there are too many bugs in Java? LOL!
How about the transfer and manangement of large volume of data, say mirroring
a remote server for local cache?
well what i have to say is that it is really trivial ....... take a look at
the source code of Java Mustang you will know....
it really depends on what you are doing
java has some advantages over c++, e.g RTTI/reflection
but for some apps that performance is crucial we have to use c++, and some
apps demand the using of c++, such as isapi exten

【在 c*****t 的大作中提到】
: While I sympathize with your particular sitation, I felt that checking
: disk size is NOT the top priority for Java programmers, because 1) there
: are tons of other bugs, 2) specific issues often has to be dealt with
: AFTER users have encountered. I personally could hardly ever see people
: would use the check disk size functionality other than file downloaders.
: Also, it is not trivial to decide the available disk space :) You only
: list the Windows implementation, now what about Unix systems?
: I can

v**d
发帖数: 186
22

mirroring
isapi demands the using of c/c++ in fact...
ago

【在 v**d 的大作中提到】
:
: Thus there are too many bugs in Java? LOL!
: How about the transfer and manangement of large volume of data, say mirroring
: a remote server for local cache?
: well what i have to say is that it is really trivial ....... take a look at
: the source code of Java Mustang you will know....
: it really depends on what you are doing
: java has some advantages over c++, e.g RTTI/reflection
: but for some apps that performance is crucial we have to use c++, and some
: apps demand the using of c++, such as isapi exten

c*****t
发帖数: 1879
23

ago
and
Java3D is Extremely buggy :(, but it is better than nothing. Our lab has
a professor who wrote a powerful 3d image volume, surface, curve,
visualization/editing/analyzing tool in MFC, but a lot people (math people and
Medical doctors) use Mac, and our powerful image registration engine is on a
Linux cluster, and many people uses SGI. Even though my program doesn't do
much and is slow (but ok enough), it works on ALL platforms (heavy emphasis
here) with Java3D installed. I even used

【在 v**d 的大作中提到】
:
: mirroring
: isapi demands the using of c/c++ in fact...
: ago

R*******r
发帖数: 104
24

mirroring
Dude, Java is not supposed to do everything, if I have to do a job like
this. I wouldn't even consider java.
I don't think API design is trivial, other than all platform JNI
implementation,
you have to put it in context of other existing API and future features. You
can see tons of afterthought in java evolution.
ago
Java3D was buggy, but I did build some good application on it before.

【在 v**d 的大作中提到】
:
: mirroring
: isapi demands the using of c/c++ in fact...
: ago

v**d
发帖数: 186
25

你要知道很多事情不是你能够决定的,例如软件开发平台,数据库,语言等东西
我并不知道老板要干啥,我的工作主要使用c++,但是因为我对java也很熟悉,而某个功能
恰好需要java的支持,而从事这个任务的人对java并不太了解,所以要我看看技术可行性
而已
,我自己并不想做他的那些具体编程,hoho
另外一个问题是,很多技术之间有dependency,例如我前几天说的那个oracle java
stored procedure,显然用PL/SQL实现某些功能并不方便,所以oracle集成了java在里面
,而我们的产品为了性能根本不用odbc这些东西而是直接调用oci,而且大量使用stored
procedures
。当然你可能问为啥不用pro*c,我只能告诉你这个事情我说了没用,因为我的工作实际上
和这块功能没有重叠
at
You
呵呵,你这个有些牵强附会
并不是所有api都是non-trivial
跑前台估计没啥问题,但是我用的那个api估计使用的人并不多,所以有bug不足为奇

【在 R*******r 的大作中提到】
:
: mirroring
: Dude, Java is not supposed to do everything, if I have to do a job like
: this. I wouldn't even consider java.
: I don't think API design is trivial, other than all platform JNI
: implementation,
: you have to put it in context of other existing API and future features. You
: can see tons of afterthought in java evolution.
: ago
: Java3D was buggy, but I did build some good application on it before.

v**d
发帖数: 186
26

and
D,
The project i worked on is for real-time generation of some monitoring graphs,
and it demands no installation of any plugin/controls on clients' machines.
There was already a program written with MFC and opengl, but i could not reuse
the code.....
BTW i have been always thinking that you're a gal.....LOL!
features
Sometimes
java's performance is not necessarily worse than c++

【在 c*****t 的大作中提到】
:
: ago
: and
: Java3D is Extremely buggy :(, but it is better than nothing. Our lab has
: a professor who wrote a powerful 3d image volume, surface, curve,
: visualization/editing/analyzing tool in MFC, but a lot people (math people and
: Medical doctors) use Mac, and our powerful image registration engine is on a
: Linux cluster, and many people uses SGI. Even though my program doesn't do
: much and is slow (but ok enough), it works on ALL platforms (heavy emphasis
: here) with Java3D installed. I even used

v**d
发帖数: 186
27

it is much easier to use java to do network programming.....
You

【在 R*******r 的大作中提到】
:
: mirroring
: Dude, Java is not supposed to do everything, if I have to do a job like
: this. I wouldn't even consider java.
: I don't think API design is trivial, other than all platform JNI
: implementation,
: you have to put it in context of other existing API and future features. You
: can see tons of afterthought in java evolution.
: ago
: Java3D was buggy, but I did build some good application on it before.

R*******r
发帖数: 104
28
If network is the bottleneck, certainly it's fine.
Then again I don't think using JNI will be a problem anyway,
if you really need disk space info that badly.
Rarely the application you mentioned there cares migration.

【在 v**d 的大作中提到】
:
: it is much easier to use java to do network programming.....
: You

v**d
发帖数: 186
29

it is much more difficult to write complex network program in c++ ......
it is not hard to use JNI, i just hate to use JNI as that looks really stupid
told you that it is not me who makes the decision......
and commerical applications are far more complex than those course projects,
and lot of $$ have been invested on the dev and maintenance, no one can
easily migrate a huge project from c++ to java in a short time (FYI there are
more than 1,000 c++ classes in the product i am working on)

【在 R*******r 的大作中提到】
: If network is the bottleneck, certainly it's fine.
: Then again I don't think using JNI will be a problem anyway,
: if you really need disk space info that badly.
: Rarely the application you mentioned there cares migration.

v**d
发帖数: 186
30

stupid
are
furthermore jdbc's performance must be much worse than that of OCI, so it is
not qualified as a candidate at all

【在 v**d 的大作中提到】
:
: it is much more difficult to write complex network program in c++ ......
: it is not hard to use JNI, i just hate to use JNI as that looks really stupid
: told you that it is not me who makes the decision......
: and commerical applications are far more complex than those course projects,
: and lot of $$ have been invested on the dev and maintenance, no one can
: easily migrate a huge project from c++ to java in a short time (FYI there are
: more than 1,000 c++ classes in the product i am working on)

1 (共1页)
进入Java版参与讨论
相关主题
同一个Lock锁两次,性能比较差Java 2D help..
编程最重要的是逻辑思维能力Java3D or JOGL?
java.security.KeyStorehow to find out free disk space
Re: 可笑的SUN!自己写一个Oracle的JDBC driver
Java能帮我做这个project吗?How to build a java web service server?
求助Java Image Tools or APIAndroid C/C++ native calls Java APIs
如何从Java application打开windows打印机界面?再请教一个 编译错误
安装环境最麻烦了请问javax.portlet包在JDK的哪个jar文件里面(在线等)
相关话题的讨论汇总
话题: java话题: jni话题: isapi话题: api话题: disk