Beginner question
Hi,
I set up JAVA_HOME path for Apache Tomcat 4.1
to .;C:\jdk1.3.1-18 but when I try to run 'startup' it says that I didn't configure java_home path properly, that it should point to jdk instead to jre and that system cannot find file -sun.io.useCanonCaches=false ? I'm using J2EE 1.4 SDK.
I have a servlet. So I compiled it and it generated a .class file. To run it, do I need something else more to do or? I'm using this servlet with a J2ME application that needs database connection and when I run it it doesn't work properly, the problem is when servlet sends data back to emulator. I get a whole bunch of text on emulator screen.
I'll be very thankfull if you give a solutions to my problems.
[736 byte] By [
Ivan_Fa] at [2007-10-2 17:00:14]

> .;C:\jdk1.3.1-18
That looks more like the CLASSPATH than JAVA_HOME. JAVA_HOME should only contain the complete path to your JDK installation directory.
As for the "bunch of text" problem, are you setting the right content-type? You can change the content-type with the following code:
response.setContentType("YOUR_CONTENT_TYPE");
Call this before generating any output. You need to replace YOUR_CONTENT_TYPE with the actual content type that the device is expecting. An example would be:
response.setContentType("text/vnd.wap.wml");
Being a beginner i would recomment you use any ide like Netbeans which can be downloaded for free. There are other ides to develop java applications. You can do a search to find a best ide that suits you.
http://www.google.com/search?hl=en&q=IDE+to+develop+java+applications&btnG=Google+Search
Somehow I menaged to solve JAVA_HOME problem, but now I have another. I executed startup.bat file, and then I write in my browser http://localhost:8080/ but it says 'page not found'. I realized that I have JDK 1.1. Could that be the reason for my problem? Do I need to download 1.3?
Whoa dude.
First of all, J2EE 1.4 has the Java 1.5 JDK packaged with it, unless you specifically only downloaded the appserver. Your directory is called "C:\jdk1.3.1-18" (which seems to indicate that you actually have JDK 1.3) and now you are stating that you have JDK 1.1...
My advice to you: remove all the java stuff and start fresh. Download the 1.5 JDK and install that. Point the JAVA_HOME to the directory where you install this JDK. Then download Apache Tomcat and install that, as a beginner you have little benefit from J2EE, start with Tomcat.
Optionally you can skip Tomcat and install Netbeans like a previous poster suggested, Netbeans also comes with a Tomcat version.
Ok, if I understand correctly, to run and test servlets it's enough to have just tomcat and JDK right? So I don't need at all J2EE with server, etc.?
As I wrote, I just need to test my J2ME application connection with servlet and then servlet connection with mysql. I've already install and configure mysql, now I'm just having problems configuring server properly to start testing my servlets
Thanks...