Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[AbsoluteConstraints and AbsoluteLayout] Applet Programming issue...

807588Mar 18 2009 — edited Mar 20 2009
Greetings !!

I'm not fluent in English and beginner in Applet programming so can you accept all my apologizes if I'm wrong in English and worse in Java ^^

Here is the description of my issue:

I used Sun Studio Enterprise to create a form to be used as an Applet. I'm using linux SuSE and Mozzila Firefox for the tests with the web browser.
When I tried to check if the disposition of all the different objects on my "applet" was correctly set (the first time I launched the applet) I got this exception message telling that a class was missing.
I know that all classes that are not considered in the standard JRE set must be put in the same directory were the Web server is getting the Applet's .class file...
I started straight to find AbsoluteConstraints.class and AbsoluteLayout.class files using locate to be as quick as possible.

I realised that the classes weren't available as is... of course there were .jar files but located in directories that made me a little confused...
 [root]{scrambled}:/root # locate AbsoluteLayout.jar
/opt/sun/netbeans/3.5V11/modules/ext/AbsoluteLayout.jar
/usr/local/netbeans-6.1/java2/modules/ext/AbsoluteLayout.jar
/usr/local/netbeans-6.1/java2/update/backup/netbeans/modules/ext/AbsoluteLayout.jar
/usr/share/netbeans/ide6/modules/ext/AbsoluteLayout.jar
I searched the .java files having the idea that it was possible to compile them...
[root]{scrambled}:/root # locate AbsoluteConstraints.java
/opt/sun/netbeans/3.5V11/sources/org/netbeans/lib/awtextra/AbsoluteConstraints.java
/usr/local/netbeans-6.1/java2/sources/org/netbeans/lib/awtextra/AbsoluteConstraints.java
/usr/local/netbeans-6.1/java2/update/backup/netbeans/sources/org/netbeans/lib/awtextra/AbsoluteConstraints.java
/usr/share/netbeans/ide6/sources/org/netbeans/lib/awtextra/AbsoluteConstraints.java
I went to the */usr/local/netbeans-6.1/java2/sources/org/netbeans/lib/awtextra* folder to discover two files linked each other because when trying to compile AbsoluteLayout.java the compiler told me that AbsoluteConstraints class wasn't found...
372451 4 drwxr-xr-x 2 root root 4096 Mar 19 00:35 .
372450 4 drwxr-xr-x 3 root root 4096 Jun 16  2008 ..
373968 4 -rw-r--r-- 1 root root 1525 Mar 19 00:35 AbsoluteConstraints.class
372452 8 -rw-r--r-- 1 root root 5486 Jul 20  2008 AbsoluteConstraints.java
372454 8 -rw-r--r-- 1 root root 7707 Jul 20  2008 AbsoluteLayout.java
I easily compiled (as you can see above) AbsoluteConstraints.java but was unable to compile AbsoluteLayout.java...
I, then, thought to update the well known CLASSPATH environnement variable... or use it to try to solve the issue, so I put the AbsoluteConstraints.class in one of the folders referenced in the CLASSPATH environnement variable.
CLASSPATH=/windows/Programs/Java/jdk/dev:/home/root/java/dev:/home/java/dev:/usr/share/java/mysql-connector-java-5.1.7-bin.jar
[root]{scrambled}:/home/java/dev # ls
AbsoluteConstraints.class
I did not succeeded to compile the AbsoluteLayout.java file with same errors:
AbsoluteLayout.java:83: cannot find symbol
symbol  : class AbsoluteConstraints
location: class org.netbeans.lib.awtextra.AbsoluteLayout
            AbsoluteConstraints ac = (AbsoluteConstraints)constraints.get(comp);
Something very special that really messed up my ideas was the fact that org.netbeans.lib.awtextra wasn't in the "real" java jre or jdk path...
[root]{scrambled}:/usr/local/netbeans-6.1/java2/sources/org/netbeans/lib/awtextra # env | grep JAVA
JAVA_BINDIR=/usr/lib/jvm/jre/bin
JAVA_HOME=/usr/lib/jvm/jre
JAVA_ROOT=/usr/lib/jvm/jre
...and in the jre folder, I can't found any org folder... that is for me the key of my tribulations...

So if AbsoluteConstraints and AbsoluteLayout are not available in the standard jdk or jre classes, how can I compile AbsoluteLayout to put it with AbsoluteConstraints in the web folder where the Applet's *.class* file is located ?
In other terms what is wrong with the compilation of AbsoluteLayout.java file ?

Thank you in advance for the time lost to read this post ^^
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2009
Added on Mar 18 2009
6 comments
1,138 views