The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Re: API in one file

If I understand your question correctly, then package it all into a jar. You can package them separately (eg the 'drunkscripts' in its own jar and add this to the class path of your DunkTest.java) or together - ultimately you get a single, runnable jar. You can find a lot of information online about how to do this, for example Packaging Programs in Jar

Re: API in one file

Copy and paste all the code from the other files into DrunkTest.java

However, this is generally a very bad idea. Java classes are suppose to be contained in their own class file and only in some specific situations do you want other classes/interfaces to be placed as member classes/interfaces (is that the correct terminology?).