How to start a Java application on Mac OS

Hello,
I am not sure whether this post would be appropriate to this community, but with the hope to find the answer to the question we have I'll try:
We are fairly new to Java Technology. We had the task to develop an application for Windows OS, and have successfully completed the job. BUT, we decided to go a bit further and see how our program would behave on Mac OS.
Unfortunately, we have never dealt with Macs before, thus don't have any idea on how to make the application run on Mac OS platform.
With Windows we have no problem, went by the most simple way by creating a .cmd file with "java name_of_file" string. Is there any similar simple way to start our small program on Mac OS?

There are many options:
From Terminal (similar to ms-dos prompt, if you didn't know it already):
If you have "java MyApp" in your myapp.cmd, you can execute it with:
sh myapp.cmd
Another option is to set myapp.cmd as executable:
chmod u+x myapp.cmd
and then from Terminal: ./myapp.cmd
Third and best option is to make an executable jar. Then you only have to double-click .jar -file to launch your application (and no need to go to Terminal).

Similar Messages

  • How to start a java application from a website

    hey does anyone know how i can start my java application, when a user clicks a button on my website. I dont want to convert to applet because it will be quite hard plus im gonna have to cut down alot of functionalities? thanks!

    [http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp]
    Kaj

  • How to start a Java application

    How do I start to a application?I have the SDK but where do I go to start it I cant seem to find it.
    Thank you

    Get a basic java programming book.
    Maybe try something like JFrameBuilder which has a test version for free.
    Available at
    http://www.mars3000.com/
    You will then be able to generate some code easly that you can look at and see some simple examples.
    rykk

  • How to start a java application as windows 2000 service?

    Hi all,
    I'm trying to start / stop a java application as a windows 2000 service. But nothing appens (I can see the screen that rapidly display the java help prompt and then disappear)
    I've a working directory i.e C:\MyDir and it contains instsrv.exe, srvany.exe and my application jar MyApp.jar
    I'm using instsrv.exe to register a java application as a service ( C:\MyDir\instsrv MyApp C:\MyDir\srvany.exe )
    I've added a key in registry by running regedit
    The key is under the tree HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyApp
    the key value is Parameters
    in the key I've added a string value "Application" with the value "C:\j2sdk1.4.2_01\bin\java.exe"
    and a string value "AppParameters" with the value "-classpath C:\MyDir\MyApp.jar main" where main is the name of the main class application.
    This seems to run correctly with Windows NT 4.0
    But doesn't work with Windows 2000.
    Can anyone help me?? pls.
    Thanks.
    Max

    I'm replying to myself .... ;-) ahah
    All we need for this purpose is JavaService, at link
    http://www.alexandriasc.com/software/JavaService/index.html

  • How to start a java application by double clicking just like windows gui?

    Hi,
    I want to open the user-defined file in my java application. The way is like the notepad in windows:1.double click the file name 2.the file is opened in the java application 3.if this file has opened at the same time ,then the last opened will be read-only.
    Could you tell me how to carry it out ? Thank you
    from Maria

    !!! Please give me a help! i am thirsty for itSo, to get this straight, you have a Java application in a jar. For some reason, you do not execute this directly. Are you aware that you can execute a jar directly without the need to write a C++ exe to do it?
    Anyway, for some reason, instead you have a C++ application which launches the JVM with your jar main class.
    Well, you want to do two things. First of all, on Windows level, you need to associate the file type of your user file with your application. Note that they have to have a specific file extension that you choose. To associate the file type with an executable, you open a windows explorer, go to View, Folder Options, File Types and add an entry for your file type and specify it to open with your application. If you do not know how to do this, google for "windows associate file type with program executable" or something alike.
    Now, if you double-click one of your user files, the associated exe will open, and it will receive the file name as a command line argument. In your C++ application, you will need to pass this argument, a file name, to the Java application where you launch it.

  • How do starting/stopping of application services differ in R12 ??

    How do starting/stopping of application services differ in R12 when compared to 11i ??
    Can I start/stop services using opmnctl ??

    Can you plese refer me a document where role of OPMN and OC4J in R12 is mentioned ??? In short:-
    OPMN - Oracle Process Manager & Notification Server is component in Oracle Application Server (10g) to manage (start/stop/status) Application Server components (HTTP, OC4J)
    For more:-
    http://download.oracle.com/docs/cd/B14099_19/core.1012/b13996/intro.htm
    OC4J -- oracle container for java.
    In R12 we have 3 groups of OC4J's.
    oacore OC4J - framework based applications
    forms OC4J - forms based applications
    oafm OC4J - Fusion Middleware - for mapviewer, webservices, ascontrol.
    For more, pls read
    http://download.oracle.com/docs/cd/B10464_05/web.904/b10326/intro.htm
    thanks,
    JD

  • Could not start Sun Java Application Server

    Hi ,
    I have been using JSC for a while, now and then it reports an error " could not start sun java application server...". Does any one know why it s not able to start java application server..
    Before you say anything, I have tried
    1. use netstat to find any port conflicts.
    2. Tried to start application server manually
    3. shut down and start studio creator and then try running the project
    4. shut down and start PC
    unfortunately none of them helped
    Only reinstalling resolved the problem. But I cant keep reinstalling very often.
    Does any one know the permanent solution for this problem.
    Cheers
    kush

    Sometimes it appears this is a timeout issue because it's taking too long to come up. As Jonathan says, undeploy can help with this (along with his other suggestions).
    How many deployed projects do you see (in the server navigator you can open up the deployed server and see what's out there)?
    I periodically undeploy "junk" projects that I'm not really using because they slow down the server startup (same thing happens I believe for tomcat... when the server starts it has to load them all and it takes awhile). You can undeploy from within the server navigator by drilling into the server nav and right clicking on the deployed app and choosing undeploy... or you can use the server admin tool.
    hth,
    v

  • How to schedule a java application via Windows Scheduler

    I can't figure out how to schedule a java application using the Windows Scheduler. Do I schedule the java application with the .class file as a parameter? How do I pass arguments to it?
    To execute FileCopy.class, my best guess was:
    Start | Control Panel | Performance and Maintenance | Scheduled
    Tasks | Add Scheduled Task | Browse | Program Files | Java |
    jre1.5.0_06 | ... Advanced Properties
    Under the Task tab:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe"
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy
    FileCopy"
    This does not work. How do I schedule the FileCopy.class java application, and how can I pass arguments to it? Can this be done without specifying a password?
    TIA,
    John

    Suppose that your class is FileCopy (has no package name) and is located under MyDocuments\Eclipse_Workspace\Java_File_Copy folder, then you should have:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe" FileCopy
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy"
    And yes you must provide a user password to execute the task.
    Best way to do this is to create a special user (with password) for executing this task.
    Regards

  • How can i run java application at system startup just liks as services

    How we can run java application at the time of system
    starts up just like as services.

    Hi,
    At first you have to create an exe of the class file.
    for that go to the site www.duckware.com/java2exe.html
    Click on the j2exe23c.exe(75k) download it and install in ur system. convert the class file to windows exe.
    The put the exe in the startup folder in windows.
    If ur not able to find that folder search for it and put that exe in that folder.

  • What is the recommended way to launch a web-start enabled Java application?

    Hello,
    I have a simple web-start enabled Java application, which I can launch from a brower by entering :
    https://xx.xx.x.xxx/MyApp/launch.html
    This method would show me a page. I then had to click on a link to run my application.
    I noticed that I could also launch my program by entering :
    https://xx.xx.x.xxx/MyApp/launch.jnlp
    This method would run my application right away.
    I wonder if there is a recommended way to launch/run a web-start enabled Java application?
    Thank you,
    Akino

    user8708553 wrote:
    ..to directly launch my application and bypass the HTML page, why is there a need to
    display the HTML page and make the user do a click?There are a number of advantages to using the web page. Including..
    <li> An explanation to the end-user of what the application does (a 'sales pitch').
    <li> Provision of screen shots of the app. (more 'sales pitch').
    <li> A description of what security environment it requires, and why.
    <li> Access to using the deployJava.js* to ensure the end-user actually has Java installed & has a suitable minimum version of Java, before they ever get access to the launch button/link.
    * http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deployingApplications

  • How to Start / Stop Oracle Applications

    How to Start / Stop Oracle Applications.
    Oracle Applications Services (TCF, ConcManagers, Metric, Forms, Reports etc...) TnsListner & Oracle Service (DB) are started when the Server is started.
    What is the sequential Order to Start / Shutdown services, Listener & DB.
    Best regards,

    hi
    there is no hard coded rule on which service should be started first.
    the basic thing is concurrent manager uses database for starting, so i advice you the following sequence:
    1. start the database
    2. start the database listener
    3. Apache server
    4. forms server
    5. report server
    6. concurrent manager
    and shutdown in the reverse order
    simple
    regards
    srinivas

  • How to make a Java application that will change the client box's IP address

    HI how to make a Java application( that application would be run on the client ) that will change the client box's IP address ( IP address of itself )

    If you can do that through the command line, then use Runtime.getRuntime().exec(...) to execute your command.

  • How do I update Java on my Mac

    Does anyone know how I can update Java on my Mac (OS X 10.6.8)??

    http://support.apple.com/kb/dl1573

  • How do i clear java caches for Mac OS X, version 10.6.8?

    how do i clear java caches for Mac OS X, version 10.6.8?

    Sarah2565 wrote:
    should i keep the "keep temp files" box checked after removing Java caches?
    Yes. Always keep the default settings unless you have a specific reason not to.
    If you are a heavy user of Java programs or applets, you may need to clear the cache files after Java updates because the old caches may interfere.

  • How do I access Java on my Mac Pro so that I can make sure it's working so I can view Netflix "watch instantly"?

    How do I access Java on my Mac Pro so that I can make sure it's working so that we can view "watch instantly" on Netflix?

    There are various browser scripts
    1: Java (not needed much at all and highly advised to be turned off in Safari/Firefox preferences due to it's vulnerability)
    2: Javascript (if off, needs to be turned on in Safari/Firefox preferences as it's used A LOT)
    Note:  If your using a NoScript type blocker, then you need to whitelist the site. Or drag a Temp Allow All button to Firefox's Toolbar.
    3: Silverlight plug-in (needed for watching Netflix content, it's from Microsoft)
    4: Flash (needed for watching a lot of web based content, but requires constant checks to make sure it's current as they have a lot of security issues)
    Check your status here, works on all web browsers
    http://www.mozilla.org/en-US/plugincheck/

Maybe you are looking for