Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Local Rhino Debugging
Local Rhino Debugging [message #665682] Fri, 15 April 2011 13:34
Syamkumar Cheedela is currently offline Syamkumar CheedelaFriend
Messages: 7
Registered: April 2011
Junior Member
I want to debug the below js file using local rhino debugger.

var sb = new Packages.MathUtility();

// Add the 2 numbers
var a = sb.add(2, 3);

//Subtract the 2 numbers
var s = sb.subtract(2, 3);

//Multiply the 2 numbers
var m = sb.multiply(2, 3);

//Divide the 2 numbers
var d = sb.divide(6, 3);

public class MathUtility {
	public MathUtility() {
	public int add(int a, int b) {
		return (a+b);
	public int subtract(int a, int b) {
		return (a-b);
	public int multiply(int a, int b) {
		return (a*b);
	public int divide(int a, int b) {
		return (a/b);

when i try to debug this through eclipse local rhino debugger it is thowing following error.

js: "C:\hiddenpath\math.js", line 1: uncaught JavaScript runtime exception: TypeError: [JavaPackage MathUtility] is not a function, it is object.
at C:\hiddenpath\math.js:1

Can any one please help me how will add any files to java script debugger classpath?
Previous Topic:Extending Web page Editor Palette
Next Topic:unable to run JSF application
Goto Forum:

Current Time: Thu Oct 22 15:29:27 GMT 2020

Powered by FUDForum. Page generated in 0.01443 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top