Help coderanch get a
new server
by contributing to the fundraiser

Purushotham Kudva

Greenhorn
+ Follow
since Mar 22, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Purushotham Kudva

Thank you guys... I shall try these and revert.
12 years ago
Hi I need info on how to round a decimal to its upper integer.

this is the part of my code
strTotalPages = Integer.toString(noOfRec / intFetchSize)

for example say

noOfRec =22
and intFetchSize= 15

22/15 must give me 2
strTotalPages should be 2.


please help
12 years ago
Sorry Jeff. Can you please tell me how to set relative path for any jar in generic
12 years ago
Also i am just double clicking on the batch file
12 years ago
Hi Ralph,

i have my .jar in the location D:\BIP\RR_Jar\ and the batch file in the location D:\BIP\Batches\

with this folder structure the batch is running successfully. Below is the result.

D:\BIP>java -Xms512m -Xmx512m -jar RR_Jar\NOPARAM_PDF.jar "/FBC Reports/EOM Repo
rts/Byo Corp/Byo Credit gr/Byo Credit gr.xdo" "Reports\EOM\Byo Corp\Byo Credit
gr.pdf"

D:\BIP>PAUSE
Press any key to continue . . .

Now if i change the location of batch from D:\BIP\Batches\ to D:\BIP\Batches\EOD\ it fails saying the below.

D:\BIP\Batches>java -Xms512m -Xmx512m -jar RR_Jar\NOPARAM_PDF.jar "/FBC Reports/
EOM Reports/Byo Corp/Byo Credit gr/Byo Credit gr.xdo" "Reports\EOM\Byo Corp\By
o Credit gr.pdf"
Unable to access jarfile RR_Jar\NOPARAM_PDF.jar

D:\BIP\Batches>PAUSE
Press any key to continue . . .

so i want to know how the system is picking up D:\BIP>java and D:\BIP\Batches>java location when i run it from a different folder.

My batch file contents are

java -Xms512m -Xmx512m -jar RR_Jar\NOPARAM_PDF.jar "/FBC Reports/EOM Reports/Byo Corp/Byo Credit gr/Byo Credit gr.xdo" "Reports\EOM\Byo Corp\Byo Credit gr.pdf"


12 years ago
Hi. I am new to java. I have a batch file that calls a .jar if i change the location of the batch file and run i get an error that says unable to read the .jar file. i if i use cd.. or change the directory then the batch file runs. please help me
12 years ago