How to run a custom jar file copy to classpath command using java? -


i have jar file i'm using run application. however, every time run application need add -cp "jar name" compile , run java application.

how can make permanent change don't have use command line commands task? can put in lib location?

note: don't have use ide. has terminal.

if on linux/ mac, add following ~/.bash_profile

export classpath=$classpath:/path/to/jar 

if on windows, use this..

set classpath=%classpath%;\path\to\jar 

you can read more here , here


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -