• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EXECUTABLE FILE FOR APPLICATION

 
Jessie Chapman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to attach java applets to a database but I came across a security issue, so now I want to create applications and connect them to a database.
When you create an applet it creates its own html file, you click the html file and it runs, basically I won't to do the same for an application.
So after all that gibberish how do you create an execution file for application? Is it simple?
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From a command prompt:
C:\> java classname
Where "classname" is the (fully-qualified) class name of the main class of the application - the one that has a definition of "public static void (String[] args)" - in it.
"classname" is the Java class name, NOT the class file name, so "com\javaranch\MyApp.class" is not correct - it should be "com.javaranch.MyApp" assuming you have a "package com.javaranch;" statement in the class source code.
You may also need to set a classpath. The current directory is only considered as part of the classpath if it has been set in a classpath definition (for example, by using the option "-classpath ." in the java command.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic