Off Topic Cafe If it doesn't belong in any of the other forums. Post all Off Topic stuff here.

Need Java Programming Help - Installation/setup

Thread Tools
 
Old Jan 26, 2006 | 11:59 PM
  #1  
majik's Avatar
Thread Starter
Administrator
 
Joined: Oct 2002
Posts: 13,943
Likes: 0
From: ɯooɹpǝq ɹnoʎ
Vehicle: ǝdnoɔ sısǝuǝƃ
Default

I've been taking Java, SQL Development, and Oracle 9i classes at school. I do all my work at the computer labs on campus, but getting into my Java Servlets class, I need to do some work at home. I've installed a bunch of stuff, and open up TextPad to compile my .java file, but it won't compile. It's not finding any of the classes. I figured they would have been installed with the J2SDK install. I've never actually set everything up on a computer, so I need help so I can work on this stuff from home.

So far I've installed:
Jakarta Apache Tomcat 5.5
J2SDK 1.4.2
TextPad 4.4.2

I've searched Sun's website but don't know what to search for. Where do I download the class files and do I need to put the classes in a certain folder? It sounds like such a newb question, but they haven't shown us how to set it all up, just how to figure out the code.


C\*****\****\Desktop\HelloWorld.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
Reply
Old Jan 27, 2006 | 05:51 AM
  #2  
brian01tib's Avatar
Senior Member
 
Joined: Mar 2006
Posts: 1,864
Likes: 0
Vehicle: 2001/Hyundai/Tiburon
Default

http://www.jcreator.com/ you need jcreator too. Its so you can type your code in and stuff. If you need anyhelp I probally can I should be working on a car program all day sad.gif has to be like 3000 lines or something huge. That should work later fing02.gif
Reply
Old Jan 27, 2006 | 07:10 AM
  #3  
mr_jeckel's Avatar
Senior Member
 
Joined: Aug 2005
Posts: 174
Likes: 0
Default

You have to run the javac program in the correct folder. The compiler(technically, it is not really a compiler because java is run differently than other languages) should be sitting in a Program Files directory. The import and include statements are like directory structures. If you say, import javax.servlet, it is looking in the base directory for the javax class. Then it looks for the servlet class under the first class. If you try to compile from any random spot, it does not know where to look for the classes. Getting Java to work with Windows can be a pain at first. You can also try adding the location of your Java classes to the windows 'PATH' variable so that the program knows where the classes are hidden. Using JCreator will be your best bet though. It should make things at least a bit easier. Hope that helps.
Reply




All times are GMT -6. The time now is 01:17 PM.