Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ClassNotFoundException

User_WL6FPApr 24 2018 — edited Apr 25 2018

Hi,

I'm getting ClassNotFoundException error in this code below.

String url ="http://<some-path>/app.jar";

URL[] classLoaderUrls = new URL[]{new URL(url)};

                           

ClassLoader cl = new URLClassLoader(classLoaderUrls);

Class<?> beanClass = cl.loadClass("com.app.MyClass"); // Throwing ClassNotFoundException although this class is present in the JAR in the  fully qualified package name.

Any clue what to fix here ?

Comments

CloudDB
YES

You can directly connect using jdbc thin method without install the oracle client in your local.

SQL Developer's default connection to the database is using the thin JDBC driver.
Defaulting to using the JDBC thin driver means there is no requirement for an Oracle
client install minimizing the configuration and footprint.

http://www.oracle.com/technetwork/developer-tools/sql-developer/what-is-sqldev-093866.html

Edited by: hitgon on Jan 2, 2013 5:36 PM
Reddy G
Thanks for ur replay..

can you tell me what information i need to provide for JDBC...in SQL developer I can see Custom JDBC URL option in Advanced part..
is there doc which will provide the step by step..
Jim Smith
Youdon't need to use the Advanced connection, Basic connection is sufficient.

You just need to provide a host, port number (probably 1521), and a SID or SERVICE. You can get these from the tnsnames file if you have one or from your DBA.
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 23 2018
Added on Apr 24 2018
2 comments
203 views