View Full Version : JAVA beginner question
Griff
February 13th, 2006, 04:43 PM
I have a class file that I need to put in the JAVA bin. Is there a bin in particular that java uses exclusively? I'm not sure where it needs to go. I'm using arnieboys java from automatix if that matters.
LordHunter317
February 13th, 2006, 04:44 PM
Wait, I'm confused. You want to reference the class from another class? If so, you can add it to the classpath when you run Java. It needs to be in the proper location relative to the other class though. The best idea is to package everything into a single jar, so it's self-contained.
Griff
February 13th, 2006, 10:52 PM
Hmm. Not sure what you mean. On my PC's windows partition I just put the .class file in the java\bin directory. I tried finding this same 'bin' so to speak on the linux side (ended up trying /usr/lib/(SDK 1.5 somethin)/bin ,but doesn't seem to work. I am not familiar with the term 'jar'.
juancnuno
February 13th, 2006, 11:02 PM
Why do you want to do this?
Griff
February 14th, 2006, 04:44 PM
Ok. Got it. I just had to put that .class file within the same directory as the .class i was working in.
PS: I wanted to do it because I needed to be able to use the file in an intro to java class.
kaamos
February 14th, 2006, 04:49 PM
You can do the same with
javac -classpath ./:/path/to/directory Class.java
java -classpath ./:/path/to/directory Class
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.