Hello guys,

Well, here's a simple one for you, which I just could not find the answer to due to lack of finding a good way to put it in words for Google.

I'm pretty much a newcomer to Java, first project I used Java for, actually, and it was a porting of a program I made in C++ with SDL. Took a while to port to Java and sdljava, but I finally finished, but now I'm wondering... Where is it? I can't for the life of me find out where the project is being outputted to, nor can I find the option in Eclipse to see the output folder.

The only logical place, the bin folder inside the project folder, only has alot of .class files, does that have anything to do with it? I'm not even sure which file type is supposed to be outputted by a Java project, much less how to actually run it outside of Eclipse.


I'm sorry of the noobish level of knowledge of this post, but I could really use some help in making sense of this. Thanks =)

I assume you are refering to your workspace?
just click
File and then the 'Switch Workspace' menu item.

But the workspace is the folder your project is saved in, right?
Where do I find the bootable files the project generates?

ehm ... what 'bootable' files? your classes are your compiled files, are you next to compiling also building a jar or war file?

Bootable as in how when you compile a C++ program on Windows, you'll get a .exe file created at the project's bin folder.
So Java doesn't actually do that? What can you actually do with .class files then? How do you use them to run your application?

I'm sorry, I just don't know anything about Java pretty much =\

Bootable as in how when you compile a C++ program on Windows, you'll get a .exe file created at the project's bin folder.
So Java doesn't actually do that? What can you actually do with .class files then? How do you use them to run your application?

I'm sorry, I just don't know anything about Java pretty much =\

sorry for my late reply:
you don't want to create .exe files. they limit your application to the windows OS, while java is a cross-platform language. you'll take a lot of the benefits of java out of the equation.

well, there are several 'runnable' files, just depending on what kind of application and how you wish to open it.

if we're talking about a 'normal' desktop application, not a webapp, then Zhoot is right: you'll need to create a .jar file. your class files can be run by
(in command prompt)
java MyClass
but you'll need to create a .jar if you want an executable file.

.class files are the compiled "executables" that can be executed by any Java Virtual Machion (like a .exe can be executed by an i86 machine). You package all the .class files for your application, along with any other resources it needs, into a "jar" - basically a zip file with a manifest file that describes its contents. If you have a JVM installed on your machine you can run the program in by simply double clicking the .jar file.
In Eclipse select your project, click "export..." from the File menu, then select Java/Runnable Jar File as the export type. You;ll get a wizard that collects the necessary info and creates the jar.

I meant .exe as an example, I don't actually want to create it as a .exe right now, but I didn't know that .jar was what I was looking for.

So, yes, that answers my question. Thanks alot for the answer, and extra education along the way =)

My pleasure. Mark this thread "solved" for the archives please.

YW mate!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.