Results 1 to 9 of 9
Like Tree1Likes
  • 1 Post By Fubarable

Thread: [Help]Java is responding strangely, could it be corrupt?

  1. #1
    Pianoasis is offline Member
    Join Date
    Sep 2012
    Posts
    5
    Rep Power
    0

    Default [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.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    jharte is offline Member
    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    Default 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.

  4. #4
    Pianoasis is offline Member
    Join Date
    Sep 2012
    Posts
    5
    Rep Power
    0

    Default Re: [Help]Java is responding strangely, could it be corrupt?

    Quote Originally Posted by jharte View Post
    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?

  5. #5
    Pianoasis is offline Member
    Join Date
    Sep 2012
    Posts
    5
    Rep Power
    0

    Default Re: [Help]Java is responding strangely, could it be corrupt?

    Quote Originally Posted by Fubarable View Post
    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.

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default 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.

  7. #7
    Pianoasis is offline Member
    Join Date
    Sep 2012
    Posts
    5
    Rep Power
    0

    Default Re: [Help]Java is responding strangely, could it be corrupt?

    Thank you but now what do I do about the -cp not being recognized?

  8. #8
    Pianoasis is offline Member
    Join Date
    Sep 2012
    Posts
    5
    Rep Power
    0

    Default 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..

  9. #9
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default 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.

Similar Threads

  1. Java Binaries not responding.
    By Taz07 in forum Java Gaming
    Replies: 3
    Last Post: 09-24-2012, 03:14 AM
  2. Simple code strangely not working..
    By Norris80 in forum New To Java
    Replies: 11
    Last Post: 02-18-2012, 12:36 AM
  3. java program writing corrupt file
    By grashmi13 in forum XML
    Replies: 0
    Last Post: 12-08-2011, 02:02 PM
  4. actionPerformed acting strangely
    By Fortu in forum New To Java
    Replies: 18
    Last Post: 04-10-2011, 04:07 AM
  5. Data in JteaxtArea getting corrupt
    By simmi in forum AWT / Swing
    Replies: 4
    Last Post: 08-25-2009, 09:34 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
  •