473,837 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
+ 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 2186
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****@nosourc e.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*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #6
On Wed, 20 Oct 2004 16:42:25 GMT, Grant Wagner
<gw*****@agrico reunited.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*****@agrico reunited.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 "interprete d" 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*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #8
Grant Wagner <gw*****@agrico reunited.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/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #9
"Grant Wagner" <gw*****@agrico reunited.com> wrote in message news:41******** *******@agricor eunited.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*****@agrico reunited.com>
comp.lang.javas cript 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
4577
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 QuadArray plane w/ the "stripes.gif" texture (from the tutorial) applied to it. I've drawn the plane to be 2 inches (-1,-1 to 1,1) and 1 inch (0,0 to 1,1). After creating the Shape3D object, I add it to the branch group then add that to the Simple...
2
4267
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 java3d besides the one on the sun.com site. It would be nice to find something that can be downloaded and browsed offline. tanks
1
6236
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 JLNP file? Thank you for your time.
14
2091
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 page by using <div id=div1 style="position:absolute; top:200; left:400; width:200; height:200; z-index:1; background-image:url(ole01.jpg); clip:rect(0,150,50,100)"></div>
0
2484
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 Shape3D(); shape.removeAllGeometries(); BranchGroup ptiGroup = new BranchGroup(); pti.setCoordinate(0, new Point3d(3, 5, 23));
6
3854
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 the state/region dropdown when the country changes. However, when my javascript code tries to add the new option and print out new region the literal value such as "Würrtemberg" is displayed instead of the special character. Can this be done in...
2
2089
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 programming language to render scenes too, in quite a similar way to Java3D, though not equal. I am really impressed by the opportunities that Java3d provides and I want to study it. But I am completely stuck in HelloJava3D.java . Of course I read the tutorial...
0
1087
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 loaded the jars on itz own.How do i do this.Load j3d jars from server and then webbrowser should use them to run j3d applet
2
2107
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 reason I tried to run a very basic .jar on my webspace which does well. But as soon as i try to usw .jar using the Java3D API, or just more complex it doesnt work with different errors. So before I go a bit deeper into my source I would like to...
0
9851
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10902
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10583
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10286
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9420
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7013
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4060
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3128
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.