Hi,

You probably a Java newbie ;-) 
Two possibilities to solve your problem:
1- The import statement require the fully qualified classname. Its usually someting 
like com.sun.subpacakge.MyClass. In your case SQLRConnection is not the full 
classname. Look in the javadoc API or in the pacakge statement in the source of the 
class.
2- Ensure the javac classspath include the jar containing the SQLRConnection class or 
the path of the class file.

good luck

Yvan 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 6:14 AM
To: [EMAIL PROTECTED]
Subject: Problen with compilations


Hi all!

        I am trying to write a java program but I have problems with the compilation. 
The javac don't find the jar or 
class archives that I need. 
        I try to compile the following code:

import SQLRConnection;

public class MyClass {
       public static void main() {

//                SQLRConnection      
con=SQLRConnection("host",9000,"","user","password",0,1);
//                con.delete();
        }
}


        I want to setup a conection to a DataBase through a SQLRelay but the javac 
report this:

xxxxx@xxxxx:~/.netbeans/prueba$ javac  -classpath 
.:/usr/share/java/firstworks-sqlr.jar 
MyClass.java
MyClass.java:1: '.' expected
import SQLRConnection;
                     ^
1 error

        If I add '.*' to the end of the import line, javac report tha the package does 
not exist.
        The directory tha allocate the library have the following rigth:

-rw-r--r--    1 root     root         2095 2002-06-15 21:49 firstworks-sqlr.jar
-rw-r--r--    1 root     root      2903914 2002-09-24 15:29 libgcj-3.2.1.jar
-rw-r--r--    1 root     root      1768205 2002-04-08 00:47 libgcj.jar
-rw-r--r--    1 root     root        86460 2002-06-15 21:49 libSQLRConnection.so
-rw-r--r--    1 root     root       105964 2002-06-15 21:49 libSQLRCursor.so
-rw-r--r--    1 root     root        95050 2002-05-26 14:35 postgresql-7.2.jar
lrwxrwxrwx    1 root     root           18 2002-12-10 13:11 postgresql.jar -> 
postgresql-7.2.jar

        The variables ar set to:
$echo $JAVA_HOME
/usr/lib/j2se/1.4

$ echo $PATH
/usr/lib/j2se/1.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/
X11:/usr/games
EUR
$ which javac
/usr/lib/j2se/1.4/bin/javac

        
        Can anyone tellme what happened?

                Marcelo



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to