Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Armando Peterson   on May 27 In Java Category.

  
Question Answered By: Heidi Larson   on May 27

Ok, please tell me do you get the same error while Running the same
application from command prompt with "java ...." . I think you have some
classes or objects that invokes their functions at runtime, and hence
you can compile but not run  your application. Try this solution::

1. Make a simple executable class  and name it "Trial.java" at the same
location you have your source files. From onwards I will call this class
"Parent"
2. In Trial class make an object of your class for which you are
receiving .NoClassDefFoundError, and invoke its any public method.
Assume this object as "Child"

3. Now since, this is just a trial class try Import statements or
Classpath settings from Forte and test on it. It should execute  your
"child" objects method.
4. When you again receive an error:: Try to relocate your "Child" (by
copying) Class on different locations I mention in earlier mail and
"Adding" them to your classpath.

NOTE:: Its a one time exercise after that you will definately learn
setting classpath in Forte. This is not an official method, Its my own
discovery while working with different IDEs.

NOTE2:: Whenever you use any ide  say Oracle JDeveloper 9i or SunOne
Studio (specially for GUI apps), always test your applications on system
with Sun's JDK without installing these IDEs. At the end you will
execute your application from "Outside" of IDE, isn't it?

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Forte IDE Problem - Running/Debuggin packed classes Or get search suggestion and latest updates.


Tagged: