i need to tell java about class path in my case the local place that is ->"."
im reading from there configuration files . so i can't run only the jar
even when i do without the sh
java -cp /.;foo.jar com.umen.Main
or
java -cp .;foo.jar com.umen.Main
im still getting the error :
./foo.jar: ./foo.jar: cannot execute binary file
but when i do :
java -cp foo.jar com.umen.Main (without the ".")
its working , but my java app failed Because it is looking for the configurations files from "."
so why i can't add the "." to -cp ?
do you have the configuration file in the same directory as the jar? If so does the jar have a hard coded path of where the configuration file needs to be stored?
no it does not it uses the java ResourceBundle mechanism
that basically takes the files from the classpath
even if i do :
java -classpath /home/umen;./foo.jar com.umen.Main
it still gives me the error:
/home/umen/foo.jar: /home/umen/foo.jar: cannot execute binary file
Hi,
I am trying to write a shell script that will go to another folder and run the script in that folder. The folder structure is kind of like this:
/MainFolder/
|-> MainShellScript.sh
|
|-> Folder1/
|-----|-> script1.sh
|-----|-> FileToRun1.jar
|
|-> Folder2/
|-----|-> script2.sh... (3 Replies)
Hi All,
I am having 7 jar files in a dir. abc like listed below
bash-3.00$ cd abc
bash-3.00$ ls
123.jar
23wdawd.jar
dfsa23.jar
dsa.jar
wew234.jar
adsd234234.jar
dfsda423.jarNow i want to assign all this jar files to a variable in the below format
... (6 Replies)
Hi,
Is there an option with jar command which allows us to copy some class files(already existing,want to override)to a jar file without exploding it.?
Thanks in advance. (1 Reply)
Hi ,
i use below command to create a jar from /home/surya
jar -cvf foldername.jar jarfolderpath
foldrename.jar= directorywhere jar file needs to be created including jar file name
jarfolderpath: directory which needs to be included to create a jar
Now taking below scenario:... (1 Reply)
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
I am a beginner to Solaris
In Solaris you will find 'jar'. I am used to 'tar' command in Linux.
What makes the differenced between 'jar' and 'tar' ?
Is 'jar' unique to Solaris?
I found a command called 'compress' too in Solaris.
It is not in my Linux. Is it something special to... (1 Reply)