Article View: borland.public.jbuilder.java.language
Article #7631Paul's DelphiToJava chapter 3 problem
From: Thomas Schulz
Date: Thu, 31 May 2001 10:48
Date: Thu, 31 May 2001 10:48
76 lines
2546 bytes
2546 bytes
It reports the following error:
----------------------------
Exception in thread "main" java.lang.NoClassDefFoundError:
testingstrings/Main
Now the funny thing is that I've done everything 100% (as far as I can see,
but I may be dum :) as explained to avoid this..
This is my code:
----------------
package testingstrings;
import java.io.*;
/**
* Title: Testing Strings
* Description: N/A
* Copyright: Copyright (c) 2000
* Company: N/A
* @author Thomas Schulz
* @version 1.0
*/
public class MainClass {
public static void main(String args[]) {
byte a[]=null;
try {
System.in.read(a);
}
catch(IOException ioex){
ioex.printStackTrace();
}
}
public MainClass() {
}
}
This is dir setup:
----------------
Output path:
D:/programmering/current projects/Mine/JBuilder/testingstrings/classes
Backup path:
D:/programmering/current projects/Mine/JBuilder/testingstrings/Backups
Working directory:
D:/programmering/current projects/Mine/JBuilder/testingstrings
Source:
D:/programmering/current projects/Mine/JBuilder/testingstrings/Dev
This is how I try to execute it:
-----------------------------
In console I place myself in
D:\programmering\current projects\Mine\JBuilder\testingstrings\classes
I then enter "java testingstrings.Main"
Obviously I must be doing something wrong.. But what?
I can see JBuilder places e.g. the files in the classes directory like this:
D:\programmering\current
projects\Mine\JBuilder\testingstrings\classes\testingstrings\MainClass.class
I hope someone can help...?
Regards
Thomas Schulz
Technical Details
Message-ID:
<3b1621fb_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,ec4d5c2de0b0d253,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-31 04:14:12 PST From: "Thomas Schulz" <dk_sz@hotmail.com> Newsgroups: borland.public.jbuilder.java.language Subject: Paul's DelphiToJava chapter 3 problem Date: Thu, 31 May 2001 12:48:52 +0200 Lines: 78 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 195.215.248.169 Message-ID: <3b1621fb_1@dnews> X-Trace: dnews 991306235 195.215.248.169 (31 May 2001 03:50:35 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews