<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374750#M684657</link>
    <description>You need to set up the execution environment to find the JDBC libraries.  First, this means setting the classpath variable to include the location of the JDBC jar files, either through the command line or environment setting:&lt;BR /&gt;&lt;BR /&gt;java -classpath /some/path/to/library.jar ...&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;export CLASSPATH=/some/path/to/library.jar&lt;BR /&gt;java ...&lt;BR /&gt;&lt;BR /&gt;Second, it depends on what type of JDBC driver this is; I haven't worked with MySQL, I don't know.  If this is a type 3 (pure Java) library, then the above should work.  However, if it is a type 2 (Java pass-through), then there is a thick client layer behind the JDBC.  This usually requires a shared library that the Java envinmont can load, which in turn means setting the SHLIB_PATH environment variable to the location of the client libraries:&lt;BR /&gt;&lt;BR /&gt;export SHLIB_PATH=/path/to/mysql/lib&lt;BR /&gt;export CLASSPATH=/path/to/mysql/jarfiles.jar&lt;BR /&gt;java ...&lt;BR /&gt;&lt;BR /&gt;If you are getting a specific run-time exception, this should indicate where the problem is.  A ClassNotFoundException indicates that the JVM can't find the specific JDBC implementation you need.  An UnsatisfiedLinkError will indicate that the JVM can't find the shared libraries for a type 2 driver.</description>
    <pubDate>Tue, 10 Mar 2009 20:03:38 GMT</pubDate>
    <dc:creator>Ben Dehner</dc:creator>
    <dc:date>2009-03-10T20:03:38Z</dc:date>
    <item>
      <title>Java</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374747#M684654</link>
      <description>Hi there&lt;BR /&gt;I'm trying to connect to mysql from java programm.&lt;BR /&gt;I'm not using any IDE, just vi.&lt;BR /&gt;jdk is installed as I'm able to create some simple programs.&lt;BR /&gt;I need to know how can I load the necesery libraries to be able to run following program:&lt;BR /&gt;&lt;BR /&gt;package com.stardeveloper.example;&lt;BR /&gt;&lt;BR /&gt;import java.sql.Connection;&lt;BR /&gt;import java.sql.DriverManager;&lt;BR /&gt;import java.sql.SQLException;&lt;BR /&gt;&lt;BR /&gt;public class JdbcExample2 {&lt;BR /&gt;&lt;BR /&gt;  public static void main(String args[]) {&lt;BR /&gt;    Connection con = null;&lt;BR /&gt;&lt;BR /&gt;    try {&lt;BR /&gt;      Class.forName("com.mysql.jdbc.Driver").newInstance();&lt;BR /&gt;      con = DriverManager.getConnection("jdbc:mysql:///test",&lt;BR /&gt;        "root", "secret");&lt;BR /&gt;&lt;BR /&gt;      if(!con.isClosed())&lt;BR /&gt;        System.out.println("Successfully connected to " +&lt;BR /&gt;          "MySQL server using TCP/IP...");&lt;BR /&gt;&lt;BR /&gt;    } catch(Exception e) {&lt;BR /&gt;      System.err.println("Exception: " + e.getMessage());&lt;BR /&gt;    } finally {&lt;BR /&gt;      try {&lt;BR /&gt;        if(con != null)&lt;BR /&gt;          con.close();&lt;BR /&gt;      } catch(SQLException e) {}&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Mar 2009 13:49:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374747#M684654</guid>
      <dc:creator>Piotr Kirklewski</dc:creator>
      <dc:date>2009-03-09T13:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Java</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374748#M684655</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;It might be your server version of Java.&lt;BR /&gt;&lt;BR /&gt;swlist -l product | grep jre&lt;BR /&gt;&lt;BR /&gt;or jdk&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hp.com/go/java" target="_blank"&gt;http://www.hp.com/go/java&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Perhaps download and install a new release on your server.&lt;BR /&gt;&lt;BR /&gt;IT could be bad code.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 09 Mar 2009 14:17:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374748#M684655</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-03-09T14:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Java</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374749#M684656</link>
      <description>I've installed jdbc in my system.&lt;BR /&gt;Now I'm trying  test it with some simple program but it wont work:&lt;BR /&gt;&lt;BR /&gt;javac Jdbc11.java&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jdbc11.java:5: cannot find symbol&lt;BR /&gt;symbol  : class Statement&lt;BR /&gt;location: class Jdbc11&lt;BR /&gt;      Statement stmt;&lt;BR /&gt;&lt;BR /&gt;Anyone ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Mar 2009 17:42:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374749#M684656</guid>
      <dc:creator>Piotr Kirklewski</dc:creator>
      <dc:date>2009-03-09T17:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Java</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374750#M684657</link>
      <description>You need to set up the execution environment to find the JDBC libraries.  First, this means setting the classpath variable to include the location of the JDBC jar files, either through the command line or environment setting:&lt;BR /&gt;&lt;BR /&gt;java -classpath /some/path/to/library.jar ...&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;export CLASSPATH=/some/path/to/library.jar&lt;BR /&gt;java ...&lt;BR /&gt;&lt;BR /&gt;Second, it depends on what type of JDBC driver this is; I haven't worked with MySQL, I don't know.  If this is a type 3 (pure Java) library, then the above should work.  However, if it is a type 2 (Java pass-through), then there is a thick client layer behind the JDBC.  This usually requires a shared library that the Java envinmont can load, which in turn means setting the SHLIB_PATH environment variable to the location of the client libraries:&lt;BR /&gt;&lt;BR /&gt;export SHLIB_PATH=/path/to/mysql/lib&lt;BR /&gt;export CLASSPATH=/path/to/mysql/jarfiles.jar&lt;BR /&gt;java ...&lt;BR /&gt;&lt;BR /&gt;If you are getting a specific run-time exception, this should indicate where the problem is.  A ClassNotFoundException indicates that the JVM can't find the specific JDBC implementation you need.  An UnsatisfiedLinkError will indicate that the JVM can't find the shared libraries for a type 2 driver.</description>
      <pubDate>Tue, 10 Mar 2009 20:03:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java/m-p/4374750#M684657</guid>
      <dc:creator>Ben Dehner</dc:creator>
      <dc:date>2009-03-10T20:03:38Z</dc:date>
    </item>
  </channel>
</rss>

