Install JSDK problems?

I just downloaded the jsdk1.4 for win. When compiling any file with the import javax line on it i get the following error:

hola.java:1: packag

import javax.*;

^

1 error

I already have added the jdk1.4\bin path and still doesnt work

Can any body help me?

[310 byte] By [iazurita] at [2007-9-26 2:48:10]
# 1
Looks like you need to compile with the -classpath option, i.e. javac -classpath c:\jdk1.4\lib myclass.classin the lib will be a '<filename>.jar' which contains all the standard JDK javax classes. Hope this helps.
garethrees at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I just tried and It didnt work either.I have dt.jar, tools.jar and htmlconverter.jar files on the lib directory. Do I need some other .jar fiels?
iazurita at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
you may need to place servlet.jar in the class path for javax.* classes
vishvesh_obla at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Do I need to download it from some place else, cause after the instalation of jdk1.4 its not on my computer?
iazurita at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
I downloaded a Servlet.jar file from the sun site and compiled qith the next line:javac -classpath c:\jdk1.4\lib\Servlet.jar HelloServlet.javaand still got package "javax does not exist"
iazurita at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

Sorry just seen what the problem is, you are trying to import a set of packages, which I dont think you can do.

i.e.

import javax.*would try to import javax.swing.*, javax.<anyother>.* etc.

you will need to specify them on spereate lines.

import javax.swing.*

import javax.swing.border.*

import javax.swing.event.*

and so on.. including all the packages you require.

Hope this solves the problem?

garethrees at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
I just did what u told me and it worked for javac.swing.*What I need now is to make it work for:import java.io.IOException;import javax.servlet.*;import javax.servlet.http.*;cause Im compiling a servlet
iazurita at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8
then include in your importsimport java.io.IOException;import javax.servlet.*;import javax.servlet.http.*;and it should be okay, if the packages are in the classpath.:)
garethrees at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 9
The thing is that when i use this classes I get the same error.What could I do now?
iazurita at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 10
you will need to ensure that the standard JDK jar and the Servlet Jar are both in the classpath. try that.. if not, post your environment vars, PATH CLASSPATH, and copy and paste how you run the Java App. This might give us some more clues.G
garethrees at 2007-6-29 10:33:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...