|
-
September 30th, 2007, 03:22 AM
#1
Simple dbt on batch file
Hi
I created a batch file
runner.bat
*******************************************
set HOME = D:\Faisal\VSS\MTCs
set JAVA_HOME = D:\Applns\JDK1.5.11
%JAVA_HOME%/bin/java -classpath %HOME%\classes %HOME%\lib\laf.jar
com.faisal.mc.ShowScreen
*******************************************
if run this bacth file getting an error " cant find the path specified"
the console looks like
*************************************************
set HOME = D:\Faisal\VSS\MTCs
set JAVA_HOME = D:\Applns\JDK1.5.11
/bin/java -classpath \classes \lib\laf.jar
com.faisal.mc.ShowScreen
**************************************************
So what i conluded is that the both variables not get assigned values why
In my office machine this is working fine
can anybody comment on this
-
October 1st, 2007, 06:07 AM
#2
Driver Terrier
So this works on one machine but not the other?
Where are the java runtime files... in d:\appins\jdk1.5.11, or are they somewhere else because this is installed on a different machine?
Note that set JAVA_HOME = D:\Applns\JDK1.5.11
/bin/java -classpath \classes \lib\laf.jar
has two forward slashes... they should all be backslashes
-
October 2nd, 2007, 02:19 AM
#3
Registered User
Hi,
What is different between the two machines (OS? Patch Level?)
Gabriel
-
October 5th, 2007, 08:39 AM
#4
reply
actually both have same OS XP SP2
and all were be backslashes
This is posted from a the machine where this batch worked (in my office)and
other pc is at my home
 Originally Posted by NooNoo
So this works on one machine but not the other?
Where are the java runtime files... in d:\appins\jdk1.5.11, or are they somewhere else because this is installed on a different machine?
Note that set JAVA_HOME = D:\Applns\JDK1.5.11
/bin/java -classpath \classes \lib\laf.jar
has two forward slashes... they should all be backslashes
-
October 5th, 2007, 08:41 AM
#5
corrected reply
]
1
actually both have same OS windows XP SP2
2
and all were backslashes
NB:-
This is posted from a the machine where this batch worked (in my office)and
other pc is at my home
-
October 5th, 2007, 09:58 AM
#6
Driver Terrier
So do both machines have a directory called
D:\Applns\JDK1.5.11 ?
-
October 7th, 2007, 02:55 AM
#7
yes both have
But my doubt is
if i assign the variable
JAVA_HOME = D:\Applns\JDK1.5.11
if i write %JAVA_HOME%\bin
should nt it print like D:\Applns\JDK1.5.11\bin
to print this is it necessory that D:\Applns\JDK1.5.11\bin
should be an existing directory
-
October 7th, 2007, 03:47 AM
#8
Driver Terrier
Open a cmd window and type in set, press enter
It will show you the variables you have set.
You should also type in path and press enter to see if you have set the path for java as well. (note this is different to classpath).
Post the result of set and path...
You only seem to be setting java home - you need to set java as well.
This is from an old project of mine
SET JAVA_HOME="C:\Program Files\java\j2re1.4.1_02"
SET JAVA=%JAVA_HOME%\bin\java
If your office machine is also XP or 2k then it is likely the variables are set in the environmental variables within the properties for my computer, meaning that the batch file at the office isn't working either, it's just that XP already has the correct settings.
Never, ever approach a computer saying or even thinking "I will just do this quickly."
-
October 23rd, 2007, 08:25 AM
#9
updated the issue with details
HI
Sorry for being late..........
couldnt reply to u due to some personel probs..
Well, this are the details that u asked
-
October 23rd, 2007, 08:27 AM
#10
updated the issue with details
This is the details that i took from PC at my home
This is the bacth file that i run at home
************************************************** ***
set HOME = F:\Faisal\MalabarChat
set JAVA_HOME = C:\j2sdk1.4.2_05
set CLASSPATH = %classpath%;%HOME%;%JAVA_HOME%
%JAVA_HOME%\bin\java -classpath %HOME%\classes;%HOME%\lib\nilolaf.jar com.faisal.mc.client.MalabarChatScreenAction
pause
************************************************** ***
-
October 23rd, 2007, 08:28 AM
#11
This is the console details before running the batch
D:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\DEVADAS\Application Data
CLASS PATH=E:\elxsi\USApp_NewTag;C:\j2sdk1.4.2_05\bin;
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SYSTEM1
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\DEVADAS
LOGONSERVER=\\SYSTEM1
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem;C:\Program Files\Co
mmon Files\Adobe\AGL
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\DEVADAS\LOCALS~1\Temp
TMP=C:\DOCUME~1\DEVADAS\LOCALS~1\Temp
USERDOMAIN=SYSTEM1
USERNAME=DEVADAS
USERPROFILE=C:\Documents and Settings\DEVADAS
windir=C:\WINDOWS
-
October 23rd, 2007, 08:28 AM
#12
running the batch file
D:\>mcRunner.bat
D:\>set HOME = F:\Faisal\MalabarChat
D:\>set JAVA_HOME = C:\j2sdk1.4.2_05
D:\>set path = C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32 \Wbem;C:\Progra
m Files\Common Files\Adobe\AGL;\bin
D:\>\bin\java -classpath \classes;\lib\nilolaf.jar com.faisal.mc.client.MalabarC
hatScreenAction
The system cannot find the path specified.
D:\>pause
Press any key to continue . .
-
October 23rd, 2007, 08:30 AM
#13
console details after running the batch
D:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\DEVADAS\Application Data
CLASS PATH=E:\elxsi\USApp_NewTag;C:\j2sdk1.4.2_05\bin;
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SYSTEM1
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOME = F:\Faisal\MalabarChat
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\DEVADAS
JAVA_HOME = C:\j2sdk1.4.2_05
LOGONSERVER=\\SYSTEM1
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem;C:\Program Files\Co
mmon Files\Adobe\AGL
path = C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32 \Wbem;C:\Program Files\
Common Files\Adobe\AGL;\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\DEVADAS\LOCALS~1\Temp
TMP=C:\DOCUME~1\DEVADAS\LOCALS~1\Temp
USERDOMAIN=SYSTEM1
USERNAME=DEVADAS
USERPROFILE=C:\Documents and Settings\DEVADAS
windir=C:\WINDOWS
-
October 23rd, 2007, 08:31 AM
#14
************************************************** *
From this what i concluded is The system couldnt realize the symbol %%
sse the details of second "set"
path = C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32 \Wbem;C:\Program Files\
Common Files\Adobe\AGL;\bin
ie the variable value %JAVA_HOME% is not recogonised by the system
the value of this is "C:\j2sdk1.4.2_05" which is an existing value
The same case is for all other variables
************************************************** ******
-
October 24th, 2007, 06:54 AM
#15
Driver Terrier
Why are you setting the classpath to java_home and to the existing classpath and to your home?
The class path tells SDK tools and applications where to find third-party and user-defined classes -- that is, classes that are not Java extensions or part of the Java platform. The class path needs to find any classes you've compiled with the javac compiler -- its default is the current directory to conveniently enable those classes to be found.
Read the section Understanding the class path and package names here
Similar Threads
-
By latrelus in forum Spyware & Antivirus - Security
Replies: 16
Last Post: March 26th, 2007, 03:14 AM
-
By darinJersey in forum Windows NT/2000
Replies: 0
Last Post: June 16th, 2006, 01:56 AM
-
By Lt. Columbo (formally Joevegany@..) in forum Windows NT/2000
Replies: 3
Last Post: December 20th, 2001, 08:37 PM
-
By SusieQ in forum Windows 95/98/98SE/ME
Replies: 22
Last Post: June 11th, 2001, 12:24 PM
-
By chaucer in forum Networking
Replies: 12
Last Post: March 21st, 2001, 10:57 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks