Solved

Applet .....running in jsdk2.1...........problem

Posted on 2002-07-24
15
176 Views
Last Modified: 2010-03-31
I have stored the html file along with the class file in jsdk2.1\examples. In jsdk2.1 I have started the server by supplying the command startserver.bat. There is no message is displayed in my dos prompt. I am getting a windows explorer on c:\windows\java instead of new Dos prompt.Should I change the System properties. Else What's the solution.
Thanks in advance
javasans
0
Comment
Question by:javasans
  • 8
  • 7
15 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 7173699
I'm not familiar with startserver.bat, but you should be able to just compile the applet and run it by opening the html file in your browser. Are you sure the the applet's class file is in the directory?
0
 

Author Comment

by:javasans
ID: 7173708
Yes, I am sure that the class file is in directory.If I navigate to
d:\jsdk2.1\examples\x.html  , the html files are displayed.
But if I start the server
d:\jsdk2.1\startserver
then navigate
to
http://localhost:8080/examples/x.html
then it displays the error as "page not found"
Thanks in advance
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7173717
I'm not familiar with JDK2.1, but it seems that it contains some sort of web server which you can run locally. I can only guess that this might be something to do with the server root and paths. Is there some way of setting the server root? Properties file? Parameter in command line/batch file? Maybe if you posted startserver.bat it would help.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:javasans
ID: 7173729
Sorry ,At present I am not having   jsdk2.1\startserver.bat.But it is readily available in java.sun.com. I have'nt made any change to that batch file. (I forgot to mention in the last mail the os is windows 98. ). I am in need of the solution
Thanks in advance.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7173738
OK, I'm getting confused now!
1. What are you trying to do?
2. What is the problem with the above?
0
 

Author Comment

by:javasans
ID: 7173773
Sorry for the confusion I have made.
Here is my task.
1.Writing java applet
2. compiling it.
3. Embedding the applet class file into the html for eg x.html(by using the code atribute of the applet tag)
4. Storing the html file and the class file in the server directory
 for eg/ d:\jsdk2.1\examples
5. starting the server.
 ie,
 d:\jsdk2.1\startserver
6. opening the browser and in the location
  http://localhost:8080/examples/x.html
7. Here is the problem.The html page is not displayed.Page cannot be found message is displayed.

I think the confusion  is OK now
MY question.
Why the html page is not displayed?
Thanks in advance.

   
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 7173791
OK. Break down the problem into its two main parts:

1. Verifying the applet is viewable
2. Viewing the applet in the 'server'

So, taking 1. first, can you view the applet in your browser by opening the html file?
0
 

Author Comment

by:javasans
ID: 7174221
Yes I can view the applet in the browser.
0
 

Author Comment

by:javasans
ID: 7174228
Yes I can view the applet in the browser.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7174229
OK. So now you want to run it in this 'server'?
0
 

Author Comment

by:javasans
ID: 7176250
Yes, I want to run it in the server
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7176532
OK. Next step is to get the server up and running. Let me know when http://localhost:8080 shows something in your browser.
0
 

Author Comment

by:javasans
ID: 7176564
"The page cannot be displayed" error is displayed on the browser
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7176578
1. Are you *certain* that the server is running?
2. Are you entering the *exact* address http://localhost:8080?
0
 

Author Comment

by:javasans
ID: 7177117
Here's the problem. As in the first question If I start the server in
d:\jsdk2.1\startserver.bat
window explorer is opened at c:\windows\java. I cognise it as my server is started.

And also I have given the exact address.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping2 challenge 13 89
Error trying to install RTMT Win7 5 59
fibonacci ten numbers 4 38
use lov values 2 49
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now