Dave P

Greenhorn
+ Follow
since Jun 05, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dave P

Okay, I figured it out myself. I put a System.Exit(0) in my contextlistener class when tomcat tells it to shutdown.
contextDestroyed(ServletContextEvent event) {
Naming.unbind();
system.exit(0);
}
21 years ago
Here are the threads tomcat leaves running:
org.apache.catalina.startup.Bootstrap at localhost:5442
System Thread [Finalizer] (Running)
System Thread [Reference Handler] (Running)
System Thread [Signal Dispatcher] (Running)
System Thread [RMI TCP Accept-0] (Running)
Thread [Thread-2] (Running)
System Thread [RMI Reaper] (Running)
System Thread [GC Daemon] (Running)
System Thread [RMI LeaseChecker] (Running)
Thread [Thread-3] (Running)
Thread [Thread-6] (Running)
Thread [DestroyJavaVM] (Running)
System Thread [RMI TCP Connection(12)-10.72.104.54] (Running)
21 years ago
Try checking out the java techtip at this url:
http://developer.java.sun.com/developer/JDCTechTips/2001/tt0227.html
Life Cycle of an RMI server.
Does anyone know how to force Tomcat 4.1 to shutdown the RMI framework? I have a lot of RMI threads that don't shutdown after I shut down my RMI context listener. It just uses the Naming Class. I do an unbind() and then my thread dies successfully, but tomcat seems to leave the RMI context running.
21 years ago
Yes, you can use the jspc task in ant to precompile your jsp files into .java files. You can also postcompile those .java files into .class files. Read this link: http://ant.apache.org/manual/OptionalTasks/jspc.html
However, I'll warn you that jspc will create the proper directory structure including subdirectories, but it doesn't put subdirectory information into the .java package declaration. Everything is stuffed into a single package. This means that if you have
maindir/subdir1/index.jsp
and
maindir/subdir2/index.jsp, you'll end up with 2
index_jsp.java files which BOTH have package
maindir. subdir1 and subdir2 won't be put into the package name.
If anyone knows how to get around this, please shout!
21 years ago
JSP
Anyone know how to get eclipse to switch it's java.home environment variable? It doesn't take the windows environment setting. You can see this via Eclipse->help->configuration details. I even went into windows->preferences->java->Installed JREs and added c:/j2sdk1.4.1 to it. This is the SDK, not the the plain old JRE. I made that my active JRE and restarted eclipse. Eclipse is still using c:/program files/java/j2re1.4.1 instead.
???
Thanks, Dave
java.class.path=C:\Program Files\eclipse\startup.jar
java.class.version=48.0
java.endorsed.dirs=C:\Program Files\Java\j2re1.4.1\lib\endorsed
java.ext.dirs=C:\Program Files\Java\j2re1.4.1\lib\ext
java.home=C:\Program Files\Java\j2re1.4.1
Hmm... for some reason my reply lost my < javac.
< javac debug="true" deprecation="false" destdir="classes" srcdir="source" fork="yes" executable="/j2sdk1.4.1/bin/javac">
I'll add a couple of spaces in front of javac to see if that works to get this posted properly.
1. You need to download ANT version 1.5 if you haven't already.
2. Change Eclipse to use 1.5 via windows->preferences->External Tools->Ant
3. AddJar pointing to ANT 1.5 ant.jar and optional.jar
4. Remove the eclipse 1.4 ant.jar and optional.jar.
5. Hard code the path to your jdk1.4.1 javac executable:
<javac debug="true" deprecation="false" destdir="classes" srcdir="source" fork="yes" executable="/j2sdk1.4.1/bin/javac">
You have to hardcode the path and not use environment variables. If you Look at Eclipse->Help->About Eclipse->Configuration Details, you'll note that Eclipse is ignoring your environment variable JAVA_HOME and using it's own. I'll see if I make it use the right one.
Good luck.
D
1. IE6 pre-release does not download/upgrade Java unless you custom install it.
2. IE6 will however utilize whatever jvm (java virtual machine) you already have installed on your machine.
3. If you don't custom install IE6, your only choice to get a new java version is that you 'may' be able to do it when you upgrade your OS.
4. Keep in mind that these 'upgrades' of the jvm are all extremely old (java 1.1), which is incidently what the whole lawsuit with Sun was about.
5. WindowsXP will come with IE6, but may or may not come with a JVM. Does anyone know? I suggest that anyone concerned about this go to the windows XP newsgroups and complain bitterly! http://www.microsoft.com/windowsxp/expertzone/newsgroups/default.asp
6. If WindowsXP doesn't come with a JVM, it doesn't appear likely that any of the OEM vendors (e.g. Dell, Compaq, etc) will bundle one in with the OS (even though it's free from Sun and will save their customers download time -- assuming they can figure out how to do it) as they are afraid of crossing Microsoft. Feel free to complain to them too.
22 years ago