Solved

Java BeanBox Toolbox won't load my JAR file

Posted on 2003-11-13
8
552 Views
Last Modified: 2013-11-21
Ok, folks, I know this is something really simple that I'm missing. I tried Sun's beans tutorial with SimpleBean.java. Followed the directions to the "T". It won't load the JAR file into the Toolbox. It complains about not finding the class file, when it is there. What am I missing or haven't found on the web????? Thanks in advance.
0
Comment
Question by:jazzki
  • 5
  • 2
8 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9743679
Have you put your jar file in the beans/jars directory?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9743687
(and restarted)
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9743709
>> It complains about not finding the class file, when it is there.

Class file?  Are you trying to load a jar file or a class file?  The class should be in a jar.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 92

Expert Comment

by:objects
ID: 9743748
When exactly does it complain about not find the bean?

If you are using 1.4 you may need to include the bean in a package (and as a general point this is recomended).
0
 

Author Comment

by:jazzki
ID: 9744679
No, I did not put the jar file in the beans/jar directory. Didn't think I had to do that if I was specifying the location through the Toolbox's "File--->Loadjar" menu option, where it prompts you through a browser for the file location. Jimmack, I am loading a jar file correctly that has a class file and a manifest file in it, but it complains about not finding the class file nonetheless. As for objects comment, I may have to look into that as well, as I am running J2SDK 1.4.2.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9746772
OK.  I downloaded and the Beanbox onto my Linux (MDK 9.1) system using J2SDK 1.4.2.

Following the tutorial you mentioned for the SimpleBean produced what was expected.  The only problem I can across was with the button.jar bean.  This was an issue with Introspection (a known problem with 1.4 and beans).

The make file provided in the tutorial creates the jar file and places it in the beans/jar directory.  If you haven't got the jar file in that directory, then you've missed a step somewhere.

I stopped the Beanbox and moved the jar file to another directory (for this test, I put it in the demo directory).  Restarting the Beanbox shows that the SimpleBean is missing, but File|Load jar lets me load it OK from that directory.

It sounds like there may be a problem with the jar file that you have.  Do the following:

> jar tvf SimpleBean.jar

You should see the following (or very similar):

      0 Fri Nov 14 09:54:42 GMT 2003 META-INF/
   129 Fri Nov 14 09:54:42 GMT 2003 META-INF/MANIFEST.MF
   396 Fri Nov 14 09:54:42 GMT 2003 sunw/demo/simple/SimpleBean.class

0
 

Author Comment

by:jazzki
ID: 9748889
Folks, nevermind. It was my ineptitude that led to this stupid question. I didn't have a carriage-return in the manifest file as I needed. Thanks for your help anyway.
0
 
LVL 15

Accepted Solution

by:
jimmack earned 500 total points
ID: 9748994
;-)
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse console opening separately 2 35
JAVA API design with micro service cloud in mind 1 76
Running JavaFX on the Raspberry Pi 27 125
IBM TS2900 (3572) Tape Autoloader Java? 12 55
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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 …

735 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