Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes HTML, CSS and JavaScript and the fly likes Javacodes in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javacodes in JavaScript" Watch "Javacodes in JavaScript" New topic

Javacodes in JavaScript

Seby Pappachan

Joined: Nov 02, 2008
Posts: 12

I have a a java class in which some variables are declared. And i have one more JavaScript file in which i would like to reuse these variables(declared in Java Class) instead of declaring them again in the JavaScript file. Is it possible to import java codes in JavaScript file?

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15383
Read this article:

You need to write out the variables for JavaScript to use.

Seby Pappachan

Joined: Nov 02, 2008
Posts: 12
Thanks Eric!
wood burning stoves
subject: Javacodes in JavaScript