Using List Class in java.awt / java.util ?

have a program that:
import java.util.*;
List list = new LinkedList();
list = new ArrayList();
... read a file and add elements to array
use a static setter
StaticGettersSetters.setArray(list);
next program:
import java.awt.*;
public static java.util.List queryArray =
StaticGettersSetters.getArray();
If I don't define queryArray with the package and class, the compiler
gives an error that the List class in java.awt is invalid for queryArray.
If I import the util package, import java.util.*; , the compiler
gives an error that the list class is ambiguous.
Question:
If you using a class that exists in multiple packages, is the above declaration of queryArray the only way to declare it ?
Just curious...
Thanks for your help,
YAM-SSM

So what you have to do is explicitly tell the compiler which one you really want by spelling out the fully-resolved class name:
import java.awt.*;
import java.sql.*;
import java.util.*;
public class ClashTest
    public static void main(String [] args)
        java.util.Date today    = new java.util.Date();
        java.util.List argsList = Arrays.asList(args);
        System.out.println(today);
        System.out.println(argsList);
}No problems here. - MOD

Similar Messages

  • How to use URL class to execute a java class/app  on a remote machine?

    I am a beginner in Java networking and have a question about URL programming.
    How do I pass parameters to a java class/application over the web and then cause it to execute ? I then want to get the result back from the clas/app. The class/app resides on a remote machine and the protocol used is "http" protocol. OR all this is not possible through the URL and related classes ?

    How do I pass parameters to a java class/application over the web and then cause it to execute ? Using the HTTP protocl you can either perform a GET where the parameters are in the URL or a POST where the data is sent to the server with the request.
    The server must be setup as a web server to execute code based ojn a HTTP request. Using a web server with a JSP which contains the code to execute is the simplest way to do this.
    I then want to get the result back from the clas/app. The output of the JSP becomes in the data returned by the HTTP request.
    I would suggest looking for example on google.
    http://www.google.co.uk/search?q=java+http+request+tutorial
    Another option is to use RMI. The integration is tighter but it does not use the HTTP protocol.

  • How to use inner class in axis2 in java?

    Hi,
    Iam very new in axis2. My language is java. What iam trying to do is, i need to create a xml format for the clients to send data to server using axis2 service.
    My demo xml format is,
    <test1>
    <test2>
    <test3>
    <test4></test4>
    <test5></test5>
    </test3>
    <test3>
    <test4></test4>
    <test5></test5>
    </test3>
    </test2>
    </test1>
    Iam trying to use nested inner class to generate this xml. Below is my demo java class. But unfortunately, or may be lac of knowledge, iam unable to create sub trees.
    public class EchoService{
    public MyInnerClass retMyInnerClass(MyInnerClass test1) {
    return test1;
    public class MyInnerClass {
    private String test2;
    public MyInnerClass() { }
    public void setTest2(String test2) {
    this.test2 = test2;
    public String getTest2() {
    return this.test2;
    Please help me to generate the web service for client.
    Thanks in advance.

    847897 wrote:
    well, i apologies for that fault. But i need the answer. It is urgent.That's your problem, not ours. However, I don't see the connection between your inner class and producing XML subtrees. Perhaps if you explained the problem, rather than your solution...
    [url http://sscce.org/]This page is usually a good place to start; otherwise [url http://www.catb.org/~esr/faqs/smart-questions.html]this one.
    Winston

  • Cannot find package java.awt

    hi,
    i am trying to compile my project code and i keep on getting the following two errors " package java.awt does not exist " and " package java.awt.events does not exist " why is this happening? Is there any special classpath that needs to be set? Or any other thing? please help....

    Are you importing using import java.awt.*; or import java.awt;
    java.awt.events does not exist. Try java.awt.event instead.
    Please post your import statements.

  • Using text in a GUI without using .swing classes

    In a Java application, is there any way to create a text object that can be positioned in a GUI like an ImageIcon (using a class from the standard Java API)? For example, when using ImageIcon, you feed the x and y-coordinates, whereas with .swing, you'd have to create a new panel, position the panel, and re-position the panel using BorderLayout.(direction).
    Ex. (with ImageIcon, you'd place it like so):
    //construct ImageIcon w/ URL
    ImageIcon myImage = new ImageIcon(new URL("http://..."));
    //x and y are pixels to the right and to the bottom from the top left corner
    myImage.paintIcon( (Component), (Graphics), x, y);
    //I'm looking for one that does the same, like this (without using an image, preferrably), TextMessage is what the class might be:
    TextMessage myText = new TextMessage("Here is some string to print out");
    myText.printText( (Component), (Graphics), x, y)

    or you can paint a string, like this
    public void paint(Graphics g) {
         super.paint(g);
         g.drawString("Hello World!", x,y);  // replace x, y with your own coordinates
    }hope that helps

  • How to create a tree structure using list items(tlist)

    HI every one,
    As we know how to create a tree structure using Hierarchy item type.
    We have a requirement to create The same tree like structure using List Item(Tlist)
    I would be so appreciated If you send with an example
    Thanks
    RangaReddy

    Hi all
    Any one help me please
    Actually our client requirement is creation of tree structure using list item,similar to what we used in oracle Application(FNDSCSGN) form.We did the tree structure using hierarchy tree using Htree and Ftree.It working excelently.For client requirement, we want to use list item.How PJC(Pluggable Java Components) is useful for using list item(Tlist).I can't understand how it is useful.
    Do you have any example please help me.
    Thanks
    RangaReddy

  • I can't use Math.class

    I can't use Math.class although I import java.lang.*.
    plz help me.

    and tell us what you mean by "can't use"My father began to work a PC as he was already
    retired. He has been fighting with it ever since.
    Sometimes he calls me for help crying "everthying has
    disappeared!"
    I ask him: "What is 'everything' and what does it
    mean 'disappeared'?"you could then go on to throw a further spanner in the works by asking what "has" means :)

  • Problems changing colour using Graphics class in java.awt

    Hi,
    The problem only happens when more than two images are on a panel. In this case, I have to strings that are drawn. The first drawn string is called "A" the second drawn string is called "B". However, when i change the colour of "B" to let's say Red, the panel erases the letter "B" and insteads changes "A" to red. How can I fix this so that when the user chooses the colour red it changes the colour of the latest drawn string and not the first one. please help!!!!
    import java.awt.*;
    public class StringPanel extends GBPanel
         private String shape = "clear", str;
         private int x, y;
         private Color color = Color.black;
         public void paintComponent(Graphics g)
              super.paintComponent(g);
              g.setColor (color);
              if(shape.equalsIgnoreCase("draw string"))
                   g.setColor(color);
                   g.drawString(str, x, y);
              else if (shape.equalsIgnoreCase("exit"))
                   System.exit(0);
         public void drawCurve(Color color)
         this.color = color;
         repaint();
         public void drawString(String shape, String str, int x, int y)
              this.shape = shape;
              this.str = str;
              this.x = x;
              this.y = y;
              repaint();
         public void drawString1(String shape, String str, int x, int y)
              Graphics g = getGraphics();
              g.setColor(color);
              if (shape.equalsIgnoreCase("draw string"))
                   g.setColor(color);
                   g.drawString(str, x, y);
              else
                   repaint();
    }

    well, as I said, I can't remember what the update method thing was for... I think it was related to not clearing the screen first.
    Anyway, if you maintain a list of objects that should be drawn and then in the paintComponent method, loop thru the list of objects and redraw them, it will work. Then you change the state of an object and call repaint. When you are going to change color, you need to, in effect, redraw the entire affected area. Now this can be done partially with clipping, but it's complicated to deal with that. So the simplest way is just redraw everything on repaint.

  • Can't find class when i use java.awt.Panel

    I got a Pocket PC with CE 3.0
    I made my first PJava application just a few hours ago. And it works fine. But when i introduce a Panel to improve the interface then application fails on the Pocket PC with the error message "could not find class application". When i remove the Panel it works fine again.
    I thought that java.awt.* is part of PJava. And even if not i should be able to introduce even a java.lang.* class to the PJava application if i use the JAR.
    Any suggestion?

    you should provide more detail about your deployment procedures.
    There are many ways to get this message. AWT in fact is part of pJava and works fine for most of us. So I assume the deployment is the problem. Have you checked the actual content of the JAR? Have you provided a path statement? How do you call your app (shortcut?)

  • Problem with Horizontal Scroll on java.awt.List

    I use the same code for a General Application as a CDC Application.
    I have no problem at all with the General Application but on the CDC I can't scroll to the right (horizontal).
    Why do I get this problem on the CDC application and not on a regular application?
    I use the PP-1.0 Profile for the CDC application. Does it not support horizontal scroll on java.awt.List?
    This is the code:
    * Main.java
    * Created on den 22 augusti 2007, 10:52
    package cdcapplication6;
    * @author  Erik Rothman
    public class Main extends java.awt.Frame {
        /** Creates new form Main */
        public Main() {
            initComponents();
              for (int i = 0; i < 10; i++) {
                   list1.add("Short text");
                   list1.add("Some very long text indeed. Some very long text indeed.");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            list1 = new java.awt.List();
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            add(list1, java.awt.BorderLayout.CENTER);
            pack();
        }// </editor-fold>                       
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {                         
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
        // Variables declaration - do not modify                    
        private java.awt.List list1;
        // End of variables declaration                  
    }

    I use the same code for a General Application as a CDC Application.
    I have no problem at all with the General Application but on the CDC I can't scroll to the right (horizontal).
    Why do I get this problem on the CDC application and not on a regular application?
    I use the PP-1.0 Profile for the CDC application. Does it not support horizontal scroll on java.awt.List?
    This is the code:
    * Main.java
    * Created on den 22 augusti 2007, 10:52
    package cdcapplication6;
    * @author  Erik Rothman
    public class Main extends java.awt.Frame {
        /** Creates new form Main */
        public Main() {
            initComponents();
              for (int i = 0; i < 10; i++) {
                   list1.add("Short text");
                   list1.add("Some very long text indeed. Some very long text indeed.");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            list1 = new java.awt.List();
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            add(list1, java.awt.BorderLayout.CENTER);
            pack();
        }// </editor-fold>                       
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {                         
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Main().setVisible(true);
        // Variables declaration - do not modify                    
        private java.awt.List list1;
        // End of variables declaration                  
    }

  • Java6: How to compile java using JavaCompiler class

    Hi all,
    Using JavaCompiler, we can run the java program thru programmaticaly using run() method.
    Could anyone please tell me how to compile a java program using JavaCompailer class? Or calling run() itself will compile java file?
    Thanks
    Shagil

    import spoon.support.input.SpoonInputStream;
    import com.sun.tools.javac.code.Symbol.ClassSymbol;
    import com.sun.tools.javac.comp.Attr;
    import com.sun.tools.javac.comp.AttrContext;
    import com.sun.tools.javac.comp.Enter;
    import com.sun.tools.javac.comp.Env;
    import com.sun.tools.javac.comp.Todo;
    import com.sun.tools.javac.tree.Tree;
    import com.sun.tools.javac.tree.Tree.ClassDef;
    import com.sun.tools.javac.tree.Tree.TopLevel;
    import com.sun.tools.javac.util.Abort;
    import com.sun.tools.javac.util.Context;
    import com.sun.tools.javac.util.List;
    import com.sun.tools.javac.util.ListBuffer;
    import com.sun.tools.javac.util.Log;
    import com.sun.tools.javac.util.Name;
    * The Spoon compiler (uses javac).
    public class SpoonCompiler extends com.sun.tools.javac.main.JavaCompiler {
         Attr attr;
         Enter enter;
         boolean hasBeenUsed = false;
         Log log;
         Todo todo;
         public SpoonCompiler(Context arg0) {
              super(arg0);
              enter = Enter.instance(arg0);
              todo = Todo.instance(arg0);
              log = Log.instance(arg0);
              attr = Attr.instance(arg0);
              sourceOutput=true;
          * Main method: compile a list of files, return all compiled classes
          * @param filenames
          *            The names of all files to be compiled.
         @SuppressWarnings("unused")
         public List<Tree> parseAndAttribute(List<SpoonInputStream> filenames)
                   throws Throwable {
              // as a JavaCompiler can only be used once, throw an exception if
              // it has been used before.
              assert !hasBeenUsed : "attempt to reuse JavaCompiler";
              hasBeenUsed = true;
              long msec = System.currentTimeMillis();
              ListBuffer<ClassSymbol> classes = new ListBuffer<ClassSymbol>();
              try {
                   // parse all files
                   ListBuffer<Tree> trees = new ListBuffer<Tree>();
                   for (List<SpoonInputStream> l = filenames; l.nonEmpty(); l = l.tail) {
                        trees.append(parse(l.head.getFileName(),l.head.getStream()));
                   // enter symbols for all files
                   List<Tree> roots = trees.toList();
                   if (errorCount() == 0)
                        enter.main(roots);
                   // If generating source, remember the classes declared in
                   // the original compilation units listed on the command line.
                   List<ClassDef> rootClasses = null;
                   if (sourceOutput || stubOutput) {
                        ListBuffer<ClassDef> cdefs = new ListBuffer<ClassDef>();
                        for (List<Tree> l = roots; l.nonEmpty(); l = l.tail) {
                             for (List<Tree> defs = ((TopLevel) l.head).defs; defs
                                       .nonEmpty(); defs = defs.tail) {
                                  if (defs.head instanceof ClassDef)
                                       cdefs.append((ClassDef) defs.head);
                        rootClasses = cdefs.toList();
                   while (todo.nonEmpty()) {
                        Env<AttrContext> env = todo.next();
                        // save tree prior to rewriting
                        Tree untranslated = env.tree;
                        // attribution phase
                        if (verbose)
                             printVerbose("checking.attribution", env.enclClass.sym);
                        Name prev = log.useSource(env.enclClass.sym.sourcefile);
                        attr.attribClass(env.tree.pos, env.enclClass.sym);
                   return trees.toList();
              } catch (Abort ex) {
                   ex.printStackTrace();
              if (verbose)
                   printVerbose("total", Long.toString(System.currentTimeMillis()
                             - msec));
              int errCount = errorCount();
              if (errCount == 1)
                   printerCount("error", errCount);
              else
                   printerCount("error.plural", errCount);
              if (log.nwarnings == 1)
                   printerCount("warn", log.nwarnings);
              else
                   printerCount("warn.plural", log.nwarnings);
              return null;
         private void printerCount(String str, int val) {
              System.err.println(str + " - " + val);
         private void printVerbose(String arg0, Object obj) {
              System.out.println(arg0 + " - " + obj.toString());
    --- NEW FILE: CtBuilder.java ---
    package spoon.support.builder;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.Stack;
    import java.util.TreeSet;
    import spoon.query.Query;
    import spoon.query.TypeFilter;
    import spoon.reflect.CtFactory;
    import spoon.reflect.code.BinaryOperatorKind;
    import spoon.reflect.code.CtAbstractInvocation;
    import spoon.reflect.code.CtArrayAccess;
    import spoon.reflect.code.CtAssert;
    import spoon.reflect.code.CtAssignment;
    import spoon.reflect.code.CtBinaryOperator;
    [...1760 lines suppressed...]
                var.setSimpleName(tree.sym.name.toString());
                var.setModifiers(getModifiers(tree.mods.flags));
                enter(var, tree);
                scan(tree.init);
                exit(var, tree);
        @Override
        public void visitWhileLoop(WhileLoop tree) {
            CtWhile whileLoop = new CtWhileImpl();
            enter(whileLoop, tree);
            builderContext.loopParameter = 1;
            scan(tree.cond);
            builderContext.loopParameter = 0;
            scan(tree.body);
            exit(whileLoop, tree);
    }

  • Import the classes in the package java.util

    I haven't taken a class in two years so I have ideas but am unsure of myself, and I most likely am way off base, but is this how you import the classes in the package java.util
    import java.util.*;
    I would appreciate anyone's help. I have a lot of questions.
    Thanks,
    rp

    My assignment is below so that you will know exactly what I am asking. I am being asked to create an instance of LinkedList. I know that this is a part of the java.util. So when you create an instance of LinkedList would that be similar to instance variables? or am I misunderstanding something. I have several ideas, so I will start with the first one.
    LinkList();
    I really appreciate your taking the time to answer my questions to help me to rebuild my confidence in doing this.
    Thanks,
    // 2. import the classes in the package java.util
    public class MyProgram
         public static void main(String [] args)
              // 3. Create an instance of LinkedList
              // 4. add 5 entries to the list so that it contains
              //     Ann, Bart, Carl, Dirk, Zak
              // 5. display the list on one line using a loop and ADT list methods
              System.out.println("\n\n3. ");
              // 6. display the list using one println
              System.out.println("\n\n4. ");
              // 7. create a ListIterator object for the list
              // 8. display the list on one line using the iterator
              System.out.println("\n\n6. ");
              // 9. restore the iterator to the first item in the list
              // 10. retrieve and display the first item in the iteration,
              //      then advance the iterator to the next item
              System.out.println("\n\n8. ");
              // 11. advance the iterator to the end of the list without displaying anything;
              //      do not use the length of the list
              // 12. display the last item in the list
              System.out.println("\n\n10. ");
              // 13. move back to the beginning of the list without displaying anything;
              //      do not use the length of the list
              // 14. display the first item in the list
              System.out.println("\n\n12. ");
              // 15. advance the iterator to the end of the list without displaying anything;
              // 16. advance the iterator - what happens?
              System.out.println("\n\n14. ");
              // 17. advance the iterator within a try block; catch the exception, display a message,,
              //      and set the iterator back to the beginning of the list.
              System.out.println("\n\n15. ");
              // 18. what does nextIndex and previousIndex return?
              System.out.println("\n\n16. ");
              // 19. move the iterator to the third item in the list; if you were to
              //      execute next(), the third item would be returned and the iterator
              //      would advance to the 4th item.
              System.out.println("\n\n17. ");
              // 20. add the string "New" to the list; where is it inserted relative to
              //      the current item in the iteration?
              System.out.println("\n\n18. ");
              // 21. remove the current item; what happens?
              System.out.println("\n\n19. ");
              // 22. display the current item in the list without advancing the iteration
              //      in 2 ways, as follows:
              // 22A - using only iterator methods
              System.out.println("\n\n20A. ");
              // 22B using an iterator method and list methods
              System.out.println("\n\n20B. ");
              // 23. advance the iterator and remove the current item; which one is removed?
              System.out.println("\n\n21. ");
              // 24. move the iterator back and remove the current item; which one is removed?
              System.out.println("\n\n22. ");
              // 25. move the iterator to the first item in the list and change it to "First"
              System.out.println("\n\n23. ");
         } // end main
    } // end MyProgram

  • Why are Java files listed as needing repair in Disk Utility?

    Why are Java files always listed as needing repair in Disk Utility?

    FrenchToast wrote:
    Baltwo, bull's eye, as always!
    X423424X's question is pertinent too: you usually need to repair permissions after some major upgrade or update, not on a regular basis. Is there a particular reason why you'd often try to repair permissions? Here's more on the subject.
    Repairing permissions after an update or upgrade is harmless, but I would question the need to do it even there. The Apple update itself should set the correct Permissions. I still do this, really as a hangover from Tiger days -- not certain it was really ever needed there either -- and because it's a habit that's hard to kick, but it's never found anything to repair...but for one buggy exception, which was the 10.5.8 Combo update. Running it once and then repairing Permissions created a real error. It was discovered the Combo needed to be run twice back to back and then Permissions repair. In fact, one would have been better off not running Permissions for that update to begin with. There it wasn't harnless.
    https://discussions.apple.com/message/9968141#9968141
    BTW, even Flash updates, which always used to set incorrect Permissions, are coming in clean these days.
    Exercises in Futility: Permissions Repair

  • How to use java awt in linux

    I have few questions about linux. Is there any one who can give me the correct o/p of the following errorecode
    Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
    at java.awt.Window.init(Window.java:231)
    at java.awt.Window.<init>(Window.java:275)
    at java.awt.Frame.<init>(Frame.java:401)
    at java.awt.Frame.<init>(Frame.java:366)
    at jxml1.<init>(jxml1.java:14)
    at jxml1.main(jxml1.java:78)
    $ Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
    at java.awt.Window.init(Window.java:231)
    at java.awt.Window.<init>(Window.java:275)
    at java.awt.Frame.<init>(Frame.java:401)
    at java.awt.Frame.<init>(Frame.java:366)
    at jxml1.<init>(jxml1.java:14)
    at jxml1.main(jxml1.java:78)
    $
    ^C$

    Hi,
    Most often than not this is related to xhost in unix-shell systems.
    Try the following
    $setenv DISPLAY :0
    $xhost +
    or simply
    $xhost +If you need more security add just your user after xhost + command
    Hope this helps
    Aviroop

  • Using Java oracle.spatial.util.SampleShapefileToJGeomFeature : ESRI SHP

    Hi,
    I am trying to import an ESRI shapefile using the Java class oracle.spatial.util. I have to add a remark, that I have set the classpath with the command
    set classpath=.;%ORACLE_HOME%\jdbc\lib\ojdbc14.jar
    I am using Oracle 11g and I don't have this file in the LIB library, only
    ojdbc5.jar
    ojdbc5dms.jar
    ojdbc5dms_g.jar
    ojdbc5_g.jar
    ojdbc6.jar
    ojdbc6dms.jar
    ojdbc6dms_g.jar
    ojdbc6_g.jar
    set classpath=.;%ORACLE_HOME%\md\jlib\sdoapi.jar (file exists)
    set classpath=.;%ORACLE_HOME%\md\jlib\sdoutl.jar (file exists)
    set classpath=.;%ORACLE_HOME%\lib\xmlparserv2.jar (file exists)
    java oracle.spatial.util.SampleShapefileToJGeomFeature -h nt-topobase -p 1521 -s ORCL -u rlv -d admin -t dkn -f KO_shp - 5000000 -g geom
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/spatial/util/S
    ampleShapefileToJGeomFeature
    Caused by: java.lang.ClassNotFoundException: oracle.spatial.util.SampleShapefile
    ToJGeomFeature
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    I am not sure, why I am getting those errors.

    hi,
    I dont know how to use the SampleShapefileToJGeomFeature Java Class. I have tried 2 syntax
    oracle@oraclesig:/$ java -cp $clpath oracle.spatial.util.SampleShapefileToJGeomFeature -h http://localhost -p 1521 -s SIG -u my_user -d my_pass_word -t my_shape -f /home/oracle/perso/topo/my_shape -r 4326 -g geom
    Parameters:
    <Filename>: File name of an input Shapefile (without extension)
    <Table name>: Table name for the result
    \[SRID\]: Valid Oracle SRID for coordinate system; use 0 if unknown
    <ID Column name>: Column name for unique numeric ID; if required
    oracle@oraclesig:/$ java -cp $clpath oracle.spatial.util.SampleShapefileToJGeomFeature /home/oracle/perso/topo/ma_couche ma_couche 2154 id_com
    Connecting to DB...
    java.sql.SQLException: Exception d'E/S: The Network Adapter could not establish the connection
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at oracle.spatial.util.SampleShapefileToJGeomFeature.main(SampleShapefileToJGeomFeature.java:110)
    Dropping old table...
    Exception in thread "main" java.lang.NullPointerException
    at oracle.spatial.util.SampleShapefileToJGeomFeature.prepareTableForData(SampleShapefileToJGeomFeature.java:252)
    at oracle.spatial.util.SampleShapefileToJGeomFeature.main(SampleShapefileToJGeomFeature.java:129)
    Can you help me for the syntaxe oh the commande?
    Thanks! Regards.
    Ben.
    Edited by: user12240435 on Dec 15, 2009 12:59 AM

Maybe you are looking for