This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Why does my java program only run with -debug in my parameters  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying to run a java program on the UNIX shell of our Z/OS mainframe box and I am having trouble with my classpath.

I am running the java HelloWorld command within the directory that the class file is and I am getting an error message saying that it cannot find class HelloWorld. I have tried the java command with the following variations.
java �classpath . HelloWorld
java �classpath �.� HelloWorld
java �classpath /u/yzilg1 HelloWorld (/u/yzilg1) is the directory HelloWorld is in
java �classpath �/u/yzilg1� HelloWorld
java �classpath u/yzilg1 HelloWorld
java �classpath �u/yzilg1� HelloWorld

I have also set the CLASSPATH in my .profile file to /u/yzilg1 and when I type echo �CLASSPATH it does show the one I put in my .profile. None of these work.

However when I tried java �debug HelloWorld without any classpath details the program runs and displays the message on the screen.

It is the same for jar files that I have copied across from my PC. They only run when �debug is added to the java command.

Why would �debug make the programs run and how can I make it work without it?

Any ideas would be gratefully received.

Thanks.
[ August 05, 2005: Message edited by: Sarah Barnes ]
 
Sheriff
Posts: 9087
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java �classpath . HelloWorld
java �classpath �.� HelloWorld
java �classpath /u/yzilg1 HelloWorld (/u/yzilg1) is the directory HelloWorld is in
java �classpath �/u/yzilg1� HelloWorld
java �classpath u/yzilg1 HelloWorld
java �classpath �u/yzilg1� HelloWorld


Have you tried
java HelloWorld
??
 
Sarah Barnes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I forgot to add that to my list of attempts, but I have tried java HelloWorld
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!