The Artima Developer Community
Sponsored Link

Java Answers Forum
query

2 replies on 1 page. Most recent reply: Jun 22, 2005 4:10 AM by Shashank D. Jha

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
hithendrakumar

Posts: 1
Nickname: kumar19
Registered: Jun, 2005

query Posted: Jun 21, 2005 9:34 PM
Reply to this message Reply
Advertisement
Hai.. i have some problem in java....
I compiled a java code and after that it created a .class file in that directory. As and when i am trying to run that .class using java command , it is giving that No class Def found error... There was no package structure in that prog. Even the simple hello world program is also not working... Sometimes it is working while running in the text pad and at the same time it is not working while running in the command prompt.. can u people suggest solution for this query


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: query Posted: Jun 21, 2005 11:15 PM
Reply to this message Reply
if the file is called "MyClass.class" you must call it with:

java MyClass

also try

java -cp . MyClass

Shashank D. Jha

Posts: 68
Nickname: shashankd
Registered: May, 2004

Re: query Posted: Jun 22, 2005 4:10 AM
Reply to this message Reply
Also let us know if you are trying to launch that program from the same directory where class file is created.

Flat View: This topic has 2 replies on 1 page
Topic: Arrays - add selected elements Previous Topic   Next Topic Topic: Setting Image as Background for JFrame.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use