Results 1 to 12 of 12
  1. #1
    francisdt is offline Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    0

    Angry java cmd replacing periods with slashes?

    it does it throughout the command?
    How do I fix it?

    Command:
    java -cp C:/ptc/Windchill_9.1/Windchill/codebase;
    C:/ptc/Windchill_9.1/Windchill/codebase/WEBINF/lib/wc3rdpartylibs.jar;C:/ptc/Win
    dchill_9.1/Windchill/codebase/Upgrade/lib/saxon.jar; C:/ptc/Windchill_9.1/Windch
    ill//codebase/Upgrade/lib/gnu-getopt.jar;C:/ptc/Windchill_9.1/Windchill//codebas
    e/Upgrade/lib/EvoTools.jar;C:/ptc/Windchill_9.1/Windchill/codebase/WEB-INF/lib/i
    e3rdpartylibs.jar com.ptc.windchill.upgrade.dust.DiagnosticToolDrive r -r -d C:/p
    tc/Windchill_9.1/Windchill/Evolvability-xml-logs -l 9.1 q

    It is replacing all the 9.1 with 9/1 and messing up the command?

    Error:
    Exception in thread "main" java.lang.NoClassDefFoundError: C:/ptc/Windchill_9/1/
    Windchill//codebase/Upgrade/lib/gnu-getopt/jar;C:/ptc/Windchill_9/1/Windchill//c
    odebase/Upgrade/lib/EvoTools/jar;C:/ptc/Windchill_9/1/Windchill/codebase/WEB-INF
    /lib/ie3rdpartylibs/jar
    Caused by: java.lang.ClassNotFoundException: C:.ptc.Windchill_9.1.Windchill..cod
    ebase.Upgrade.lib.gnu-getopt.jar;C:.ptc.Windchill_9.1.Windchill..codebas e.Upgrad
    e.lib.EvoTools.jar;C:.ptc.Windchill_9.1.Windchill. codebase.WEB-INF.lib.ie3rdpart
    ylibs.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
    Could not find the main class: C:/ptc/Windchill_9.1/Windchill//codebase/Upgrade/
    lib/gnu-getopt.jar;C:/ptc/Windchill_9.1/Windchill//codebase/Upgrade/lib/EvoTools
    .jar;C:/ptc/Windchill_9.1/Windchill/codebase/WEB-INF/lib/ie3rdpartylibs.jar. Pr
    ogram will exit.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,422
    Rep Power
    25

    Default

    it does it
    What is the first "it"?
    A batch file, the OS, java.exe?

    On Windows shouldn't the path separator be a \?

  3. #3
    francisdt is offline Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    0

    Default

    Thanks, I thought that as well, but I am running this command from an install manual and had run it earlier in the process with a directory without a period in the name and it worked at that time?

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,422
    Rep Power
    25

    Default

    from an install manual
    Don't know how to do that. I've heard of running a program from a command line or from a IDE, but never from a manual.

    What happens when you use \s? Could you show the console?

    Do need to have the . in a folder name?

  5. #5
    francisdt is offline Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    0

    Default

    haha - yea, allow me to clarify, "it" is the program or the java execution? it is doing it to me - haha when i said from a manual, I meant from and installation document that is explaining to me how to install/upgrade the software. Here is the error when i replaced the slashes with back slashes...
    Thanks for your help and interest! :)

    C:\ptc\Windchill_9.1\Windchill\codebase\WEBINF\lib \wc3rdpartylibs.jar; C:\ptc\Wi
    ndchill_9.1\Windchill\codebase\Upgrade\lib\saxon.j ar;C:\ptc\Windchill_9.1\Windch
    ill\codebase\Upgrade\lib\gnu-getopt.jar; C:\ptc\Windchill_9.1\Windchill\codebase
    \Upgrade\lib\EvoTools.jar;C:\ptc\Windchill_9.1\Win dchill\codebase\WEB-INF\lib\ie
    3rdpartylibs.jar com.ptc.windchill.upgrade.dust.DiagnosticToolDrive r -r -d C:\pt
    c\Windchill_9.1\Windchill\Evolvability-xml-logs -l 9.1 -q
    Exception in thread "main" java.lang.NoClassDefFoundError: C:\ptc\Windchill_9/1\
    Windchill\codebase\Upgrade\lib\saxon/jar;C:\ptc\Windchill_9/1\Windchill\codebase
    \Upgrade\lib\gnu-getopt/jar;
    Caused by: java.lang.ClassNotFoundException: C:\ptc\Windchill_9.1\Windchill\code
    base\Upgrade\lib\saxon.jar;C:\ptc\Windchill_9.1\Wi ndchill\codebase\Upgrade\lib\g
    nu-getopt.jar;
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
    Could not find the main class: C:\ptc\Windchill_9.1\Windchill\codebase\Upgrade\l
    ib\saxon.jar;C:\ptc\Windchill_9.1\Windchill\codeba se\Upgrade\lib\gnu-getopt.jar;
    . Program will exit.

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,422
    Rep Power
    25

    Default

    I don't see the command line you used. Copy ALL of the console.

  7. #7
    francisdt is offline Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    0

    Default

    java -cp C:\ptc\Windchill_9.1\Windchill\codebase;
    C:\ptc\Windchill_9.1\Windchill\codebase\WEBINF\lib \wc3rdpartylibs.jar; C:\ptc\Wi
    ndchill_9.1\Windchill\codebase\Upgrade\lib\saxon.j ar;C:\ptc\Windchill_9.1\Windch
    ill\codebase\Upgrade\lib\gnu-getopt.jar; C:\ptc\Windchill_9.1\Windchill\codebase
    \Upgrade\lib\EvoTools.jar;C:\ptc\Windchill_9.1\Win dchill\codebase\WEB-INF\lib\ie
    3rdpartylibs.jar com.ptc.windchill.upgrade.dust.DiagnosticToolDrive r -r -d C:\pt
    c\Windchill_9.1\Windchill\Evolvability-xml-logs -l 9.1 -q

  8. #8
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,422
    Rep Power
    25

    Default

    Can you preserve the line ends when you paste. I can't tell where one line ends and the next one begins. Also your posting does not show ALL of the console. There are no error messages.

    Please run a FULL test and copy ALL of the console and paste it here in QUOTE or CODE tags to preserve lines.

    Check that there are no embedded spaces in the classpath.
    Last edited by Norm; 07-15-2010 at 04:30 PM.

  9. #9
    francisdt is offline Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    0

    Default



    It is one continuous command, so assume there are no line ends. Also, if you look at previous posts, you will see the errors being returned.

  10. #10
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,422
    Rep Power
    25

    Default

    Ok. If you can't help me help you, I'll let some one else try.

  11. #11
    francisdt is offline Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    0

    Default

    Hmmmm? I am not sure how much more I can provide, but thank you for trying! : )

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default

    Assuming by removing the line breaks that I have the same command you used, based on the first one you pasted you have a space.

    Here it is in tags:
    Java Code:
    java -cp C:/ptc/Windchill_9.1/Windchill/codebase;C:/ptc/Windchill_9.1/Windchill/codebase/WEBINF/lib/wc3rdpartylibs.jar;C:/ptc/Windchill_9.1/Windchill/codebase/Upgrade/lib/saxon.jar; C:/ptc/Windchill_9.1/Windchill//codebase/Upgrade/lib/gnu-getopt.jar;C:/ptc/Windchill_9.1/Windchill//codebase/Upgrade/lib/EvoTools.jar;C:/ptc/Windchill_9.1/Windchill/codebase/WEB-INF/lib/ie3rdpartylibs.jar com.ptc.windchill.upgrade.dust.DiagnosticToolDrive r -r -d C:/ptc/Windchill_9.1/Windchill/Evolvability-xml-logs -l 9.1 –q
    Here's an edited version so you can see where the space is.
    Java Code:
                          v - here
    java -cp ...;...;...; C:/ptc/Windchill_9.1/Windchill//codebase/Upgrade/lib/gnu-getopt.jar;C:/ptc/Windchill_9.1/Windchill//codebase/Upgrade/lib/EvoTools.jar;C:/ptc/Windchill_9.1/Windchill/codebase/WEB-INF/lib/ie3rdpartylibs.jar com.ptc.windchill.upgrade.dust.DiagnosticToolDrive
    With that space there it thinks the stuff after it is the classname of the main class to run.

Similar Threads

  1. How to make a Periods of time
    By Tritek in forum New To Java
    Replies: 1
    Last Post: 05-18-2010, 12:39 AM
  2. Replacing Else If
    By jingly99 in forum Advanced Java
    Replies: 5
    Last Post: 12-28-2009, 11:06 PM
  3. Help Replacing String
    By 7oclock in forum New To Java
    Replies: 5
    Last Post: 02-14-2009, 07:31 AM
  4. replacing characters???
    By manda147 in forum New To Java
    Replies: 2
    Last Post: 11-29-2008, 08:19 AM
  5. Replacing at an index
    By bugger in forum New To Java
    Replies: 2
    Last Post: 01-29-2008, 06:33 AM

Tags for this Thread

Posting Permissions

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