Solved

Where do I put java classes in Suse 7.1 ?

Posted on 2001-09-07
5
253 Views
Last Modified: 2012-05-04
I am running Suse 7.1 (uname -a = 'Linux linux 2.2.18 #1 Wed Jan 24 12:28:55 GMT 2001 i686 unknown') and have downloaded a java application to run. Having unzipped and untarred it and attempted to run it (java TimeTrack-1.0.jar), I am told "Can't find class TimeTrack-1.0.jar". Do I need to place the jar file in a particular directory or do I need to tell java where the jar exists ?

Cheers

Matt
0
Comment
Question by:paninaro
  • 2
5 Comments
 
LVL 2

Expert Comment

by:dirc
ID: 6464874
You may just need to change the way you invoke java. Try:

java -jar TimeTrack-1.0.jar

This should work if TimeTrack-1.0.jar has a manifest that specifies the initial class to load, and if you are using java 1.2 or better. You can determine the version of java you have using with:

java -version

If that does not work, check the documentation for the name of the initial class to load. Then try:

java -cp ${CLASSPATH}:<path to dir>/TimeTrack-1.0.jar class.to.load



0
 

Author Comment

by:paninaro
ID: 6464982
I'm using java version 1.1.8. Is this particularly old ? It doesn't seem to support either the -jar or the -cp options. I tried using the -classpath option to do:
   
   java -classpath /home/matt/downloads/web/TimeTrack/TimeTrack-1.0.jar TimeTrack.class

However that then gives a:
   Unable to initialize threads: cannot find class java/lang/Thread

error.
0
 
LVL 2

Accepted Solution

by:
dirc earned 100 total points
ID: 6465041
Java 1.1.8 is about two years old. You probably need to added the classes.zip file to your classpath.

java -classpath <path_to_java_home>/lib/classes.zip:/home/matt/downloads/web/TimeTrack/TimeTrack-1.0.jar TimeTrack.class

If you are not sure where you java home is, use "which java" to find it.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9916250
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: dirc {http:#6465041}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

763 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