[Help]Java is responding strangely, could it be corrupt?
I'm only trying to launch a simple batch file and it couldn't find javaw on it's own so I entered the directory, but now it's saying it doesn't recognize -cp as a command. Can anyone help? Here's the .bat code:
@echo off
start "C:\Program Files (x86)\Java\bin\bin\javaw" -cp lib\bspsrc.jar info.ata4.bspsrc.gui.BspSourceFrame %*
And here's the error:
Windows cannot find '-cp'. Make sure you typed the name correctly, then try again.
I'm starting to think Java is corrupt, but I've reinstalled it 3 times.
Re: [Help]Java is responding strangely, could it be corrupt?
Be careful how you use quotation marks.
Re: [Help]Java is responding strangely, could it be corrupt?
You will likely need to just move the ending double quote to the end so that it recognizes the whole text as one command.
Re: [Help]Java is responding strangely, could it be corrupt?
Quote:
Originally Posted by
jharte
You will likely need to just move the ending double quote to the end so that it recognizes the whole text as one command.
Windows still doesn't recognize -cp. What is the function of -cp anyways? Is there any command I could use to replace it?
Re: [Help]Java is responding strangely, could it be corrupt?
Quote:
Originally Posted by
Fubarable
Be careful how you use quotation marks.
Thanks. I just hate how Windows makes one of it's most important folders have a space in the name.
Re: [Help]Java is responding strangely, could it be corrupt?
You can use the short form for the directory names
C:\Progra~1\Java\...etc
Also the java bin directory that holds javaw.exe should be on your system's path if you've set things up properly.
Re: [Help]Java is responding strangely, could it be corrupt?
Thank you but now what do I do about the -cp not being recognized?
Re: [Help]Java is responding strangely, could it be corrupt?
Nevermind. I had to manually move javaw out of Program Files and rerun the command. Windows 7 is a bit overboard with their protections..
Re: [Help]Java is responding strangely, could it be corrupt?
Your "solution" makes no sense. Are you properly setting the path of your Windows to include the bin file of your JDK directory? You can easily test this by opening a cmd.exe window and enter the command, path, and seeing if the output includes the jdk's bin directory. If you properly set this up and properly call your javaw command, everything should work. If not, then consider posting the contents of your system path, and show us again your latest attempt to run java by posting a cmd window dump here.