Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java 1.1.8 Problem... 1

Status
Not open for further replies.

dcusick

Technical User
Aug 9, 2000
271
US
Okay, I have an app that I'm building in 1.1.8. I've posted about it before and got it up and compiling (Thanks sedj). Anyways... Now I'm having major issues getting it to run. I'm using Swing and Vectors, which I know aren't part of the 1.1.8 api. So I have added classes.zip and collections.jar and swingall.jar to my classpath. Anyway, everytime I run my code, which basically just creates a new instance of a JFrame, I get this error...

Code:
java.lang.UnsatisfiedLinkError: reshape
	at sun.awt.windows.WComponentPeer.setBounds(WComponentPeer.java:67)
	at sun.awt.windows.WComponentPeer.initialize(WComponentPeer.java:268)
	at sun.awt.windows.WCanvasPeer.initialize(WCanvasPeer.java:34)
	at sun.awt.windows.WPanelPeer.initialize(WPanelPeer.java:43)
	at sun.awt.windows.WWindowPeer.initialize(WWindowPeer.java:66)
	at sun.awt.windows.WFramePeer.initialize(WFramePeer.java:56)
	at sun.awt.windows.WComponentPeer.<init>(WComponentPeer.java:242)
	at sun.awt.windows.WCanvasPeer.<init>(WCanvasPeer.java:28)
	at sun.awt.windows.WPanelPeer.<init>(WPanelPeer.java:39)
	at sun.awt.windows.WWindowPeer.<init>(WWindowPeer.java:62)
	at sun.awt.windows.WFramePeer.<init>(WFramePeer.java:50)
	at sun.awt.windows.WToolkit.createFrame(WToolkit.java:174)
	at java.awt.Frame.addNotify(Frame.java:203)
	at javax.swing.plaf.metal.BumpBuffer.createComponent(MetalBumps.java:237)
	at javax.swing.plaf.metal.BumpBuffer.<init>(MetalBumps.java:151)
	at javax.swing.plaf.metal.MetalBumps.createBuffer(MetalBumps.java:65)
	at javax.swing.plaf.metal.MetalBumps.setBumpColors(MetalBumps.java:100)
	at javax.swing.plaf.metal.MetalBumps.<init>(MetalBumps.java:57)
	at javax.swing.plaf.metal.MetalBorders$ToolBarBorder.<init>(MetalBorders.java:281)
	at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:376)
	at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:65)
	at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:714)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:363)
	at javax.swing.UIManager.setLookAndFeel(UIManager.java:390)
	at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:850)
	at javax.swing.UIManager.initialize(UIManager.java:926)
	at javax.swing.UIManager.maybeInitialize(UIManager.java:948)
	at javax.swing.UIManager.getUI(UIManager.java:559)
	at javax.swing.JPanel.updateUI(JPanel.java:110)
	at javax.swing.JPanel.<init>(JPanel.java:70)
	at javax.swing.JPanel.<init>(JPanel.java:100)
	at javax.swing.JRootPane.createGlassPane(JRootPane.java:224)
	at javax.swing.JRootPane.<init>(JRootPane.java:181)
	at javax.swing.JFrame.createRootPane(JFrame.java:154)
	at javax.swing.JFrame.frameInit(JFrame.java:147)
	at javax.swing.JFrame.<init>(JFrame.java:124)
	at org.xxx.solutions.gui.MainDesktop.<init>(MainDesktop.java:30)
	at org.xxx.solutions.gui.MainDesktop.main(MainDesktop.java:75)

Line 75 is in my main where I create a new instance of the MainDesktop class which extends JFrame. Line 30 is the definition of the constructor, basically that which is being called from line 75. Any ideas? Am I missing something? Am I using outdated versions of my classpath packages??? Thanks in advance...

Doug
 
From the docs - &quot;Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.&quot;

Your base JRE is 1.1.8, as you rightly said, before Swing. You have tried to force the 1.1 JRE to use 1.2 (or above) classes. While the Swing API is basically built on top of AWT (available in 1.1), there are obviously some Graphics device dll's (ie native graphics code) which Swing uses, but the 1.1 JRE does not come shipped with.

In short, you are unfortunately doomed !
Your options are:

1) Dump Swing and use AWT (1.1 version)
2) Dump 1.1 and upgrade your/client's JRE.
 
DOH! Well, I appreciate the response sedj. Upgrading the client's JRE is, unfortunately, not an option. So I guess I'll hop on over the the AWT bus. Never used it before, but hey, how hard can it be? Thanks again sedj. Very helpful.

Doug
 
One last thing to try (though I don't advise it !) -

take your 1.4 copy of awt.dll (found in JAVA_HOME\jre\bin) and add/overwrite it in your 1.1 version. You never know, you might get lucky !
 
is the Swing optional package still available?
That was the answer to get 1.1 JVMs working with Swing.
 
You know what, It's not a huge app, just a frame and some buttons and text fields, so I'm just gonna rewrite it... It'll be easier... Don't think I should go around messing with any dll's on my clients' machines...

jwenting, I had the swingall.jar file in my classpath, and it still didn't help. From what sedj said, I think it's not the classes that can't be found, it's some type of native dll that's missing or outdated.

Doug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top