Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

jGl - help with configuration

I need help with the configuration of my compiler. I want it to be able to run jGL. I can compile it without having any errors but when I run it I get exception in thread main
0
gekko18
Asked:
gekko18
  • 19
  • 18
  • 2
  • +1
1 Solution
 
CEHJCommented:
And the exception is..?
0
 
gekko18Author Commented:
NoClassDefFoundError is the exception.
0
 
gekko18Author Commented:
NoClassDefFoundError is the exception.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
CEHJCommented:
Can you tell me the output of the following (assuming Windows)

echo %CLASSPATH%

?
0
 
girionisCommented:
 I think it should be "set CLASSPATH" on Windows.
0
 
gekko18Author Commented:
Where should I write it
0
 
CEHJCommented:
just type

echo %CLASSPATH%

at the command line
0
 
gekko18Author Commented:
I dont understand.
Where in my compiler should I write it???
0
 
CEHJCommented:
Open a DOS window and type it into that
0
 
gekko18Author Commented:
I dont understand.
Where in my compiler should I write it???
0
 
gekko18Author Commented:
When I type it into the DOS window I get %CLASSPATH% back
0
 
CEHJCommented:
Good. Now where did you put jGl.jar?
0
 
gekko18Author Commented:
I put the jar-file in the same catalog as the .java-file
0
 
CEHJCommented:
That'll have to be moved. First, do the following:

in the DOS window type

java

and tell me what you see

0
 
gekko18Author Commented:
I see a lot of rows of options to java such as -client,-server and so on.
0
 
CEHJCommented:
Good. Now do the following:

1. Save the file below as Props.java
2. Go to the directory into which you saved it in your DOS Window
3. Enter the command
javac Props.java
4. Enter the command
java Props java.ext.dirs


and tell me what the output is


//---------------------------------------------

public class Props {

  public static void main(String[] args){
    if(args.length > 0){
     for(int i = 0;i < args.length;i++){
      System.out.println(System.getProperty(args[0]));
     }
    }
    else {
      System.getProperties().list(System.out);
    }
  }
}
0
 
gekko18Author Commented:
I get "Exception in thread main java.lang.NoClassDefFoundError: Props/class"
It was exactly that message I got when I runned the jgl-file.
0
 
CEHJCommented:
OK. When you did Step 3 above, everything seemed to be OK did it?
0
 
gekko18Author Commented:
Yes, I just have to do the javac from the JAVAHOME-catalog. If I just typed javac I got that javac isn´t a intern command, extern command, program or commandfile
0
 
CEHJCommented:
In that case, next thing is you'll need to put java's bin directory on your path. What verison of Windows are you using?
0
 
gekko18Author Commented:
I am using XP Home Edition. How do I put java´s bin directory on your path???
0
 
gekko18Author Commented:
I am using XP Home Edition. How do I put java´s bin directory on your path???
0
 
CEHJCommented:
In Win2K you can set environment variables by going into My Computer via a right-click so i hope it's the same in XP. Add the path to java.exe to your PATH enviroment variable.
0
 
gekko18Author Commented:
I cant find it..??
0
 
CEHJCommented:
Hmm. Don't know how to do this in XP. Try Start | Help and type in 'environment variable'
0
 
gekko18Author Commented:
I managed to find it and I did what you told me too, now what?
0
 
CEHJCommented:
0
 
CEHJCommented:
OK. So what do you get when you type in

java

or

javac

anywhere (in any directory) now?

(You might have to close that DOS window and open a new one)
0
 
gekko18Author Commented:
And what should I do after that
0
 
gekko18Author Commented:
No change...
0
 
CEHJCommented:
Can you tell me the output of this command?

PATH
0
 
gekko18Author Commented:
I think I changed the wrong parameter but konow i changed the PATH variable but when prompt echo %PATH% the path to the java directory arent there. Do I have to reboot my computer to let the computer read the newl added value??
0
 
CEHJCommented:
It's possible, yes. Did you precede the directory with the separator (;)?
0
 
gekko18Author Commented:
Yes, then I am rebooting my computer.
I won't be able to talk with you anymore today but thank you for your help so far. Please check this question again tomorrow sometime if i need some more help.
0
 
CEHJCommented:
Yes. shout up when you're ready. You're nearly there.
0
 
gekko18Author Commented:
Ok but this didm´t help...
0
 
CEHJCommented:
Please give the output of the command

PATH
0
 
CleanupPingCommented:
gekko18:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
girionisCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points to CEHJ

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer
0
 
CEHJCommented:
:-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 19
  • 18
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now