Jump to content

Java


mortalc

Recommended Posts

I have nowhere else to put this. Oh well.Basically, Can I use Java to script a web page?Can I introduce it with <script type="text/java">?I'm asking this because the program I use (Dreamweaver) won't let me preview a normal Java document in a webpage. The same thing happens for Javascript, but it does work if I put it into an HTML document.

Link to comment
Share on other sites

How to do preVIEW any programming code? The only way to view the output of a script is to first give it some input by starting the page.

Link to comment
Share on other sites

How to do preVIEW any programming code? The only way to view the output of a script is to first give it some input by starting the page.
In Dreamweaver, once you've written the code, you can preview it in a browser. e.g.
<h6>Example</h6><br/><p>This is an example</p>

Could end up as:ExampleThis is an example

Browsers don't support Java as a scripting language. The dominant one is Javascript, IE supports VBScript, and Python may be coming.
OK. But is it possible to insert Java into a HTML document? If so, how is it done?
Link to comment
Share on other sites

It is possible to embed a Java applet into a web page, is that what you're trying to do?
No. Um... What I'm trying to do is write a program in Java and, basically, see the output. The only way I know to do this for any programming language/script is in Dreamweaver, which does have Java as an option.
Link to comment
Share on other sites

HTML and CSS are not programming languages. They're (respectively) structural and visual declarations. The difference may seem subtle, but it's actually pretty big - to view how an HTML/CSS text would look in a browser, you don't need to give it any input. Having the HTML source is enough.JavaScript is a programming language. Even if you have just a single "document.write('something');", the very fact that JavaScript may accept input (e.g. a mouse click) makes it impossible to reliably preview the output without actually preparing any events and executing associated code.Yes. You can run an HTML page from within a browser. And if the page links to a script, you'll see the script's output too... so where's the problem?

Link to comment
Share on other sites

there is Java forum, FYI.perhaps you should check out the Java trial? Perhaps it is that you are confused how Java would actually get implemented in a website? You have to have Java run in an environment that will take compiled code and turn it into a class, which can then be interpreted by the browser, in the form of an applet.Or unless you are still confused, and are getting Javascript and Java confused, because what you are doing sounds exactly like how one would want to implement (Java)scripts into their webpage. What exactly are you trying to get your "Java" (Javascript) to do?

Link to comment
Share on other sites

there is Java forum, FYI.perhaps you should check out the Java trial? Perhaps it is that you are confused how Java would actually get implemented in a website? You have to have Java run in an environment that will take compiled code and turn it into a class, which can then be interpreted by the browser, in the form of an applet.Or unless you are still confused, and are getting Javascript and Java confused, because what you are doing sounds exactly like how one would want to implement (Java)scripts into their webpage. What exactly are you trying to get your "Java" (Javascript) to do?
I am currently using that sight to learn Java. But what I need is a need to preview Java, i.e. so I can tell isf I get a block of code right or not, or so I can just test things out.
Link to comment
Share on other sites

did you manage to get the Hello World example to work? Can you get through a basic program before trying to create an applet?

Link to comment
Share on other sites

No. Um... What I'm trying to do is write a program in Java and, basically, see the output.
That doesn't have anything to do with Dreamweaver then, you need the Java SDK. Dreamweaver is for building web pages, not writing Java applications. The Eclipse IDE is a popular one to use for Java.http://java.sun.com/javase/downloads/index.jsp
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...