File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Question on how to run an application.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Question on how to run an application...." Watch "Question on how to run an application...." New topic

Question on how to run an application....

Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
Hi friends,
I have a simple application which is:

class Test
public static void main(String args[])
System.out.println("Hello World!");

and I do not know how to run it in Forte 2.0 Community Edition?
I tried to run it but I got this Error!
Could you please help me whoever is familiar with Forteh or let me know where I can ask?
Many thanks,
java.lang.NoClassDefFoundError: WEB-INF/classes/com/srs/bugtrack/Test (wrong name: Test)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
Donald R. Cossitt
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
I know nothing about Forte 2.0. But I have seen that error many times in the beginning. Are you trying to run the program from the console? When I got that error it was because I had placed package packageName; in my code then tried to run the file from the console while being in the same folder as the class.
Comment out your // package packageName; then recompile then run your code again. Having said all that, if you are trying to run your class from within your IDE, it is curious to me that this error would come from running the program from within your IDE.

Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
First off thank you so much for the response.
But I do not have any Package to Comment out
Hope to get more help,
Syamsul Hussin
Ranch Hand

Joined: Feb 09, 2003
Posts: 59
make sure the name of the class is the same as the name of the file .java.
if the name of the class is Test then the name of the file should be
hope this helps.

----------------------------------<br />SCJP 1.4
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to The IDEs and Other Tools Forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
It is sorta covered in the JavaRanch Style Guide.
subject: Question on how to run an application....
jQuery in Action, 3rd edition