How to install JSK and JDBC?? Very confused

Avin Sinanan

Greenhorn

Posts: 7

posted 14 years ago

Ok so am new to this whole Java web thing. Ok so on my computer I have JDK 1.2 already installed. To run JSP and JDBC do i need JDK 1.2? Are they at all related?? What is the diffrence between JSP and JDBC? I am very confused. Please tell me how to install these things. Am usally good at code but I always have trouble with installing the software. Thanks for your time.

To get started with java web development, I would suggest getting Tomcathttp://jakarta.apache.org/tomcat There are many examples in the 'example' directory. Here is the exact download link. This is about the simplest way to install Tomcat on windows.

Tomcat is the reference implementation of a servlet container, which you will need in order to develop both servlets and JSP (JavaServer Pages).

JDBC is the API you use to connect to databases in Java. It's not limited to server-side java. ie: you can program a Swing gui to use JDBC as well. [ March 14, 2003: Message edited by: Mike Curwen ]

Avin Sinanan

Greenhorn

Posts: 7

posted 14 years ago

Mike Curwen, Hi I downloaded Tomcat (it was approximately 8.5MB). Then I tried to install it. But I was not allowed to install it. Instead they gave me an error reading. They told me they could not find a Java Development Kit. SO i was confused. What should I download. Any JDK you reccomend? I have Windows 98. Am sorry for all this trouble. But all these terms JDK and J2re and JSK is really confusing to me. I am not familiar to the Jargon. I tried doing some reading up on it and I ams still confused. SO could you or anyone out there please help me out. Thanks

Yours Respectfully<br />Avin Sinanan

Craig Jackson

Ranch Hand

Posts: 405

posted 14 years ago

Tomcat/Catalina is looking for the environment variable: %java_home%. This environment variable contains the path of the JAVA release. You will need to edit your autoexec.bat file to declare the %java_home%, for example set JAVA_HOME = c:\j2sdk1.3, then reboot your PC. Also don't forget to append %java_home%\bin to your PATH environment variable. Tomcat contains the documentation which will give you instructions on how to setup your work environment. cj

Also, the windows installer tries to examine your system for *any* JDK, not just wherever JAVA_HOME points to.

Avin, you are developing servlets and JSP's but that also means you are developing Java. You need a JDK for that. Get one from java.sun.com here

Some acronyms: JRE - Java Runtime Environment. That's what an end-user needs to run java programs. It's kinda like having the correct dll's or the .NET framework, if you're familiar with Windows development.

JDK - Java Development Kit. This is what a Developer needs to create Java programs. It contains the compiler and other tools for developers. Again, the windows equivalent is like having Visual Studio.

J2ME/J2SE/J2EE - Java has 3 'flavours'. ME is the 'Micro edition' and it develops and runs programs for cell phones, hand-held devices, PDA's etc... SE is the 'standard java' one, that is for desktop pcs. With this, you can create GUI applications (among LOTS of other things). EE is for Enterprise development, and has things like EJBs and JSPs and Servlets.

Craig Jackson

Ranch Hand

Posts: 405

posted 14 years ago

Avin, since you stated that:

Ok so on my computer I have JDK 1.2 already installed.

I believe all you have to do now is ... * Set an environment variable JAVA_HOME to the pathname of the directory into which you installed the JDK release. Craig

But in Avin's other post he shows us the following:Welcome to the JavaTM 2 Standard Edition Runtime Environment

Which is a runtime. And JAVA_HOME is only used by programs 'aware' of that variable. What's really important is placing the JDK into the system PATH. In that way, when you type 'javac' at a command prompt, you won't get 'Bad Command or Filename'

For Avin specifically: You can have both a JRE and JDK on your system, but the JDK *must* be in your path to invoke it from the command line.

IDE's like JCreatorLE probably don't require that the JDK be in your 'path', because they either install their own JDK in a 'known' (to them) location, or use a system variable *like* JAVA_HOME

Craig Jackson

Ranch Hand

Posts: 405

posted 14 years ago

Thanks, Mike I just noticed Avin's other post. First, I would have to agree with Chanoch. Avin, I would also recommnend, that you invest in a book(s)/tutorial to help you get an understanding of the basics of the java language and or jsp/servlet container or whatever it might be. Javaranch has an excellent selection of recommended books based on several levels of expertise. BunkHouse. And several of these books may be found on the internet for free. I hope this helps. craig.