Things i didn't know were in the JDK

A

Arne Vajhøj

A webserver:

http://java.sun.com/javase/6/docs/j...c/com/sun/net/httpserver/package-summary.html

Move over Jetty!

It's in com.sun, so i guess this is not strictly part of the java API,
but it's there, it's documented (hey, it says 'spec' in the URL!), and
it looks like it's meant to be used. Since 1.6, which is perhaps why i
never noticed it before.

It is not in the regular API docs.

So even though it is documented, then it is not part
of the Java standard.

It is known about. Google finds:
http://blogs.sun.com/michaelmcm/entry/http_server_api_in_java

http://blogs.operationaldynamics.com/andrew/software/free-java/sun-secret-webserver.html
etc.

Arne
 
L

Lew

It is not in the regular API docs.

So even though it is documented, then it is not part
of the Java standard.

Lots of libraries are documented without being part of the Java standard.
There's nothing odd about that. Heck, I myself have even written Java
libraries that are documented.
 
A

Arne Vajhøj

Lots of libraries are documented without being part of the Java
standard. There's nothing odd about that. Heck, I myself have even
written Java libraries that are documented.

Java libraries with matching documentation is very common.

But this case is a bit more complex. This is a library that
already have an existing official documentation. And a
library that i supposed to allow other to implement a compatible
implementation using the official docs.

If some wrote and app and used one of your libraries and had
to switch from SUN to IBM Java, then it would work automatically
as long as your jar files were in classpath.

If someone uses SUN classes in rt.jar and have to switch from
SUN to IBM Java, then I could see lots of potential problems.

Arne
 
M

markspace

Tom said:


This might be a good general subject for mutual education. I didn't
know about that either.

Some things I've learned about that I wouldn't have thought to look for:

Java Dynamic Proxy:

http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-proxy.html
http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html


Java DB:

http://developers.sun.com/javadb/reference/index.jsp

A SQL database that comes with the JDK. Add it to your Java
applications! Free!
 
T

Tom Anderson

This might be a good general subject for mutual education. I didn't know
about that either.

Some things I've learned about that I wouldn't have thought to look for:

Java Dynamic Proxy:
http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-proxy.html
http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html

Java DB:
http://developers.sun.com/javadb/reference/index.jsp

A SQL database that comes with the JDK. Add it to your Java applications!
Free!

The ServiceLoader class and its associated jar file metainfo rules:

http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#Service Provider

Which standardise and simplify the implementation of plugin-like
behaviour.

tom
 
A

Arne Vajhøj

Some things I've learned about that I wouldn't have thought to look for:

Java Dynamic Proxy:

http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-proxy.html
http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html

I knew about that.

But it is definitely something flying below most peoples
radar.

I would prefer an AOP framework like AspectJ over it though.
Java DB:

http://developers.sun.com/javadb/reference/index.jsp

A SQL database that comes with the JDK. Add it to your Java
applications! Free!

I believe that is mentioned 5-10 times every months here in cljp.

Arne
 
A

Arne Vajhøj

Aside from being part of the JDK, what's the benefit to using JavaDB
instead of sqlite?

For embedded I can not see much.

But JavaDB=Derby is also a database server.

Arne
 
M

Martin Gregorie

(actually, when I go to Vista's "Programs and Features", there's the JDK
listed in one place, and JavaDB is listed as a separate application,
which is interesting...)
That's to be expected: the actions of starting, stopping, configuring and
backing up a database server or using the database maintenance utilities
are not in any way connected to the actions involved in using the Java
compiler or developer tools. In addition, they are generally separated
from running Java programs that access the database apart from the
necessity for the database server to running.
 
L

Lew

Steve said:
Aside from being part of the JDK, what's the benefit to using JavaDB
instead of sqlite?

For that you'd have to go to their respective sites (use the Apache Derby site
for more details on Java DB).

Java DB/Derby is an excellent product, very SQL-standard compliant and usable
either as a server or embedded. I don't know anything about SQLite.
 
A

Arne Vajhøj

For that you'd have to go to their respective sites (use the Apache
Derby site for more details on Java DB).

Java DB/Derby is an excellent product, very SQL-standard compliant and
usable either as a server or embedded. I don't know anything about SQLite.

It is a nice little embedded database that works fine in many languages.

Most likely you are using it - FireFox, ThunderBird and Skype
all use it internally.

Arne
 
A

Arne Vajhøj

right-o.... didn't realize it was Derby. :)

sqlite is designed for use in "serverless" environments.

JavaDB/Derby can be used in serverless environments as well,
but only from Java (in server mode it should be usable from
non-Java via ODBC and DB2 client, but even there it is
mostly Java only).

Arne
 
V

Volker Borchert

Steve said:
(actually, when I go to Vista's "Programs and Features", there's the JDK
listed in one place, and JavaDB is listed as a separate application,
which is interesting...)

Even more, eh, interesting is where it installs itself...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top