Launch Configuration for Eclipse JAR file

Hi all, I am very new to Eclipse and pretty new to Java but I am just trying to create a simple JAR file that runs a system executable such as calc. Very easy :)
I haven't had any issue running the code as an applet inside eclipse but when trying to create a runnable JAR, it doesn't give me any launch configurations to choose from. This doesn't make sense as I have launch configurations set up for it (under run.. run configurations I have two set up as Java Applets).
import java.io.*;
import java.applet.*;
public class test2 extends Applet {
     public void init(){
          try {
               Runtime.getRuntime().exec("calc");
          catch (IOException e) {}
};Anyone have any ideas? If you need more info just let me know.
Thanks
-J
Edited by: jaym3 on Nov 13, 2008 10:39 AM

EJP wrote:
Actually the default changed from "true" to "false" in Tomcat 7, but if it is set to "false" in Tomcat 6 it needs to be changed.Hm that I didn't spot. Thanks, I'll keep that in mind. Now I wonder what other settings just happened to have had their defaults changed... On some rainy afternoon I'll go figure that out.

Similar Messages

  • Need help with classpath configuration for external jar files

    We have coded our own JAAS login module, and it uses classes located in jar files, and these jar files were not created using SAP dev studio, e.g. they were provided by a third party vendor as a set of tools.
    So, how do we deploy these jar files so that our SAP JAAS login module can find them ? We found we can run consoleconfig.sh to change the classpath which SAP J2EE engine uses, but we wondered if there was a better way to do this. Of course, if the jar files were created by us, we can include them in the dev studio project and they would be deployed using SDM, and this would not require any changes to classpath using consoleconfig.sh
    Thankyou in advance for your help.

    I noticed nobody has sent any feedback on this yet, so I wondered if I have posted to the wrong forum ? Any thoughts on this ?
    Thanks,
    Tim

  • Best practices for managing jar files

    just wondering what anyone's thoughts are on managing jar files. I have read that instead of adding the jar files to your CLASSPATH environment variable, you can just extend the jdk. This is accomplished by inserting the jar files into the C:\jdk1.3.1_01\jre\lib\ext directory. I suspect that if the latter option is truly feasible, it would be preferred to adding entries to the CLASSPATH variable for every jar file you want to use. You could end up with hundreds of entries into the CLASSPATH variable if you have that many jar files in use.
    Any thoughts, comments, or links to where I can find any info on this?...
    thanks for any information.....

    In my company, we use scripts (in UNIX system) to handle this problem. The following scripts can iterate jar files in a given directory:
    for i in ${YOUR_LIB_DIR}/*.jar
    do
    YOUR_CLASSPATH=${YOUR_CLASSPATH}:$i
    done
    With this simple script, you can use any directory in the same way as the ext\ direcotry (just copy the jar file in it), and you still have the flexibility of maintaining jar files in different directories, say a number of projects.
    but i don't know whether .bat/.cmd scripts for windows have the same function.

  • Looking for a JAR file...

    I am looking for the jar file that has the following in it:
    com.sapportals.portal.htmlb.page.JSPDynPage;
    com.sapportals.portal.htmlb.page.PageProcessorComponent;
    Can someone PLEASE PLEASE email it to me?
    My email address is [email protected] .
    Thank You?

    I do not have NWDS installed (that is a whole other issue).
    But someone did send me the file.
    Plus, I already had it but just did not know where to look. Now I know where to look.
    Thank you

  • Why tomcat is still looking for old jar files?

    Please help me it is a very serious problem.
    I updated one of the jar files used by the project. I am using a new method that is available only in the new library. I removed the old jar files in my local system, and everything worked fine. Then I commit those files to the subversion, which is in the testing server, and then I created the war file. The war is successfully created, then I deployed to the tomcat. But, now there is an error in the portion I am using the method that is only available in the new jar files.
    One of the error when I go to that portion is:
    1. No Such Method Exists
    The other errors on log files are:
    1.
    WARNING: Failed to open JAR
    java.util.zip.ZipException: No such file or directory
    2.
    validateJarFile(tomcat/webapps/ROOT/WEB-INF/lib/j2ee.jar) - jar not loaded. See Servlet Spe
    c 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Please help me, I have tried every other way to solve this. I have tried removing all the old jar files there were, and replacing with the new one. I have tried creating a war file and ftping to the testing server.
    I problem is still there and it is because the testing server's tomcat is still looking for old jar files. I used Netbeans and add jar files as usual method.

    Check the contents of your WAR file that you are deploying on the testing server to see if it contains the JAR that you can't find.
    More than likely you are building your WAR file and your new JAR file is not being included in the build.

  • To create a desktop shortcut icon for the application for a jar file

    Hi
    I have created a jar file for my application. when i double click this jar file, the application opens.
    What i want is--
    Instead of user clicking on the jar file, my application also has to create a desktop shortcut icon.
    If the user clicks on the icon which is on the desktop the application should open.
    Please suggest me.
    Thanks in advance.

    >
    Please suggest me.>Launch the application using java webstart. A webstart launch offers things like a splash screen, automatic updates, and desktop integration in the form of desktop shortcuts and program menu items. If the launch file specifies icons, they are used for the shortcuts, otherwise a generic icon is used.
    For a comparison between a sandboxed webstart launch and a plain app., try the [Text Width Checker|http://pscode.org/twc/].
    While the TWC can run OK within the security sandbox, many applications need to be digitally signed and request extended permissions, to do what they need to do.
    STBC is an all-permissions webstart launch.
    Edit 1:
    And for one that definitely suggests desktop shortcuts (I usually avoid them, in favor of a menu item only), try the sandboxed [demo of the PrintService|http://pscode.org/jws/api.html#prs], which prompts the user to choose.
    Edited by: AndrewThompson64 on Sep 2, 2008 10:49 PM

  • Lazy downloading broken for updated jar-files?

    Hello,
    Using webstart-6.0 + jar-index + download="lazy" works great - jar files are downloaded on demand when they are really needed.
    However when updating all jar-files, the files that have been downloaded lazily and cached before are downloaded again before the application can be launched, not only on demand.
    Is this the intended behaviour, and is there any way to let webstart lazily download updates, just when the jar-files are needed?
    Thank you in advance, lg Clemens

    Libraries loaded from the j2ee/home/lib directory are opened and loaded at the J2EE container level. So they are accessed from the very start of the server, to the point where it is stopped.
    Therefore if you modify a class library which has already been loaded, you may run into file locking related issues (which will be OS dependent, Windows for example probably won't even let you overwrite the file) so that is what you are likely to be seeing.
    JAR files loaded at the J2EE container level aren't really suitable for dynamic updating -- the classes can be referenced in a multitude of other classloaders.
    As you have seen, replacing a J2EE container level class file, then a restart will be required along the lines of what you have written.
    Stop mid-tier, move new file in and restart?? cheers
    -steve-

  • Please help me 2 find a Document for this jar file com.sap.workflow_api

    HI,
    I want to create a task in UWL using web dynpro application. For this I need to import the specified com.sap.workflow_api.jar jar file.
    This jar file is in our WEB AS Server
    path=
    server\c\usr\sap\W01\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.workflow.apps\lib
    I have browsed all over for a good document , i got just one link :
    http://help.sap.com/saphelp_nw70/helpdata/EN/46/94b9b2b321581ce10000000a1553f7/frameset.htm
    Could you help me out with a better document for This task and  I want the complete document for this particular jar file com.sap.workflow_api.jar.
    It wolud be very helpful if I could get it at the earliest.
    Regards,
    Boopathi M

    HI Ayyapparaj,
    I have converted my project to javadoc,but i don't get any document for specific class. only I got what ever method is avilable in our controller that corssponding method come over in the java doc.
    How can i get the document for specified IWorkflow interface ? this com.sap.workflow_api jar file has IWorkflow interface. I need to know how to use this IWorkflow interface.
    How to use javadoc tool ?
    Regards,
    Boopathi M

  • How to include images/icons for a jar file

    Hi,
    I need to create a jar file which will contain my application. My source code (.java) files are in "app" folder. I compiled that using javac -d . *.java and one package("appl") was created. I have all icons and images related to my application are in the folder named "icons" in the directory where source files are located i.e; app folder - "app/icons". I am accessing the images in the icons directory as "icons/book.gif".
    I created a jar file from source file directory with the option
    jar cvf app.jar app
    and i added this jar file to my classpath also.
    I have created a batch file to execute this application and set that batch file to "path" environment variable.
    It is running from any directory but no icons are appearing in that application if i try to run the application out side the "app" folder.
    Can any body give suggessions to solve this problem?

    Thanks for the added info, now let's get started.
    To use files in jars, you need to refer to them via a URL, so you'll need to modify your code a little bit first.
    URL imgURL = ClassLoader.getSystemResource("icons/BOOK.gif");
    setIconImage(Toolkit.getDefaultToolkit().getImage(imgURL));Next, you'll need a manifest. Using any text editor such as notepad, create a file called manifest.txt and put two lines in it. The first line will specify the class (w/o .class on the end) that contains your public static void main method, the second line is just an empty line (just press return).
    Main-Class: main
    (a blank line)
    Save this file with your class files (e.g. in Exam folder).
    Next build your jar. We want the jar to contain the package folder and your icon folder as well. So use this:
    jar cmf Exam/manifest.txt myJar.jar Exam/*.class icons
    And you should now have an executable jar. You can run it from dos with:
    java -jar myJar.jar
    or you can double-click it from windows.
    -Ron

  • A question for my jar file

    When using the jar command, do I have to specify any imported classes that I have downloaded from the net to use in my main class?

    Here's an example that works for me. I made a temporary directory c:\tempjava inside of which is the RabbitHole class that you posted. There is also c:\tempjava\TerminalIO directory that contains the KeyboardReader and ScreenWriter classes.
    To create an executable jar that includes the TerminalIO classes:
    1. I created a manifest file, c:\tempjava\Manifest.txt that looks like this.Manifest-Version: 1.0
    Main-Class: RabbitHole2. I created a jar by using the commandjar -cvfm rh.jar Manifest.txt *.class TerminalIO\*.class3. I executed the jar usingjava -jar rh.jarTo create an executable jar that relies on the TerminalIO classes being in the c:\tempjava directory:
    1. I created a manifest file, c:\tempjava\Manifest.txt that looks like this Manifest-Version: 1.0
    Main-Class: RabbitHole
    Class-Path: rh.jar  /c:/tempjava/2. I created a jar by using the commandjar -cvfm rh.jar Manifest.txt *.class3. I executed the jar usingjava -jar rh.jarIf you want to make the TerminaIO package relative to the jar file - that is, the jar expects the TerminalIO package exists in the same directory as the jar file - then modify the manifest by replacing /c:/tempjava/ with . (the current directory).

  • Need inputs for creating Jar file

    Hi All,
      I am doing the scenario as file to mail. so here i am using java mappings for sending the file in mail attachment.
    as i can see in my system there are already one imported archive exists with name called "java_mappings".
    in that i can find 10 to 12 mapings which are used for different interface.
    i have tried to export the imported archive to my local system and created the project with same in NWDS.
    but here i can not find jar file.
    can anyone suggest how can i get jar file for already exist the imported archive.
    second option is if i want to create new mappings then how can i get the Jar file.
    thanks,
    Bhaskar

    Hi Bhaskar,
    Jar file is an archive which consists of all class files needed by Java mapping. If you have a folder named Java_mapping and you guess that it is being used in different interfaces, then it should have the class files in it... may be the source code is missing...
    I will suggest you to export it into your local machine and extract using winzip.. then you might see some file with .class extesnion. Try a tool like frontendplus which will make java code from java class file to get there code..
    Now if you are trying to make one for your requirement i would suggest to read the stefan grube blog..
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414700%29ID1981012450DB01072979760660502867End?blog=/pub/wlg/4774
    Also note that the java mapping is just a jar file which has:
    1. the com.sap.xpi.ib.mapping.lib.jar (PI7.1) or aii_map_api.jar (PI7.0 or XI3.0) file
    2. You java code class file.
    Regards
    Suraj

  • Search for unused jar files

    Hi,
    We have a large project for which the set of dependent jars has grown large over the years. There is some suspicion now that we may be including jar files on the classpath that are no longer required.
    Does anyone know of a tool that can search a code base for usage of a particular jar? Obviously, it's a difficult task as there are a number of ways that classes may be imported/accessed (and reflection makes it impossible). It would be good if we could get some idea though of the jars that might be unused.
    This seems like a common task, has anyone seen (or developed) such a utility?
    Cheers,
    Joe.

    This really isn't an option. We're talking about an application with 1000s of classes.
    This also requires a LOT of manual intervention. Firstly to remove the statements (although this could obviously be automated), secondly to pick through the errors, add jars back etc to eventually compile a list of dependencies.

  • Best Practice for Creating JAR File

    I have my first java program all done (Yipee!) and I have created the .jar file but I don't think I am really creating it like I should. When I ran it on another machine it had problems because I think it couldn't find all the other classes like the delivered ones.
    In my program I have:
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    But when I created my JAR file I only specified my manifest, java program and my one class that was created. I am thinking that if I really want this to run on other machines I have to import the java.io.*, java.util.* and java.sql.* in my JAR file as well, is this true?
    What is the best way to go about this, only import specific classes instead of the .*? If so I know one class I need to import, java.io.File, what is the best way to find out the other classes?
    I commented out all my imports to see how many errors I would get I received 30, I then specified import.java.io.File and I am down to 21.
    Thanks!
    Ryan Johnson

    want this to run on other machines I have to import the java.io.*, java.util.* and java.sql.* in my JAR file as well, is this true?No. The core classes shuld be present in the Java environment on the target machine.
    You have to ship only your classes and eventually the third party libraries.

  • Classpath is not working for executable jar file

    I have created executable jar file using following command where manifest file contains Main-Class and Class-Path entries.
    jar cvfm app.jar META-INF/* lib/* *.class
    So here app.jar contains my external jar's in lib directory
    but when I move app.jar to another directory, it's doesn't get my external files.
    I'm not getting this problem as these jar's are in app.jar
    class-path entry in manifest file:
    Class-Path: lib/abc.jar lib/xyz.jar
    Pls help me where it is getting fail?
    Thanks in advance,
    Vikas

    Java doesn't handle jars within jars. Your library jars need to be outside of the executable jar as in
    dist - main.jar
          - lib  -  lib1.jar
                 -  lib2.jar

  • How to set the classpath for external .jar files after importing?

    Hi techs,
    How to set the classpath in WSAD5.1.2 after importing the .jar file to the WEB-INF/lib folder.
    urgent

    I got it.
    after importing the jar file to the perspective,we need to right click on project name, go to proprties,
    goto java build path,
    there we need to include the external jar files.

Maybe you are looking for