Archived

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

[java] SDK

This topic is 5149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a very boring job that gives me plenty of time to study and learn programming at work. The problem is my computer at work is running windows 2000 and I do not have the admin password. Therefore, I cannot install the java sdk. I found a c++ compiler from borland that does not need you to install the program, you can just simply copy the files to the hardrive and run it right there without making any changes to the system. Is there a way to do that with Java? I tired installing the sdk on my computer at home, then copying all the files to cd, but they will not work on the system at work. Thanks for any suggestions.

Share this post


Link to post
Share on other sites
Getting a compiler going wouldn''t be a problem, you could always use jikes or even Eclipse*, the problem is getting a JRE installed. I highly doubt you can get a recent JRE installed without admin priviledges.

You possibly have Microsoft''s JRE installed, see if jview.exe is somewhere on your machine. It''s both ancient and bastardized, and not at all recommended.

Getting older versions of Java going would probably work, try downloading java jdk 1.1.8. You''re quite severely limited as far as newer libraries, but the core of Java is fully there and hasn''t changed much (if at all). You''ll likely run into problems running 1.1 though, for whatever reason Sun shipped it somewhat broken, and you have to manually fix the classpath.

Just a ghost trying to help



*of course, Eclipse being a Java program itself, you''re stuck in a catch 22. Jikes is written in C++, and doesn''t rely on a JRE.

Share this post


Link to post
Share on other sites
install at home, burn all the files to a cd.. then copy paste it to your directory.. Worked for me at school.. But I know they had the JRE, but I don''t see why it wouldn''t work for you..

Share this post


Link to post
Share on other sites
I have both jview.exe and wjview in winnt\system32 and in winnt\servicepackfiles\i386. I also installed j2sdk-1_4_2_01-windows-i586 file version 7.5.394.0 on my computer at home and copied the entire directory to a cd. So, if I put all those files in c:\temp\java, what do I need to do to get it running? Thanks again for any help.

Share this post


Link to post
Share on other sites
Here is the error message I am gettting.

Error occured during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

I have read that this has something to do with your classpath, but I have tried running the following from the bin directory. (the source files I am testing with are also in the bin directory.)

javac -classpath c:\winnt helloDan.java

javac -classpath c:\wint\system32 helloDan.java

I still get the same error message. Thanks for any suggestions. Please read above post for more info on my situation.

Share this post


Link to post
Share on other sites
I downloaded and tried eclipse. I am getting the following error message when I try to run it. Anyone know what this means?

JVM terminated. Exit code=1
c:\temp\eclipse\jre\bin\javaw.exe
-cp c:\temp\eclipse\startup.jar org.eclipse.core.launcher.Main
-os win32
-ws win32
-arch x86
-showsplash c:\temp\eclipse\eclipse.exe -showsplash 600

Thanks for any help.

Share this post


Link to post
Share on other sites
You're really going against the grain here, and I've never done this before (I doubt many have), so you may be on your own for a lot of this. If I were you I'd just grab the admin and have him install it.

But, java/lang/Object not being in your classpath means rt.jar is not in the classpath. A quick and dirty fix is to throw it into the CLASSPATH environment variable.

Find rt.jar, it will be in [ wherever you installed the jre ]/jre/lib, note this absolute path.

Create an environment variable CLASSPATH, have it's value be

CLASSPATH=%CLASSPATH%;[ absolute path to rt.jar ]

that path includes rt.jar, like "C:\java\jre\lib\rt.jar"

This is similiar to trying to install an operating system by hand or something, I doubt you will get everything just right. rt.jar is likely just the first of many problems. Beginners often have many classpath problems, by doing this your just escalating the issues you're going to have 100 fold. I really recommend just installing it normally.

[edited by - tortoise on November 9, 2003 3:52:07 PM]

Share this post


Link to post
Share on other sites
Well, I am sorta not supposed to have this stuff installed at work. But, I sit here by myself on saturday and sunday from noon until midnight. Hours and hours of just sitting here with nothing to do. I want to learn to program so bad it hurts. But I can''t get the compiler to work.
By the way, this computer does not have rt.jar file. I guess I am giving up, unless someone can come up with some sort of miricle compiler that runs in a web browser and compiles c, c++, and java.
I hate this job.

thanks
Mr. Tie Dye

Share this post


Link to post
Share on other sites
Did you try java 1.1? It''ll work just fine for learning. The only major differences are the JVM''s slower and you''re missing stuff like Java 2D, Swing, etc. But the true essentials like threading, networking, reflection, etc have either not changed at all or very little.

http://java.sun.com/products/archive/jdk/1.1.8_010/index.html

Share this post


Link to post
Share on other sites
Ouch thats bad.

Look to the documentation for java.exe switches. It might be solvable purely with -cp switch or wasn''t there bootstrap...
Well if all fails you could at least try to write some code at work and compile it at home, thus save some time.

"classpath1;classpath2
Class paths to the .jar, .zip or .class files. Each classpath should end with a filename or directory depending on what you are setting the class path to:
For a .jar or .zip file that contains .class files, the class path ends with the name of the .zip or .jar file.
For .class files in an unnamed package, the class path ends with the directory that contains the .class files.
For .class files in a named package, the class path ends with the directory that contains the "root" package (the first package in the full package name).

The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include "." in the new settings.

It is very unlikely that you will need to redefine the bootstrap class path. The nonstandard option, -Xbootclasspath, allows you to do so in those rare cicrcumstances in which it is necessary to use a different set of core classes.

Note that the classes which implement the Java 2 SDK tools are in separate archive from the bootstrap classes. The tools archive is the SDK''s/lib/tools.jar file. The development tools add this archive to the user class path when invoking the launcher. However, this augmented user class path is only used to execute the tool. The tools that process source code, javac and javadoc, use the original class path, not the augmented version."


So you''d need to set path to rt.jar and to tools.jar
-classpath /somedirectory/rt.jar; and so on.


Hope that helps.

Share this post


Link to post
Share on other sites