Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

running applets and applications

  Asked By: Lorraine    Date: Sep 11    Category: Java    Views: 671
  

I am new to Java programming and am going through the many
lessons on the internet. In a windows 2000 installation I have the
following classpath statements: C:\jdk1.3.1_10;C:\jdk1.3.1_10
\bin;C:\jdk1.3.1_10\lib;C:\j2sdk1.4.2_03;C:\j2sdk1.4.2_03
\bin;C:\j2sdk1.4.2_03\lib; for both user and system environmental
variables as will as both path statements (user and system). As I
have found that some applications will compile and run from command
line in other directories, applets from webpages must be in bin
directory to initialize. Other examples from the web give "unable to
resolve symbol" error. If anyone can offer any assistance in what is
not set properly it will be greatly appreciated.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Dylan Evans     Answered On: Sep 11


It is easier to test applets  with a web server, but your solution should
work ok.
A web page should pick up classes from anywhere on your classpath,
if the browser jvm is using that classpath

I do suggest that you only have one jdk at a time in your classpath though.
also it is usually a good idea to add '.' (the current directory) to the
classpath.
so that you can run from the directory containing the class (or the
package root for the class tree)

the other thing you can do is compile/run the classes with an explicit
classpath set
eg java  -classpath canvas.jar com.qlt.canvas.test.Test
where the classpath is set to canvas.jar to look for
com.qlt.canvas.test.Test
running java canvas.jar com.qlt.canvas.test.Test
would mean that Test.class has to in /com/qlt/canvas/test/ from
somewhere on the classpath

 
Didn't find what you were looking for? Find more on running applets and applications Or get search suggestion and latest updates.




Tagged: