Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Compiling vs. runnung app using borland jbcl

Posted on 2003-11-03
5
Medium Priority
?
284 Views
Last Modified: 2006-11-17
Hi,

I have an app that uses the Borlands jbcl package. (com.borland.jbcl.layout.GridBagConstraints2). If I compile the app I get no errors. If I run the app it gives the following error:  java.lang.NoClassDefFoundError: com/borland/jbcl/layout/GridBagConstraints2

I'm using JBuilder 8 se and Java JDK 1.18_08.

Thanks for any help.

Cmp2
0
Comment
Question by:cmp2
  • 4
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9672973
That means you've got a discrepancy between your compile time and runtime environments. You need to make sure the version of java.exe you're using is the correct one.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9673007
...and that the classpath to those proprietary classes is included.

0
 
LVL 86

Accepted Solution

by:
CEHJ earned 150 total points
ID: 9673033
You need to address these two issues too:

a. you need to upgrade that ancient JDK
b. You need to ask yourself whether any convenience value of using proprietary classes like these is outweighed by the possibility, if it is not packaged correctly, of breaking the code once it is out of your IDE in exactly the sort of way you describe here. And that is quite apart from the issues raised by not adhering to standards-based code in terms of general principles.
0
 
LVL 1

Expert Comment

by:tgp
ID: 9690779
CEHJ is right, but if you really can't get around the issue (time constraints for example), then you can set Borland's com.borland.jbcl.layout.GridBagConstraints2 as one of your project's "dependencies".

You can do this with JBuilder itself, and is handy, especially if you're creating a jar file. (If not, you'll need to distribute that class with your app).

If you create your jar file with JBuilder, then you can set it so that the dependencies will include all classes and resources, which simply means that class will get added to your jar file when compiling.

Hope that helps

TGP @:o)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9943916
8-)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month20 days, 19 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question