• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 846
  • Last Modified:

Netscape object does not exists

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
andy7789
Asked:
andy7789
  • 5
  • 4
1 Solution
 
CEHJCommented:
Makre sure the

jre\lib\plugin.jar

is in your classpath
0
 
andy7789Author Commented:
Yes I do have plugin.jar here. Do you mean i have to include its dir to system PATH?
0
 
CEHJCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
andy7789Author Commented:
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
 
CEHJCommented:
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
 
andy7789Author Commented:
what is the best decompiler? i will try it again, if I could fix it... I am using JAD
Any better ideas?
0
 
CEHJCommented:
You won't get better than JAD really
0
 
andy7789Author Commented:
It works, thank you! I had some mess classpaths with pointing to plugins.jar.
0
 
CEHJCommented:
:-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now