I know nothing of JavaI asked a fellow programmer about this problem I have been messing with and he suggested I try in the Java area (I origonaly posted in the VB area). Please check this out and see if you have any ideas:
http://www.vbforums.com/showthread.p...hreadid=209827
the gist of it is as follows
Originally posted by me
I'm not to sure how this batch file works (basicly it is contacting another co's server and transfering files) but I believe it is through java. I control it via the command window. Will it be hard or even possible to convert to vb?
code:--------------------------------------------------------------------------------
echo off
rem set JDK_BIN=D:\jdk\bin\
SET CLASSPATH=D:\blahxf\java;D:\Blahxf\lib\email.jar;D:\Blahxf\lib\jnet.jar;D:\Blahxf\lib\foo.jar
SET CLASSPATH=%CLASSPATH%;D:\Blahxf\lib\jsse.jar;D:\Blahxf\lib\jcert.jar
JAVA -Xms8M com.Blah.interfaces.pms1way.BlahClient -S Y
--------------------------------------------------------------------------------Originally posted by PhilRob56
Recently I came across a nice VB Class module that executes a DOS command and captures the output to any control (textbox / label) that you like. The good thing about it is that it uses the API to execute the DOS command and therefore you don't get the DOS window - the whole process is invisible.
I use it to read the EXIF data from digital camera files, because the program I have to extract the data is a command line program only.
If you want it let me know and I will post it for you.Originally posted by me
the batch file is in a directory on d: and has to be there (I may be able to fix it if I have to but wont be fun ) and I believe the exe has to be in the root of c:. easy right just do this:
d:
cd theDirectory
theBatch.bat
but the d: (and anything but "help" or the batch name) gives the error:
quote:
--------------------------------------------------------------------------------
File or command not found.
--------------------------------------------------------------------------------
I tried (to first switch to the d: directory):
visual basic code:--------------------------------------------------------------------------------
objDOS.CommandLine = "d:"
objDOS.ExecuteCommand
--------------------------------------------------------------------------------
and
visual basic code:--------------------------------------------------------------------------------
temp = "d:"
objDOS.CommandLine = """" & temp & """" 'txtCommand.Text
objDOS.ExecuteCommand
--------------------------------------------------------------------------------
both gave that same error
I can go to the batch file directly like so:
code:--------------------------------------------------------------------------------
d:\theDirectory\Thebatch.bat
--------------------------------------------------------------------------------
and it will run but it has its own error cos it cannot find the files it needs (I may have to just edit it but won't be fun)
OR
I wote a batch file containg this:
code:--------------------------------------------------------------------------------
d:
cd theDirectory
theBatch.bat
--------------------------------------------------------------------------------
now if I run that batch file from the command window it works perfectly but in the program I have the problem where the exe will show up in the task manager but not really run.
any ideas?Thanks,Originally posted by me
I just ran the batch with the full path again and this is the error I get:
quote:
--------------------------------------------------------------------------------
C:\>echo off
SrmsPms1WayClient initialized at Tue Nov 05 14:47:34 CST 2002
SrmsPMSSettings.properties not found! Using default values.
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.bLaH.interfaces.pms1way.SrmsPMSSettings.getServerPort(SrmsPMSSettings.java:163)
at com.bLaH.interfaces.pms1way.SrmsPMSSettings.setupUrl(SrmsPMSSettings.java:387)
at com.bLaH.interfaces.pms1way.SrmsPMSSettings.<init>(SrmsPMSSettings.java:87)
at com.bLaH.interfaces.pms1way.SrmsPms1WayClient.main(SrmsPms1WayClient.java:89)
Exception in thread "main"
--------------------------------------------------------------------------------
Michael


I asked a fellow programmer about this problem I have been messing with and he suggested I try in the Java area (I origonaly posted in the VB area). Please check this out and see if you have any ideas:
Reply With Quote
CornedBee