deepak buddineni

Greenhorn
+ Follow
since Apr 30, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by deepak buddineni

Yes sir.It works now.
Thanks for the quick reply.
11 years ago
I have created jar file for my project called MyJar.jar .

1)When running in windows:
(C:\Users\Desktop\MyJar.jar has all the dependent jars in C:\Users\Desktop\testlib\)

So i run the program using the command :
C:\Users\Desktop> java -cp C:\Users\Desktop\testlib\*;C:\Users\Desktop\testlib\MyJar.jar com.abc.MyMain

The program runs absolutely fine!!!

2)When running in Unix:
/tmp/test/lib/MyJar.jar has all the dependent jars in /tmp/test/lib/*

So i run the program using the command :
/tmp/test > java -cp /tmp/test/lib/*;/tmp/test/MyJar.jar com.abc.MyMain

I get this error:

$ java -cp /tmp/test/lib/*;/tmp/test/MyJar.jar com.abc.MyMain
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/test/lib/commons-logging-1/1/1/jar
Caused by: java.lang.ClassNotFoundException: .tmp.test.lib.commons-logging-1.1.1.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: /tmp/test/lib/commons-logging-1.1.1.jar. Program will exit.
-ksh: /tmp/test/MyJar.jar: cannot execute [Permission denied]


11 years ago
I have created jar file for my project called MyJar.jar .

1)When running in windows:
(C:\Users\Desktop\MyJar.jar has all the dependent jars in C:\Users\Desktop\testlib\)

So i run the program using the command :
C:\Users\Desktop> java -cp C:\Users\Desktop\testlib\*;C:\Users\Desktop\testlib\MyJar.jar com.abc.MyMain

The program runs absolutely fine!!!

2)When running in Unix:
/tmp/test/lib/MyJar.jar has all the dependent jars in /tmp/test/lib/*

So i run the program using the command :
/tmp/test > java -cp /tmp/test/lib/*;/tmp/test/MyJar.jar com.abc.MyMain

I get this error:

$ java -cp /tmp/test/lib/*;/tmp/test/MyJar.jar com.abc.MyMain
Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/test/lib/commons-logging-1/1/1/jar
Caused by: java.lang.ClassNotFoundException: .tmp.test.lib.commons-logging-1.1.1.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: /tmp/test/lib/commons-logging-1.1.1.jar. Program will exit.
-ksh: /tmp/test/MyJar.jar: cannot execute [Permission denied]


I am trying to connect to oracle 10 g databas on my local system. operating system is vista. A using netbeans IDE



I checked tha database name using the following query:

SQL> select name from v$database;

NAME
---------
ORCL

this shows that i am using the correct sid in url.
also the user name and password are correct.

But the error says:

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection


can some one help me onthis.