Pregunta

"SET CLASSPATH=C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar;." . Can anybody tell me how i can set the classpath permanently so that i will not have to set the classpath for the next time i restart my computer?

¿Fue útil?

Solución

You can expose the ojdbc14.jar as an Installed Java Extension

What you need to do is to place the ojdbc14.jar in a specific System folder, so it get's loaded by the JVM before the classpath.

The location varies depending on the OS:

  • Solaris™ Operating System: /usr/jdk/packages/lib/ext
  • Linux: /usr/java/packages/lib/ext
  • Microsoft Windows: %SystemRoot%\Sun\Java\lib\ext or C:\Program Files\Java\jdk1.7.0\jre\lib\ext

Because you'll be using the jar as an installed extension, the runtime environment will be able to find and to load its classess and you'll not be required to add them to the classpath.

Otros consejos

set it under environment variable. Here are the steps. Then you don't have do it every time.

http://docs.oracle.com/javase/tutorial/essential/environment/paths.html

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top