JBuilder IDE: Anyone use it here? How to add a JTextEditor and make it open an HTML file?

statik213

Golden Member
Oct 31, 2004
1,654
0
0
I can't figure out how to do this using the GUI... I can call setPage(URL) from within the app but it messes other things up.... Specify the HTML with a relative path using class.getResource(....) does not work as JBuilder does not copy the HTML file to the build directory when I Make the project. It works fine if I specify an absolute path but that's not the end behaviour I want..... I don't want to copy each html file to the corresponding directory in the build directory.
I'm guesing there's some way of doing this via the GUI so that JBuilder knows that the HTML file is part of the project. Anybody know how to make this sort of thing work?


 

statik213

Golden Member
Oct 31, 2004
1,654
0
0
Also, in the project browser when I add html files they do not appear in their corresponding package, they bunch up at the root level in the project browser. It does not have any problems with image files though....

aaarh!
 

znaps

Senior member
Jan 15, 2004
414
0
0
I think you might not have your html files in a defined source directory in your JBuilder project. If you did, then it would copy them into wherever your classes are compiled, and getResource() would find them. That's the correct way to do it.
 

statik213

Golden Member
Oct 31, 2004
1,654
0
0
Originally posted by: znaps
I think you might not have your html files in a defined source directory in your JBuilder project. If you did, then it would copy them into wherever your classes are compiled, and getResource() would find them. That's the correct way to do it.
I know that this is the problem but for some reason it does not let me add html files to the project.
If I have a class biz in package foo.bar, I can place an html file inside src/foo/bar/test.html by right-clicking bar in the project explorer and doing new->file->html. I can see that the file is in /src/foo/bar/test.html.
But in the project eplorer it does not appear to be under the foo.bar package, it appears outside the package at the root level of the project explorer. Making the project fails to copy the html file over. It's the same with regular text and XML files. But it lets me add graphic files into the package hierachy and copies them over when I make.
I've tried lookin for a package filter that may be exclusing non .java/graphic files from a build but I havent found anything like that.
Have you seen this happen?
 

znaps

Senior member
Jan 15, 2004
414
0
0
It sounds like something like that is going on, but I can't say for sure. I'm an Eclipse user, so can't really help further..sorry :/