at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
------------------------------------------------------------------------
If someone has the key, please tell me.
Thanks
--
Message posted via http://www.javakb.com
Sorry but the classpath IS the problem with such an exception.
What is the exact commands you us on the console ?
Regards,
Arnaud
"mikel lertxundi via JavaKB.com" <fo...@nospam.JavaKB.com> a écrit dans le
message news: 2aed74f682474f8e...@JavaKB.com...
thanks
and to set the classpath:
set classpath = pathForJarFile/DriverFile.jar
Try this: java -cp "list of jar paths" -jar myFile.jar
If you are running linux, it may simply be a matter of using "export"
instead of "set"
Also note that CLASSPATH variable is case-sensitive with linux.
Check this with "echo $CLASSPATH" when you're done
Regards,
Arnaud
"mikel lertxundi via JavaKB.com" <fo...@JavaKB.com> a écrit dans le message
news: 5b7867218d5146c0...@JavaKB.com...
I think calling "java -jar" may not take CLASSPATH into account.
So better use :
java nameOfYourMainClass
once your CLASSPATH was correctly set (including myFile.jar)
Regards,
Arnaud
"Arnaud Berger" <a.be...@libertycontact.fr> a écrit dans le message news:
d35nm7$66k$1...@news.tiscali.fr...
Class-Path: . jar1.jar jar2.jar jar3.jar
jar1.jar jar2.jar jar3.jar should be located in the same directory where
you're running your application from. "." is redundant if you are not
using any classes or files that aro not bundled into jar files.
Best regards,
Igor.
Arnaud Berger пишет:
> Sorry I'm wondering if the command I told you would work.
>
> I think calling "java -jar" may not take CLASSPATH into account.
>
> So better use :
>
> java nameOfYourMainClass
>
> once your CLASSPATH was correctly set (including myFile.jar)
>
> Regards,
>
> Arnaud
>
> "Arnaud Berger" <a.be...@libertycontact.fr> a Иcrit dans le message news:
> d35nm7$66k$1...@news.tiscali.fr...
>
>>Hi,
>>
>>Try this: java -cp "list of jar paths" -jar myFile.jar
>>
>>If you are running linux, it may simply be a matter of using "export"
>>instead of "set"
>>Also note that CLASSPATH variable is case-sensitive with linux.
>>Check this with "echo $CLASSPATH" when you're done
>>
>>
>>Regards,
>>
>>Arnaud
>>
>>"mikel lertxundi via JavaKB.com" <fo...@JavaKB.com> a Иcrit dans le
I've try executing the jar file using command java mainclass like this
java mainclass.class
and I have this answer: Exception in thread "main"
java.lang.NoClassDefFoundError: principal/class
so...it doesn't work (or I'm doing it wrong).
Neither the command java -cp "list of jar files" works. I type it like this:
java -cp jarfile1;jarfile2;.. -jar myjarFile.jar
Just one last thing:
In my code I type this:
System.out.println("Class path is really " + System.getProperty
("java.class.path") );
to watch the real classpath that is managing the aplication, and I obtain
that the jar file is really the class path.
Class path is really prueba.jar
where prueba.jar is the jar file that I've develop.
Thanks for all
Mikel
java -cp jarfile1;jarfile2;.. mainclass.class
including your own jar file in -cp.
Best regards,
Igor.
mikel lertxundi via JavaKB.com пишет:
Mikel
1) You shouldn't include the ".class" part, your command should look like :
java -cp jarfile1;jarfile1 MyMainClass
and not
java -cp jarfile1;jarfile1 MyMainClass.class
2)If your class is in a package (say mypackage) , the command would be
java -cp jarfile1;jarfile1 mypackage.MyMainClass
Hope it helps,
Regards,
Arnaud
"mikel lertxundi via JavaKB.com" <fo...@JavaKB.com> a écrit dans le message
news: 5531f3b5028b42b1...@JavaKB.com...
Exception in thread "main" java.lang.NoClassDefFoundError: Principal
I'm sorry that you've gotten some bad advice here. However, you need to post what you
actually enter at the commandline.
Try this first:
java -cp "pathForJarFile/DriverFile.jar;prueba.jar" Principal
Assuming:
+ prueba.jar is in the current directory, otherwise use the proper path.
+ prueba.jar contains Principal.class.
+ 'pathForJarFile' is the path to the driver jar.
+ 'DriverFile.jar' is the jar containing the JDBC driver.
+ 'Principal' is the actual name of your class containing main().
+ The Principal class is not in a package.
Again, please post *exactly* what you are entering at the command line and the results
you get.
--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
It was a just a f***ing classpath thing