Solved

Netscape object does not exists

Posted on 2006-07-08
9
789 Views
Last Modified: 2012-08-14
Hi Java X-perts,
Still learning Java... I am making some experimtnes decompiling - compiling and back. One of the decompiled Java classes generates a few errors, when I compile it back WITH NO CHANGES:

Those are the lines and their errors:

import netscape.javascript.JSObject;  ---> package netscape.javascript does not exists

JSObject jsobject = null; ---> cannot find symbol

jsobject = JSObject.getWindow(o);   ----> cannot find symbol

==================================

I am using JAD for decompilation and it works fine for all other files. I cannot understand what is wrong as I have not made any changes to the code.

Thanks

-A-
0
Comment
Question by:andy7789
  • 5
  • 4
9 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 17064539
Makre sure the

jre\lib\plugin.jar

is in your classpath
0
 

Author Comment

by:andy7789
ID: 17064566
Yes I do have plugin.jar here. Do you mean i have to include its dir to system PATH?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17064583
http://mindprod.com/jgloss/classpath.html


Compile your app


javac -classpath %JAVA_HOME%\jre\lib\plugin.jar;. *.java

(if you've set JAVA_HOME as i recommended earlier)
0
 

Author Comment

by:andy7789
ID: 17064600
It is even worse, it gives me 9 errors instead of 3.

1. java.applet.Applet is already defined in c68
2. a few similar errors - canot find symbol (variable super and class JSObject)

What is wrong?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 86

Expert Comment

by:CEHJ
ID: 17064610
Well you *are* likely to get errors from decompilation/compilation exercises.

If you post it somewhere public,i'll see if it can be compiled
0
 

Author Comment

by:andy7789
ID: 17064619
what is the best decompiler? i will try it again, if I could fix it... I am using JAD
Any better ideas?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17064663
You won't get better than JAD really
0
 

Author Comment

by:andy7789
ID: 17066540
It works, thank you! I had some mess classpaths with pointing to plugins.jar.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17066560
:-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 81
PDFBox - convert image to PDF, PDF resolution 3 118
simple java question 3 44
map related example 6 38
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now