Archived

This topic is now archived and is closed to further replies.

JamesBlonde001

[java] JBuilder Compile Error 908

Recommended Posts

For some reason I can''t compile my first project. According to Borland, its because JBuilder cant find the source file to compile it. Yet I can see it in a explorer window in the project folder. When I created the project I ensured that using the project dir for the source files was enabled. If I can''t complile the source file there, where should it be? (Does it need its own directory maybe?) Thanks Specs OS: Win2K IDE: JBuilder 5 Personal ps. Mods, feel free to move this to beginers

Share this post


Link to post
Share on other sites
Can you give us an error message? Or perhaps code surrounding the lines that generate the exception?

Just as a guess, I''d say check your package set up. If you have source files placed in directories that do not match the package statement at the beginning of the class, this might cause your problem.

Optus

Share this post


Link to post
Share on other sites

package MyFirstProject;

public class HelloWorld
{
public static void main(String args[]) throws Exception
{
System.out.println ("Hello world!");
System.in.read();
}
}



Share this post


Link to post
Share on other sites
By any chance are you using a path that has an embedded space in the name, i.e. C:\Program Files? If so, you may get a number of errors, as JBuilder uses URLs to locate files on local machines. The spaces translate into %20 in the URL, and this can cause all kinds of confusion when its trying to look on the disk...


SketchSoft OFFLINE | SketchNews OFFLINE | NewKlear Studios

Share this post


Link to post
Share on other sites
Sorry- I wanted to post this yesterday but I was interupted.

And YES there are spaces in the path... (Docs and settings)

hmmm... I had a similar problem with file names in web page development.


Warning #: 908 : check sourcepath; source c:\Documents and Settings\Sean\jbproject\MyFirstProject\Helloworld.java cannot be found on sourcepath by appending \MyFirstProject\Helloworld.java to each sourcepath entry

Share this post


Link to post
Share on other sites
ok the path is now on a seperate drive (I have a bad habit of reformatting the C drive)

Warning #: 908 : check sourcepath; source d:\Java\MyFirstProject\HelloWorld.java cannot be found on sourcepath by appending \MyFirstProject\HelloWorld.java to each sourcepath entry

//When I compile this error occurs


Unable to start runtime due to incomplete configuration.


The VM settings are blank. Shouldn''t the compiler already know these settings?

I have tried making the java file in the myfirstproject folder and in the java folder. But I still get the warning and it will not execute.

It seems like I''m doing somthing small wrong.




Share this post


Link to post
Share on other sites