Simple dbt on batch file
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19

Thread: Simple dbt on batch file

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    16

    Red face 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

  2. #2
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    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

  3. #3
    Registered User Gabriel's Avatar
    Join Date
    Aug 2000
    Location
    Tel Aviv Israel
    Posts
    2,161
    Hi,
    What is different between the two machines (OS? Patch Level?)

    Gabriel

  4. #4
    Registered User
    Join Date
    Sep 2007
    Posts
    16

    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


    Quote 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

  5. #5
    Registered User
    Join Date
    Sep 2007
    Posts
    16

    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

  6. #6
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    So do both machines have a directory called
    D:\Applns\JDK1.5.11 ?

  7. #7
    Registered User
    Join Date
    Sep 2007
    Posts
    16
    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

  8. #8
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    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."

  9. #9
    Registered User
    Join Date
    Sep 2007
    Posts
    16

    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

  10. #10
    Registered User
    Join Date
    Sep 2007
    Posts
    16

    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
    ************************************************** ***

  11. #11
    Registered User
    Join Date
    Sep 2007
    Posts
    16
    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

  12. #12
    Registered User
    Join Date
    Sep 2007
    Posts
    16
    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 . .

  13. #13
    Registered User
    Join Date
    Sep 2007
    Posts
    16
    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

  14. #14
    Registered User
    Join Date
    Sep 2007
    Posts
    16
    ************************************************** *

    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
    ************************************************** ******

  15. #15
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    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

  1. New window pop-up adverts!
    By latrelus in forum Spyware & Antivirus - Security
    Replies: 16
    Last Post: March 26th, 2007, 03:14 AM
  2. NTBackup Batch File Help
    By darinJersey in forum Windows NT/2000
    Replies: 0
    Last Post: June 16th, 2006, 01:56 AM
  3. Need help writing batch file.....
    By Lt. Columbo (formally Joevegany@..) in forum Windows NT/2000
    Replies: 3
    Last Post: December 20th, 2001, 08:37 PM
  4. Making a batch file to delete MP3 files
    By SusieQ in forum Windows 95/98/98SE/ME
    Replies: 22
    Last Post: June 11th, 2001, 12:24 PM
  5. [RESOLVED] NTbackup batch file
    By chaucer in forum Networking
    Replies: 12
    Last Post: March 21st, 2001, 10:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •