Unable to extract connector/j jar file(mysql)

im have having a problem on extracting mysql's connector/j jar file on j2sdk1.4.0.
and may i know does sun allows windows xp users to install various kind of versions of j2sdk? for example, install j2sdk1.4.0 into c:\j2sdk1.4.0, and j2sdk1.4.2_05 into c:\j2sdk1.4.2_05?
what to do using j2sdk1.4.0 for connector/j?
i would like to know manual steps instead if automatic step provided by netbean.
i wish this problem could be solved as sonn as possible

im have having a problem on extracting mysql's
connector/j jar file on j2sdk1.4.0.I'm not sure what this means. The MySQL connector JAR isn't part of any JDK. You've got to download it and put it in your CLASSPATH.
>
and may i know does sun allows windows xp users to
install various kind of versions of j2sdk? for
example, install j2sdk1.4.0 into c:\j2sdk1.4.0, and
j2sdk1.4.2_05 into c:\j2sdk1.4.2_05?
what to do using j2sdk1.4.0 for connector/j?
i would like to know manual steps instead if
automatic step provided by netbean.
i wish this problem could be solved as sonn as
possible

Similar Messages

  • Problem parsing XML with schema when extracted from a jar file

    I am having a problem parsing XML with a schema, both of which are extracted from a jar file. I am using using ZipFile to get InputStream objects for the appropriate ZipEntry objects in the jar file. My XML is encrypted so I decrypt it to a temporary file. I am then attempting to parse the temporary file with the schema using DocumentBuilder.parse.
    I get the following exception:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '<root element name>'
    This was all working OK before I jarred everything (i.e. when I was using standalone files, rather than InputStreams retrieved from a jar).
    I have output the retrieved XML to a file and compared it with my original source and they are identical.
    I am baffled because the nature of the exception suggests that the schema has been read and parsed correctly but the XML file is not parsing against the schema.
    Any suggestions?
    The code is as follows:
      public void open(File input) throws IOException, CSLXMLException {
        InputStream schema = ZipFileHandler.getResourceAsStream("<jar file name>", "<schema resource name>");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = null;
        try {
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          factory.setAttribute(JAXP_SCHEMA_SOURCE, schema);
          builder = factory.newDocumentBuilder();
          builder.setErrorHandler(new CSLXMLParseHandler());
        } catch (Exception builderException) {
          throw new CSLXMLException("Error setting up SAX: " + builderException.toString());
        Document document = null;
        try {
          document = builder.parse(input);
        } catch (SAXException parseException) {
          throw new CSLXMLException(parseException.toString());
        }

    I was originally using getSystemResource, which worked fine until I jarred the application. The problem appears to be that resources returned from a jar file cannot be used in the same way as resources returned directly from the file system. You have to use the ZipFile class (or its JarFile subclass) to locate the ZipEntry in the jar file and then use ZipFile.getInputStream(ZipEntry) to convert this to an InputStream. I have seen example code where an InputStream is used for the JAXP_SCHEMA_SOURCE attribute but, for some reason, this did not work with the InputStream returned by ZipFile.getInputStream. Like you, I have also seen examples that use a URL but they appear to be URL's that point to a file not URL's that point to an entry in a jar file.
    Maybe there is another way around this but writing to a file works and I set use File.deleteOnExit() to ensure things are tidied afterwards.

  • Unable to create an executable jar file

    Hi,
    I am unable to create an executable jar file,
    I am using the command as follows:
    C\> jar cvfm MyJarName.jar manifest.txt Demo.class
    where as Demo.class has appropriate main method; manifest.txt contains [ Main-Class: Demo ] and a new line
    Please help.
    thanks & regards
    M K Rayapudi
    Edited by: R6i on Apr 30, 2009 5:15 AM

    Your jar is perfectly generated, but your machine has a problem with .jar file associations.
    You have two options:
    1. Play with the registry. Dangereous if you are not used to.
    2. Reinstall the jre.
    Just to verify my theory, open a command prompt and the command:
    reg query HKCR\jarfile\shell\open\command
    What does it say? I have executed your command , here is the output
    HKEY_CLASSES_ROOT\jarfile\shell\open\command
        (Default)    REG_SZ    "C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1" %*I am not getting anything from this command, can you please explain clearly.
    thanks & regards
    M K Rayapudi
    Edited by: R6i on May 3, 2009 10:18 PM

  • Extracted ear/war/jar file location in JBoss

    How can I find out in runtime where JBoss extracted my ear/war/jar file?
    I have a file inside my ear/war/jar file and I need to know the location of the file. I know that it is in the tmp/deploy directory but I need the exact application temporary name.

    You can take out the common classes and bundle them in a jar library that can be bundled directly in APP-INF/lib (or library directory defined by <library-directory> in applicaton.xml if you are using JEE5 / WLS 10). Is it possible to do this re-arragement?

  • SAP Connector Framework JAR-files

    Hey guys,
    can anyone please tell me where I can get the JAR-files for the SAP Java Connector (especially those with the package "com.sapportals.connector*".
    Thanks and Best Regards,
    Torben

    Torben, try to use class finder plugin as described here /people/maksim.rashchynski/blog/2006/08/14/the-story-about-how-2-eclipse-plugins-helped-me-to-make-a-lot-of-points-on-sdn-forum
    To save you some time:
    C:\usr\sap\J2E\JC00\j2ee\cluster\server0\bin\ext\tcconnconnectorframework\*.jar
    C:\usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\com.sapportals.connectors.sap\connector\connectors\SAPCFConnector.rar\SAPCFConnector.jar

  • Unable to load classes from jar files inside APP-INF/lib in EAR.

    Weblogic version: 10.3.3
    Platform: Linux x86-64 bit
    We deployed an ear packaged with all the common library jars inside APP-INF/lib. Deployment was successful.
    for some reason, it is always giving ClassNotFoundException for the classes inside the jars. This does not happen
    in 10.3.2 version of weblogic.
    We tried to add them to domain/lib directory (instead of APP-INF/lib) but still it is not able to resolve the classes.
    Any pointers would be appreciated.

    try using prefer-web-inf-classes in the weblogic.xml file in your WAR file
    or using prefer-application-packages in the weblogic-application.xml file in your EAR.

  • Unable to extract FB 4.6 files

    There seems to be something wrong with the Flashbuilder 4.6 installation for Windows. I've downloaded the installation many times , and tried installing it on  Windows XP 32bit OS. It hangs every time on the same spot, when it is trying to extract the files for the installation. It says "A problem has occurred while extracting some files. It always stops after or on the "updateInventory.dll" extraction. The installation doesn't actually start, it's failing on the extraction of the files to install.
    Install File: FlashBuilder_4_6_LS10.exe 806 MB (845,374,656 bytes)
    Its not a space problem or a permissions problem.

    Thought I would give 4.5 a try.   Adobe's link for 4.5 doesn't work.  It looks like it is working but only downloads 1.2 mb.  What appears to be the first K of the file.
    Then I thought I would try 4.7.  That downloaded fine (huge 1G file).  When I ran the exe and it started the extraction, I waited and waited while it unpacked and it made it all the way through the unpacking.  So in the 4.7 file the extract problem has been fixed.  I still can't install it because it has some other problem with the log in screen.  But that is a topic for a different place.
    sigh...2 days of jerking around, still nothing.
    And now I find, since I haven't bought it yet, there is NO support access.  Can't report either of these situations to anybody.

  • MySql jar file constructor

    Hello,
    I am developing web application using JSP and MySql. I am using netBeans 4.1 as IDE.
    To connect with database I have included jar file "mysql-connector-java-3.1.10-bin.jar" to Libraries folder of my project in netBeans. This jar file contains many classes, one which I want to use is com.mysql.jdbc.Blob.
    In my jsp file I want to call Blob(byte[]) constructor. For that I am doing :
    com.mysql.jdbc.Blob myBlob = new com.mysql.jdbc.Blob(dataBytes);
    Where dataBytes is an initialized array of bytes.
    When I compile my jsp file I get error "can not find symbol". It says it is not able to find constructor.
    So where I am making mistake. To resolve this problem which actions should I take??
    Jahnvi

    Hello,
    I am developing web application using JSP and MySql. I am using netBeans 4.1 as IDE.
    To connect with database I have included jar file "mysql-connector-java-3.1.10-bin.jar" to Libraries folder of my project in netBeans. This jar file contains many classes, one which I want to use is com.mysql.jdbc.Blob.
    In my jsp file I want to call Blob(byte[]) constructor. For that I am doing :
    com.mysql.jdbc.Blob myBlob = new com.mysql.jdbc.Blob(dataBytes);
    Where dataBytes is an initialized array of bytes.
    When I compile my jsp file I get error "can not find symbol". It says it is not able to find constructor.
    So where I am making mistake. To resolve this problem which actions should I take??
    Jahnvi

  • Does driver jar file needs to be extracted before giving java command?

    I wrote a JDBC program, where it will pull the data from Sybase and Push into Oracle. That program is working fine in Eclipse IDE. But when i tried to make it make it work from the command program, by giving javac and java commands..., it didnt work.
    Finally i realised that, it is working when i extract the driver jar files (sybase and Oracle, ojdbc.jar and jconn3.jar ) using jar xvf utility.
    Do we need to do that? or is there any smart way that we can just mention the drivers path and make it work?
    For your information, i set the CLASSPATH and JDBC_HOME to the driver location.
    Please help me out
    Thank You
    Viswa

    Hi Balu,
    Could you please check this?
    umi-c005-m3:~/TestRem2CCM/SampleProgram 179> ls -l
    total 928
    -rwxrwxrwx 1 500 500 465869 Sep 30 2005 jconn3.jar
    drwxrwxrwx 2 500 500 4096 Jun 5 11:45 psae
    umi-c005-m3:~/TestRem2CCM/SampleProgram 180> ls -l psae/
    total 96
    -rwxrwxrwx 1 ramavi11 500 3251 Jun 5 11:27 DataModel.class
    -rwxrwxrwx 1 500 500 3564 Jun 5 11:26 DataModel.java~
    -rwxrwxrwx 1 500 500 3564 Jun 5 11:27 DataModel.java
    -rwxrwxrwx 1 ramavi11 500 8358 Jun 5 11:27 DataTransfer.class
    -rw-rw-rw- 1 500 500 11126 Jun 5 11:25 DataTransfer.java~
    -rwxrwxrwx 1 500 500 11127 Jun 5 11:45 DataTransfer.java
    umi-c005-m3:~/TestRem2CCM/SampleProgram 181> java -cp . psae/DataTransfer
    Before Try
    Inside Try
    *********Sybase Connection Failed*************
    java.lang.ClassNotFoundException: com.sybase.jdbc3.jdbc.SybDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at psae.DataTransfer.getSybaseDataList(DataTransfer.java:191)
    at psae.DataTransfer.main(DataTransfer.java:19)
    Data NOT available from MMS query
    umi-c005-m3:~/TestRem2CCM/SampleProgram 182> java -cp . psae.DataTransfer
    Before Try
    Inside Try
    *********Sybase Connection Failed*************
    java.lang.ClassNotFoundException: com.sybase.jdbc3.jdbc.SybDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at psae.DataTransfer.getSybaseDataList(DataTransfer.java:191)
    at psae.DataTransfer.main(DataTransfer.java:19)
    Data NOT available from MMS query
    umi-c005-m3:~/TestRem2CCM/SampleProgram 183>

  • Don't know how to make my main class import a jar file

    OK, the title doesn't make much sense but here are my create-jar.bat and manifest files:
    create-jar.bat:
    jar cvmf manifest.txt dassimul-admin.jar player/ admin/ com/ connector/ common/ *.class
    manifest.txt:
    Main-Class: admin.DASAdmin
    the problem is that in connector/ folder there is the jdbc mysql connector driver (.jar file).
    in Eclipse I can add this jar to the Java Build Path, so the program runs.
    When I double-click the dassimul-admin.jar file, I get a Class Not Found Exception
    C:\MYWORK\dassimul>java -jar dassimul-admin.jar
    FATAL ERROR WHILE LOADING SQL DRIVER: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    I think that the problem lies in the fact that admin.DASAdmin can't see and import the jar file in connector/ folder... am I right?

    It looks like you are putting the mysql jar file inside the dassimul jar. That won't work unless you write custom code. You should use the Class-Path attribute of the manifest to define a relative path(s) to the other jar(s) that you need to use.
    [http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]

  • Problem with jar file

    Hello,
    I have create successfull an executeable jar and it orks fine on my pc
    I try to run it on other pc whoe winrar is installed
    the jar can not run and the jar will be extract
    who is the problem ??????

    The problem and the solution are both the same as in your previous post about being unable to create an executable jar file (http://forum.java.sun.com/thread.jspa?threadID=744829).
    The solution is still given in the following thread:
    http://forum.java.sun.com/thread.jspa?threadID=287560&messageID=1127643
    The program is now WinRar instead of WinZip, but the solution is the same.

  • Using .jar files

    I was able to use .jar files in Java programs that I write on my computer. I could write a program that used an import statement to bring in classes contained in a .jar file.
    One day, I was trying to incorporate a jar file folder directly into my windows operating system by using the environmental variable called CLASSPATH. Unfortunately, I made the mistake of screwing up my PATH variable. I fixed my PATH variable back up by adding the directory to the bin folder inside of the Java folder as is described commonly by the documentation for installing the Java SE on windows computer.
    Since that day, I have not been able to use .jar files using an import statement. My computer is unable to find the .jar files even if I specify the exact directory. Even the IDE(netbeans) that I use is unable to find and use .jar files. I have found that I can open up .jar files and pull the contents that I need out of said .jar files, but I have a project that does not allow me to open up the .jar files and extract the needed classes.
    I have googled this problem so much that I have read hundreds of posts about .jar files, and I cant find anyone in a situation that is similar to mine. If I take my files to another computer with Java SE installed, then my source code can access the .jar files just fine. For some reason, my work computer seems to hate using .jar files. I have no idea what could be the problem. There is no information in the java documentation on troubleshooting with this problem, and the most confusing part is that it worked perfectly fine until That one day
    Does anyone have any ideas?
    Specific technical details:
    I need to pull the Stopwatch.class file from a stdlib.jar file. In the past I had done this by using an import statement inside of my program:
    "import stdlib.Stopwatch; "
    Using this command to compile:
    "javac -cp .;(directory path to .jar file); source.java"
    This used to work. Now when using the javac command I get error messages
    1. Error points directly to import statement. Arrow directed at the period after stdlib.
    "cannot find symbol"
    2. Error message pointing to all instances of the class that I was attempting to import into my program.
    Thanks for reading
    Edited by: 955611 on Aug 28, 2012 7:22 PM

    I read your post. I want to compile this project by using the "-classpath" option in the javac command. After screwing up important system variables once, I do not want to continually have to play with system variable in order to compile projects. To quote from the website that you linked:
    Using the JDK tools' -classpath option
    The JDK tools java, jdb, javac, and javah have a -classpath option which replaces the path or paths specified by the CLASSPATH environment variable while the tool runs. This is the recommended option for changing class path settings, because each application can have the class path it needs without interfering with any other application.
    The runtime tool java has a -cp option, as well. This option is an abbreviation for -classpath.
    For very special cases, both java and javac have options that let you change the path they use to find their own class libraries. The vast majority of users will never to need to use those options, however.
    Clearly, the "-classpath" option in the javac is intended to replace the need to play with important system variables. I guess my post boils down to the question of "Why doesn't this command work for me?". I followed your suggestion by removing the bin directories and adding the stdlib.jar directory directly into the system variable itself. Here is the following output from my command prompt:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Lelo>E:
    E:\>cd Programs\Java
    E:\Programs\Java>javac testy.java
    testy.java:1: error: package stdlib does not exist
    import stdlib.Stopwatch;
    ^
    1 error
    E:\Programs\Java>echo %CLASSPATH%
    C:\Program Files\Java\jre6\lib\ext\QTJava.zip;E:\Programs\Java\stdlib.jar;
    E:\Programs\Java>javac -classpath .;E:\Programs\Java\stdlib.jar; testy.java
    testy.java:1: error: package stdlib does not exist
    import stdlib.Stopwatch;
    ^
    1 error
    E:\Programs\Java>
    I still received the same errors. It seems that even adding the directories into the system variable will not work for me.

  • HELP!!! Could someone help me with a jar file issue and JRE 1.3 & 1.4

    We had a problem with the last Oracle patch in that it tried to extract from a jar file using the "jar" executable. But the jar executable is not installed on the server where we have JRE 1.4
    On one server, Jar.exe is installed where we have JRE 1.3. Is the jar.exe apart of JRE 1.4? If so, where do I find the jar.exe file? If it's not part of JRE 1.4, what do I need to do to get the jar.exe onto the server where JRE 1.4 is installed?
    Thanks, Carl

    Thanks for your replies.
    I know that a jar file is like a zip file but I'm asking, "Can you download just the jar.exe without downloading the JDK?"
    I keep reading everywhere that you can only get the jar.exe tool if you download the JDK but I can't use JDK(because it is a compiler) on our website here at work.
    Thanks,
    Carl

  • HELP!!! Could someone help me with a jar file issue and JRE 1.3 and JRE 1.4

    We had a problem with the last Oracle patch in that it tried to extract from a jar file using the "jar" executable. But the jar executable is not installed on the server where we have JRE 1.4
    On one server, Jar.exe is installed where we have JRE 1.3. Is the jar.exe apart of JRE 1.4? If so, where do I find the jar.exe file? If it's not part of JRE 1.4, what do I need to do to get the jar.exe onto the server where JRE 1.4 is installed?
    Thanks, Carl

    The jar tool isn't part of the jre but the jdk. You should find it on your server in %ORACLE_HOME%\jdk\bin (seems you use some kind of Windows).

  • Can't execute a main class with jar file loaded on command line

    Hello Guys,
    I try to use the following command to execute a main metod from msword class.
    java -cp f60all.jar:jacob.jar msword
    and i receive:
    Exception in thread "main" java.lang.NoClassDefFoundError: msword
    If i extract the 2 jar files then i can execute the main metod:
    java msword
    Can anyone explainme whet is happening ?
    Thanks,
    /Marian

    Hi!
    You need to include the directory where your class is in your classpath... you can use for this the "."
    So, you should write something like
    java -cp .;f60all.jar;jacob.jar msword
    and this supposing that "f60all.jar", "jacob.jar" and "msword.class" are all in the same directory from which you are trying to run the program... in other case write the full paths for the files...
    Bye!

Maybe you are looking for