The Classpath of my shell script could not find a particular jar

1

I have a shell script that performs the following statements:

#!/bin/bash
java -Dcom.sun.management.jmxremote -classpath .:lib/* br.com.governa.admin.sincronizador.negocio.Sincronizador config/sincronizacao-espec-transparencia.xml

Time that I run my script it is displaying the following error:

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at br.com.governa.admin.sincronizador.persistencia.BancoConexao.<init>(BancoConexao.java:39)
at br.com.governa.admin.sincronizador.negocio.Sincronizador.run(Sincronizador.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

However the sqlserver jar is in the lib

I've tried everything .. can someone give me a light there ??

    
asked by anonymous 15.04.2015 / 20:35

1 answer

0

For some specific reason in linux the line where I had the information that uses this driver to access the database, had space in white due to I have to format with the shortcut CTRL + SHIFT + F and in windows it ignores the space and works correctly, it was just taking the white space worked beauty!

    
22.04.2015 / 05:17