When I tried to run a class file, an error msg would appear :
Unable to locate system class : system/lang/String
Could someone teach me how to set the classpath ??
I am using Win95. Tks
> When I tried to run a class file, an error msg would appear :
> Unable to locate system class : system/lang/String
>Could someone teach me how to set the classpath ??
>I am using Win95. Tks
Hi, I'm John.
I've been fighting the Classpath battle myself. I bought JBuilder2 and took
the Classpath they set up as a starting Point, but I branched off to do bare-bones
Java (using "java", "javac", "javadoc", etc.) I've got a production environment
and a development environment, so my packages start within the corresponding
libraries. I experimented to see what was the minimum, so here's mine:
The 'rt.jar' is possibly what you're missing. I copied mine from the JBuilder2
location to my directory "STAPLES".
The "." is for getting to other classes of my own. I've got them stored
under "package"s, as recommended. I use the "import" command to get javac
into those libraries. The ".." gets me out of the "production" or "development"
library (to the "D:\java" library), and the rest gets me to D:\java\STAPLES\rt.jar.
Since I want to keep my original (JBuilder2) path the same, I build .bat
files to compile and run, applying the above switch to the 'java' and 'javac'
commands. If you want to make yours universal, you can try it first, by
SET CLASSPATH= (...)
and then trying your commands. When all works, put the same statement in
your c:\autoexec.bat file.
I hope this has helped. I'm a bit of a newbie myself.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL