• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Linux, KDE, JBuilder ...

 
Trailboss
Posts: 24082
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I just started this new gig. It turns out that the java app is heavily tied to linux. I cannot reasonably develop on Win2000.
Okay.
I've used a lot of Linux for server stuff. I've used a lot of unix servers too. I knew enough on how to get around and do the things I needed to.
Now I'm jumping into the workstation side. I've tinkered with some Linux GUI stuff before. I've used CDE on Solaris quite a bit a long time ago (again, I knew just enough to do what I had to).
Oh yeah - another wrench in this works: I'm the only engineer here. There is nobody to ask anything. I have to figure it all out on my own.
I popped out to Barnes and Noble and bought "HDE Bible" and "Linux for Dummies". I've found kde.org ...
The app isn't as clear cut as I would like. It seems to be heavily tied to JBuilder for Linux. I usually like to use my own editor and the JDK from sun. I guess this will have to be a compounded learning experience.
I couldn't find any decent JBuilder books. And the folks I work for are still looking for the books that came with JBuilder. It seems that those books will be an important step. I used JBuilder 1.0 and was not impressed. It wanted to permanently tie you to them and try to seperate you from Java. Not so anymore?
So I'm looking through the machine and trying to get the lay of the land. What is "Borland Kylix"?
Since I couldn't find a way to activate the application I'm working on from the command line, I hit "run" from within JBuilder. It started making a bunch of windows and when I had seen enough I couldn't get the windows to go away. One (possibly more) went to a big gray rectangle and insisted on being on top of everything else. I ended up having to shut down KDE and start over. How could I have handled this better?
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't help you with Linux stuff really, but I use JBuilder for Windows, so I have a few comments...

The app isn't as clear cut as I would like. It seems to be heavily tied to JBuilder for Linux. I usually like to use my own editor and the JDK from sun. I guess this will have to be a compounded learning experience.


This should still be possible, with the inclusion of a few jar files to your classpath. See below...


I couldn't find any decent JBuilder books. And the folks I work for are still looking for the books that came with JBuilder. It seems that those books will be an important step. I used JBuilder 1.0 and was not impressed. It wanted to permanently tie you to them and try to seperate you from Java. Not so anymore?


Not in my experience. I think some of what you saw in 1.0 may have been Borland's attempts to offer more options than awt - remember, this was before swing, and a lot of customers were finding awt lacking. Like you, I tried 1.0 and was similarly unimpressed. I tried to make a GUI, and the generated code was not at all pretty. I ignored JBuilder for a while, and finally came back for version 4.0 and subsequent releases, which I like quite well. Though to be fair I haven't done much GUI stuff with it. But it seems entirely possible to create GUIs in JBuilder which use only standard awt/swing components. Borland also offers a number of optional widjets of their own which you can employ. These are available in redistributable jar files naturally, and you can view the source if you like.
As far as books are concerned - I've always just gotten by with trial and error, actually. It's been fairly easy for me to find stuff. Of course, it helps if you're not dealing with several other learning curves at the same time. But I don't think there's much in the books that isn't also available from the JBuilder help menus. Browse them a while and see what you find.

So I'm looking through the machine and trying to get the lay of the land. What is "Borland Kylix"?


Apparently it's like Delphi for Linux. That is, it's an IDE based around a sort of Object Pascal. That's about all I know.


Since I couldn't find a way to activate the application I'm working on from the command line, I hit "run" from within JBuilder. It started making a bunch of windows and when I had seen enough I couldn't get the windows to go away. One (possibly more) went to a big gray rectangle and insisted on being on top of everything else. I ended up having to shut down KDE and start over. How could I have handled this better?


The moment you hit run, a new panel (or a new tab on an existing panel) should have appeared across the bottom of your screen. This shows System.out and System.err from the program. The tab label shows the name of the main class. Just above this are two button/indicators, a square and a triangle. While the program is running, the triangle is grayed out, and the square is red - this is the stop button. Pressing this should kill the JVM that your program was running in - and, hopefully, all those nasty windows that were spawned. Once it's stopped, the red box goes gray, and the triangle turns green - another start (or restart) button. Should you wish to try again.
When you run from JBuilder, the very first line in the output window shows the exact command used to invoke java for this application. It's probably horrendously long, since it lists all the library jars in the -classpath option - but you can start here if you want to invoke from the command line instead.
 
paul wheaton
Trailboss
Posts: 24082
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see the green arrow, but don't have a red box. I guess this is a difference with the linux version.
I thought the books would be good so I could get the general idea of it's idea of projects and what not. Cuz whoever developed this, is probably taking advantage of the full jbuilder package.
This is JBuilder 4.
I'm still trying to figure out how to map what it calls "library" to a jar file, class, or whatever.
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't used 4 for a while - hopefully my info is still valid for you. Caveat lector.

I see the green arrow, but don't have a red box. I guess this is a difference with the linux version.


Not necessarily. Actually there are several possible locations for green arrows. :roll: You may see one on the tab label itself, right next to the main class name. Not that one. Instead look a little bit up and to the left - below the text area of the tab, but above the tab label. There should be either (a) a green arrow and gray box, or (b) a gray arrow and red box. You wouldn't see them both in color at the same time. A gray box indicates that there's nothing to stop - only restarting is an option. Start again, and you should see the colors switch - if only briefly (while main() is executing, I suppose.)
However, I have no idea why there would still be windows open after the red button has gone gray. Maybe it's a native process spawned by Runtime exec()? Or as you said, things may be different on Linux.


I'm still trying to figure out how to map what it calls "library" to a jar file, class, or whatever.


A "library" in JBuilder is a collection of one or more class or jar files. When you add a libary to a given project, you're telling JBuilder to put all those jar files in the class path. I usually just create one library per jar file, with matching names, so I can see which jars I'm really using, but if you have a lot of them it may be useful to user larger groupings. Go to Project -> Project Properties -> Paths tab -> Required Libraries subtab. This is a list of the libraries currently associated with your project. If there are any, you can select one and hit "edit" to see what it contains. If you want to add a new one, hit "add". This gives you a list of all libraries which have been defined, but are not yet associated with the current project. Select one, "ok" and then browse using "edit" to see what was in it. Or if you wanted to make a new one (not listed), hit "new". On the new library wizard, you'll need to make up some same for the new library, and then use "add" to browse directories and find the jar or class file you wish to include. I remember I was confused by the add - new - add sequence. The first add is adding a library to the list of libraries associated with the project; the second is adding a particular file to a given library.
 
paul wheaton
Trailboss
Posts: 24082
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've looked at the library list and tried the edit thing. Doing that just adds it to another list - there is no further information given.
As a workaround, I have discovered that when the program is run, you can pull up a KDE utility and see the command that was used to run it - showing all of the jar files.
Green arrows: I see the right one. And there is no red box. I think with linux it's just kicked off and turned loose.
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Wheaton:

.....Since I couldn't find a way to activate the application I'm working on from the command line, .....



From inside KDE (or perhaps one of the other window managers):
1) Open a terminal window.
2) Issue:
echo $PATH
to make sure your path is set correctly. At a minimum, got to have java somewhere there.
3) Issue:
echo $CLASSPATH
It needs to be right! for your app.
4) Issue:
java com.funky.Driver (or whatever drives 'main' in your app.).
To add new directories to PATH:
export PATH=/some/new/dir:$PATH
To add new locations/jars to CLASSPATH:
export CLASSPATH=/my/new/fancy.jar:$CLASSPATH
HTH, Guy
 
Saloon Keeper
Posts: 28753
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid that all Java IDE's carry some baggage - even Sun's Forte. Part of it is simply that it's easier to make the editing process go 2 ways if the code is a little more predictable, and yes, older IDE's had to compensate for AWT's lack of state-of-the-art GUI control functionality.
I just use Emacs myself, since I HAVE to generate code free from proprietary classes. Also, Forte and Visual Caf� will eat any machine runing belows about 600MHz and 256MB alive. I haven't tried JBuilder lately, but the older version was equally hungry. I've seen screenshots where Emacs with the JDE plugin installed looked to be a fair IDE in its own right, including the debugging windows, but haven't needed to get that deep. So far.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic