LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2004, 02:18 AM   #1
Dominik
Member
 
Registered: Nov 2003
Distribution: slackware9.1/freebsd5.2
Posts: 53

Rep: Reputation: 15
Question where are the jdk inbuilt classes located?


Hello guys,

I've installed jdk on freebsd but when i run java, it returns java.lang.* no class
found for the slightest prog.

On linux, it works fine, i only need to specify my personnal classpath.

Does anyone know where the java internal-classes are located? And how they are named: I found no path of the form /usr/.../java/util/ (in linux or free).

Need some help
 
Old 02-19-2004, 02:53 AM   #2
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
You will never need to know where the inbuild classes are located. Your problem is actually the matter of the Java compiler couldn't find your main class. Make sure you specify the classpath to the folder your main class exists or go to the same folder and run it.

Last edited by moeminhtun; 02-19-2004 at 03:19 AM.
 
Old 02-19-2004, 06:09 AM   #3
UltimaGuy
Member
 
Registered: Aug 2003
Location: Chennai, India
Distribution: PCLinuxOS .92, FC4
Posts: 840

Rep: Reputation: 32
All the classes are located in a jar file. I think the file will be rt.jar, but check out all the jar files inside your java installation directory. The file will be quite large, maybe > 20 MB. But to access it just set CLASSPATH to the directory and the java compiler and interpreter will find it .

For example, if it is /opt/blahblah/*.jar then set CLASSPATH to this path and export it .
 
Old 02-21-2004, 07:39 AM   #4
Dominik
Member
 
Registered: Nov 2003
Distribution: slackware9.1/freebsd5.2
Posts: 53

Original Poster
Rep: Reputation: 15
Unhappy

Thanks for the answers,

I did all what you said UltimaGuy, but the problem remains.

classpath is loaded , i checked with echo. try all possibilities *.jar & wrote down the full name.jar for all the lib .jar files. I gave full access to all the linux-jdk files, nothing changed. cannot execute my java progs.

What kind of problem could it be ??
 
Old 02-21-2004, 07:43 AM   #5
UltimaGuy
Member
 
Registered: Aug 2003
Location: Chennai, India
Distribution: PCLinuxOS .92, FC4
Posts: 840

Rep: Reputation: 32
Does the user have permission to acces the folder the Java classes are?

For example, you might have installed Java as root, and so the proper privileges are not there for the user accounts ? Check it out .
 
Old 02-21-2004, 11:24 AM   #6
haobaba1
Member
 
Registered: Jul 2003
Location: VA Tech
Distribution: Mandrake 9.1
Posts: 73

Rep: Reputation: 15
I think you need to specify your main class in a manifest file inside the jar file to make the jar file executable. Then you can run it as:

java -jar app.jar

Your jar file should have a manifest file inside it adding a line similar to this should solve your problem, that is unless you have other class-path problems:

Main-Class: classname
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which video driver should i use for mplayer .my system has inbuilt graphics card of amolgupta Linux - Software 1 07-22-2005 11:23 PM
OOP (PHP) classes and extended classes ldp Programming 3 03-05-2005 11:45 AM
intel motherboard 865 chipset inbuilt soundcard not detected !HELP pravashl Slackware - Installation 3 04-17-2004 12:25 PM
Driver for my inbuilt NIC card natram Linux - Hardware 2 01-08-2004 06:15 AM
Inbuilt Firewall in Slackware 9.1? NewtoSlack Slackware 5 01-04-2004 12:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration