I have a problem that causes my whole project to function incorrect.
Later I found out what was causing it, and I can’t fix it.
The problem is my VB.net application cannot find the file, and I’m 100% sure the file is there.
(to be honest I have to open minecraft.jar in \bin\minecraft.jar, relative from the application. But I tried it with a text file and it doesn’t work either)
Try
Shell(Application.StartupPath + "\options.txt")
Catch Ex As Exception
MsgBox(ErrorToString) ' I've got file not found..
MsgBox(Application.StartupPath + "\options.txt") 'Displays the path to my file, and in Explorer (Windows) it opens the file
End Try
Shellexpects a path to an executable. It will throw aFileNotFindExceptioneven if the file is there when it is not an executable.From the documentation:
If you want windows to decide which programm to use to open your file, use
Process.Startinstead.EDIT:
OK, you totally changed your question, but I’m cool with that:
You have a space in your paths, so you have to quote it (put in between two
").Otherwise, the java executable will not be able to distinguish between the arguments you pass to it.