1

I'm using a java bootstrapping command to update a web application according to an xml file I've configured. The xml file has been checked and it's formatted correctly and referenced correctly in the script.

The problem: I keep getting an error that the system could not find or load the main class.

What I would like to do is to view the contents of the jar file. I know that to do this, I should run:

jar tf jarfilenameandpath 

What I don't know is WHERE I should run the command. I tried it from a windows command prompt and received the following error:

'jar' is not recognized as an internal or external command, operable file, or batch file.
Dave Newton
  • 158,873
  • 26
  • 254
  • 302
  • 2
    List the jar(s) content(s) and look for the class? It's not entirely clear what you'd need to do without more details. – Dave Newton Sep 16 '15 at 16:15
  • 1
    I'm sorry - I'm way out of my depth. I will try to list the jars contents, and find the class that way. I know that the documentation says the class is named ActivityGroupMain but I wonder if that is the real name and want to verify somehow. – Tiffany D. Montgomery Sep 16 '15 at 16:26
  • 1
    I just tried running the jar tf in the windows cmd prompt, but I'm not getting anywhere with that. Appreciate the help, as I know I'm completely knew to this and don't have any fundamentals whatsoever with Java. – Tiffany D. Montgomery Sep 16 '15 at 16:32
  • "Not getting anywhere" isn't diagnostic; no clue what happened. We don't have any way of knowing what you're talking about unless you're explicit. We don't know what you're configuring, how you're trying to configure it, how you're looking for the class, what happened when you did, what the actual specific error you're seeing is (and when), etc. – Dave Newton Sep 16 '15 at 16:34
  • 1
    In the windows command prompt, I typed the following ==> C:/ jar tf jarfilename <== I'm thinking that's not even remotely the correct place to run that command. But I dont know. All I know is that running it, I got this result ==> jar is not recognized as an internal or external command, operable file, or batch file – Tiffany D. Montgomery Sep 16 '15 at 16:37
  • Edit the question; don't try to wedge large chunks of technical info into comments. – Dave Newton Sep 16 '15 at 16:40
  • That means `jar` isn't on your $PATH (it might not even be installed; I don't know if you have a JDK installed). – Dave Newton Sep 16 '15 at 16:44
  • It's a virtual machine, hosted, and serves as an application server. I'm sure I dont have JDK installed. Is that the issue? I have edited my question - thanks for the feedback. – Tiffany D. Montgomery Sep 16 '15 at 16:46
  • Without a JDK, you don't have the `jar` command-line tool. But instead, you can make a copy of the jar, change its name from `.jar` to `.zip` and try to look at its content in WinZip or a similar zip-viewer. – RealSkeptic Sep 16 '15 at 16:47
  • Or on any currently supported Windows (Vista and up) you can open a `.zip` as a folder/tree in File Explorer. – dave_thompson_085 Sep 16 '15 at 17:44
  • wonderful! thanks all for the help! – Tiffany D. Montgomery Sep 16 '15 at 17:50

1 Answers1

0

You don't have to run that command to see whats there in .jar better way to do it is download the Java Decompiler

See all the classes and try to find the conflict. If everythings looks fine. The only way you can solve this problem is by debugging it.

Did you set Java PATH variable on your Windows machine?

For more details on de-compilers, visit this page on stackoverflow

Community
  • 1
  • 1