473,472 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript versus Java3D?

Whats the difference between Javascript and Java3D?

I mean can Javascript do like Java3D can? Or is Java3D on top of Javascript
(the core, if thats what it is)? Then I should learn Javascript BEFORE Java3D,
right? no?

Worse, whats the difference between Java and Javascript?

Whats the difference between Visual Basic and Visual Java++? (I still thought
Visual Basic is like BASIC programming to allow you to write
windows/forms/dialog boxes, etc, right?)

Never mind JavaGenie, JavaBeans, etc. which is about to burst my brain out in
my ear channel (chinese doctor says "Mike, dont worry, thats not your brain -
thats your wax museum!")

Mike

Jul 23 '05 #1
9 2144
On 19 Oct 2004 06:13:01 GMT, MStepansky <ms********@aol.com> wrote:
Whats the difference between Javascript and Java3D?
Assuming you're referring to the Java 3D API, a very big one.

[snip]
Then I should learn Javascript BEFORE Java3D, right? no?
No. Java and Javascript are related by name, and some common syntax, but
that's all. They are *not* the same language. They aren't even from the
same company, of developed with the same purpose in mind.

[snip]
Whats the difference between Visual Basic and Visual Java++?


What? You're asking for a comparison between two completely different
languages.

[snip]

If you want to learn about Java technologies, this is not the place to
ask; the comp.lang.java.* hierarchy is. I suggest you start with
comp.lang.java.help, or perhaps Sun's Java site
(<URL:http://java.sun.com/>).

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2
MStepansky wrote:
Whats the difference between Javascript and Java3D?
One is a Java API (Java 3D) and one is nothing at all to do with Java
(obviously, JavaScript). They are in every way different and are
completely unrelated.
Worse, whats the difference between Java and Javascript?
Chalk --> Cheese. They are totally different languages.
Whats the difference between Visual Basic and Visual Java++? (I still thought
Visual Basic is like BASIC programming to allow you to write
windows/forms/dialog boxes, etc, right?)

Visual Basic is a form of Basic. As far as I know (and I could be wrong)
there is not and has never been any such thing as "Visual Java++". There
was once a thing called "Visual J++" but that was neither a version of
Basic nor a version of Java but something Microsoft made up by
(basically) swiping large lumps of Java and then changing it about a bit
so that it wasn't Java any more.
Jul 23 '05 #3
"Mark Preston" <us****@nosource.co.uk> wrote in message news:cl******************@news.demon.co.uk...
MStepansky wrote:
Whats the difference between Javascript and Java3D?

<snip>
There
was once a thing called "Visual J++" but that was neither a version of
Basic nor a version of Java but something Microsoft made up by
(basically) swiping large lumps of Java and then changing it about a bit
so that it wasn't Java any more.


Well only if you used the Windows Forms extensions. If you didn't it was
a passable java compiler. Java 1.1 I believe is where support ended with it.
I use it Java 1.4 and I have yet to get a .java I cannot compile with it.

George Hester
__________________________________
Jul 23 '05 #4
"MStepansky" <ms********@aol.com> wrote in message news:20***************************@mb-m12.aol.com...
Whats the difference between Javascript and Java3D? <snip>
Mike



That reminds me. JavaScript is an interpreted language. Java (inclds Java 3D API) is a compiled language.

What does that mean? Well strong data types in a compiled language not in an interpreted.

Functions can be created at any time. Not like Java where functions have to be declared first as well as their
data type.

Java uses a class main{} to begin the program JavaScript does not have that issue of where to start. It starts in
<script type="text/javascript">
// javascript code
</script>.
and the Browser sees it and passes the info on to the JavaScript interpreter in the Browser .

JavaScript embeds in software (like a browser). Other software provides the input and output facilities and the
substance that JavaScript scripts act on in the form of objects.

An interpreted language needs to reside in an application such as a browser. There is no such
thing as a standalone JavaScript Program. Cannot make an executable with JavaScript. You can with Java either
a exe in Windows or a jar in Linux and what not (Windows too if you don't let WinZip snag it)

--
George Hester
__________________________________
Jul 23 '05 #5
George Hester wrote:
"MStepansky" <ms********@aol.com> wrote in message news:20***************************@mb-m12.aol.com...
Whats the difference between Javascript and Java3D? <snip>
Mike


That reminds me. JavaScript is an interpreted language. Java (inclds Java 3D API) is a compiled language.


While it is probably true that JavaScript is mostly interpreted, these are not features of the language, but of the
implementation of the language.

JavaScript may be JIT (Just-in-time)-compiled before execution or it may be interpreted. If someone bothered, it could
even be compiled into a native binary executable. And in fact, JScript.NET is compiled into Microsoft's Intermediate
Language (MSIL) (like Java bytecode) which is then JIT-compiled and executed by the CLR (Common Language Runtime).

Java is compiled into bytecode, which can then be JIT-compiled, interpreted or compiled to native code.
What does that mean? Well strong data types in a compiled language not in an interpreted.
Since Java bytecode can be interpreted at runtime (and was in early Virtual Machines), this is simply not correct. An
interpreted language can be strongly typed. It just happens that JavaScript is a weakly typed interpreted (or more
likely, JIT-compiled) language.
Java uses a class main{} to begin the program JavaScript does not have that issue of where to start. It starts in
<script type="text/javascript">
// javascript code
</script>.
and the Browser sees it and passes the info on to the JavaScript interpreter in the Browser .
Java executables may or may not have a main() method. Java Applets don't have a main() method and are started by the
browser executing the methods required by all sub-classes of Applet: init(), start(), stop(), destroy() <url:
http://java.sun.com/j2se/1.4.2/docs/...et/Applet.html />
JavaScript embeds in software (like a browser). Other software provides the input and output facilities and the
substance that JavaScript scripts act on in the form of objects.
JavaScript is executed (either JIT-compiled or interpreted) by a host environment of some kind. Although I'd say that
for all applications "...Other software provides the input and output facilities...". Usually that software is the
underlying operating system. Java itself has no facilities for interacting directly with the user, although it does
have pre-defined classes (like System.in and System.out) that interact with the standard input and output mechanisms
provided by the operating system.
An interpreted language needs to reside in an application such as a browser. There is no such
thing as a standalone JavaScript Program. Cannot make an executable with JavaScript. You can with Java either
a exe in Windows or a jar in Linux and what not (Windows too if you don't let WinZip snag it)


An interpreted language needs to be interpreted by an interpreter. That interpreter can be inside a Web browser, or
something like wscript or cscript (which does let you run a "standalone" JavaScript program, if you accept that code
being interpreted or JIT-compiled by a VM is a "standalone" program). With Java, everything compiles to bytecode in
..class files, which, interestingly enough, are not "standalone" programs either (or are, depending how how you view
the Virtual Machine), they require the Java Virtual Machine to either JIT-compile or interpret them.

JAR files are simply a way of distributing multiple .class files (and other resources like images or sound files) in a
simple package. They contain .class files, which still require the JVM to be run.

You _can_ make "standalone" Windows executables from Java .class/.jar applications using a tool like Excelsior JET
<url: http://www.excelsior-usa.com/jet.html />, but doing this destroys the cross-platform nature of Java (Java allows
the same .class to run on multiple computers and operating systems with little or no modification).

And since there are development environments better suited to Windows, writing an application in a cross-platform tool
such as Java and then compiling it to a Windows binary executable seems a bit silly.

In the end, the explanation for the original question is simple:

- JavaScript is an implementation of ECMAScript
- The Java 3D API provides a set of object-oriented interfaces that support a simple, high-level programming model you
can use to build, render, and control the behavior of 3D objects and visual environments. With the Java 3D API, you
can incorporate high-quality, scalable, platform-independent 3D graphics into applications and applets based on Java
technology <url: http://java.sun.com/products/java-media/3D/ />

Since JavaScript and Java are unrelated except for four letters which happen to match, this makes JavaScript and the
Java3D API unrelated.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #6
On Wed, 20 Oct 2004 16:42:25 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:
While it is probably true that JavaScript is mostly interpreted, these are not features
of the language, but of the implementation of the language.


See Eric Lipperts comments on
http://blogs.msdn.com/ptorr/archive/.../14/56184.aspx

for how JScript works

Jim.
Jul 23 '05 #7
Jim Ley wrote:
On Wed, 20 Oct 2004 16:42:25 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:
While it is probably true that JavaScript is mostly interpreted, these are not features
of the language, but of the implementation of the language.


See Eric Lipperts comments on
http://blogs.msdn.com/ptorr/archive/.../14/56184.aspx

for how JScript works

Jim.


Thanks for the link, I found this to be on-point and of particular interest (courtesy of
Eric Lippert):

....Every now and then, people talk about "compiled" versus "interpreted" languages, and how
they are different. This distinction is both arbitrary and vague, and indeed, JScript
Classic (as opposed to .NET - grant) blurs the line considerably. JScript Classic acts like
a compiled language in the sense that before any JScript Classic program runs, we fully
syntax check the code, generate a full parse tree, and generate a bytecode. We then run the
bytecode through a bytecode interpreter. In that sense, JScript is every bit as "compiled"
as Java. The difference is that JScript does not allow you to persist or examine our
proprietary bytecode. Also, the bytecode is much higher-level than the JVM bytecode -- the
JScript Classic bytecode language is little more than a linearization of the parse tree,
whereas the JVM bytecode is clearly intended to operate on a low-level stack machine...

Off-topic: More fascinating stuff at <url:
http://www.microsoft.com/downloads/d...ng=en#filelist
/>

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #8
Grant Wagner <gw*****@agricoreunited.com> writes:
While it is probably true that JavaScript is mostly interpreted,
these are not features of the language, but of the implementation of
the language.
I would say that it is a feature of the language, given that the "eval"
function is part of the specification. Having "eval" means that you must
be able to execute source code at runtime without a separate compilation
step.
JavaScript may be JIT (Just-in-time)-compiled before execution or it
may be interpreted.
Any interpreted language can be JIT-compiled to another language.
What makes a compiled language compiled, and not interpreted, is the
ability to separate the compilation and the interpretation of the
compiled code, thereby allowing the same compiled code to be run more
than once.

A JIT-compiler will probably generate code that has hooks into the
current runtime environment, so the compiled code can't easily be
separated. Running the same program an hour later will then require a
second JIT-step.

Java is a compiled language. It guarantees that you can convert source
code to class files that can later be linked/loaded and run several
times.

Javascript is most often interpreted, but can be compiled if need be.
However the runtime environment needs to have the entire compiler
included as well.

Any language can be compiled, but some require the ability to compile
at run-time, making the compiler part of the language. Javascript is
one.

Any language can be interpreted, but some require the ability to
create object files that can be linked and run later. Java is one.
Java is compiled into bytecode, which can then be JIT-compiled,
interpreted or compiled to native code.


.... which is interpreted :)
All languages are eventually interpreted anyway, because machine code
is interpreted by the microcode :).

What does that mean? Well strong data types in a compiled language
not in an interpreted.


Since Java bytecode can be interpreted at runtime (and was in early
Virtual Machines), this is simply not correct.


Well, "strong" and "weak" typing means something else, so I guess the
distinction really is between static and dynamic typing of variables.

In a statically typed language, a variable's type is determined...,
well statically. It is defined by the program as it exists before it
is run (i.e., only by the source code).

In a dynamically typed language, a variable does not have a type,
but its values do. Their types are determined dynamically as the
program runs.

(IIRC, a weakly typed language would allow the same value to have more
than one type, whereas a strong type system means that a value has at
most on type. An example of a weak type system is the union
construction in C).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #9
"Grant Wagner" <gw*****@agricoreunited.com> wrote in message news:41***************@agricoreunited.com...
Since JavaScript and Java are unrelated except for four letters which happen to match, this makes JavaScript and the
Java3D API unrelated.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq


Excellent. Thanks Grant.
--
George Hester
__________________________________
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hoagie | last post by:
The pain! I've looked over this a hundred times and I don't understand it! I'm new to Java3D, so hopefully someone can help me in this quick (most likely trivial error). I am drawing a...
2
by: Wiseguy | last post by:
I'm an opengl programmer who recently started playing with java3d and the scene graph methodology takes a bit to get used to. I'm wondering if there are any OTHER comprehensive tutorials for...
1
by: Andre Bonin | last post by:
Hello, I have an application that uses Java3D and I would like it to make webstart-enabled. Which tags (or how do i go about) stating the dependancy of the Java3D api within my application's...
14
by: Doug van Vianen | last post by:
Hi, I am trying to show a clipped part of a picture on a webpage and move it on the page and/or change the clipping to a different part of the picture. I show the picture in the body of the...
0
by: Flex | last post by:
I have a canvas3d in Java3D, and I want to add some point. I try to to this. private void drawPoints() { PointArray pti = new PointArray(2,PointArray.COORDINATES); Shape3D shape = new...
6
by: Melissa | last post by:
Initially the form is loaded using ASP and HTML and the ü codes display the characters correctly. I have the values stored in a javascript array so that I can more easily and dynamically change...
2
awfulman
by: awfulman | last post by:
Hi, I am studying Java3D. I am not an experienced programmer and have no real programming education but I have some knowledge of graphics. I am familiar with POV-Ray that uses a kind of a...
0
by: Eyeinstyin | last post by:
There is some way to run java3d on webbrowser without j3d.I saw one example on net dont remeber the link but that ran a j3d applet on my webbrowser that didnot have j3d package installed.It actually...
2
by: daschicken | last post by:
Hi guys, I'm not sure if theres anybody here with experience on this topic but ill give it a shot. Im lately facing some problems running several .jar files as Java WebStart jnlp. For this...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.