Hi everyone, I need to be able to run a Java application (not an applet) directly, that is not from an IDE or the command line. How can this be done for a Windows PC? I have seen many applications written in Java, but are executed just like other Windows apps, so there must be a way.
vicky_dev 12 Junior Poster in Training
Recommended Answers
Jump to Postjavaw is designed for that (launches the JVM but without a command window) again needs to be in your path. Then create a windows shortcut with the necessary command. See here for more info:
Jump to PostOnce you install Java, you should be able to "double-click" on a .class file and execute it in that way, if you don't have a class file (but just a .java file), then you have to compile it/them first. Better would be, to create a jarfile containing the relevant classpath …
Jump to PostBest is to use ANT to build your projects to jar files. (or maven if you want to take it a step further).
Once you know how to do it manually, yes. But just like with using an IDE, you should not start with it. You should first learn how …
Jump to PostYou have done something that has changed the file associations on your machine. (For the jarfile one it was the installation of WinRAR.)
Change them back.
.class should be opened with "java" or "javaw" and .jar should be opened with "java -jar" or "javaw -jar". Alternatively, you could …
Jump to PostYes, I know all about javac and java and compiling and executing Java programs... Thats really the first thing I learnt. But I wouldn't expect the end users of my application to go to the command prompt to execute it... They should be able to do that just like ordinary …
All 17 Replies
darkagn 315 Veteran Poster Featured Poster
hollystyles 113 Veteran Poster
orko 36 Junior Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
schoolsoluction -1 Light Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
vicky_dev 12 Junior Poster in Training
vicky_dev 12 Junior Poster in Training
masijade 1,351 Industrious Poster Team Colleague Featured Poster
vicky_dev 12 Junior Poster in Training
orko 36 Junior Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
cms271828 2 Junior Poster
schoolsoluction -1 Light Poster
vicky_dev 12 Junior Poster in Training
masijade 1,351 Industrious Poster Team Colleague Featured Poster
vicky_dev 12 Junior Poster in Training
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.