How run java class on Mac Os X

i develope java appliction and run it on windows platform and now i need run it on Mac Os X but i am new user for Mac Os X and i dont know how i can open Unix shell to compile and run my classes and i dont need to use any tool to make this task.
thanks
rabab

The Terminal Application is in Utilities in Applications. You can use this to open your Unix shell. From there, you should be able to compile and run your java applications.

Similar Messages

  • HT1338 how can i run java on a Mac OS version 10.6.8?

    My company runs it's email and agent portal through Java, wen I wen through the Java web page to download the software
    it sends me to apple support, does anybody have an idea of how to run java on a Mac book Mac OS v10.6.8?
    help me please my job is depending on this.

    Since August 2012 updates for Java (and especially Java Runtime Environment, which is what you actually need) must now be downloaded direct from Oracle:
    http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1637588.h tml
    Further information here:
    http://www.oracle.com/us/corporate/press/1735645
    and their FAQ’s:
    http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/mac-faq.html
    However, if you need the Jave 6 JRE and plug-in, MadMAC0 has posted at
    https://discussions.apple.com/message/20107182?ac_cid=tw123456#20107182
    Apple has also posted (Oct 22/12) the approved solution for restoring the Java 6 plug-in:
    Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality.

  • How can i run Java class form  other java application.

    Hi ,
    I have problem to run java class from my java application,
    I am using the class ClassLoader in order to launched the Java class , it�s work fine whenever, the class exist in the same folder , however , when i am trying to run class that is not in the current folder ,
    i got error (see below),
    Do you have any idea what is wrong?
    java.lang.ClassNotFoundException
         at SimpleClassLoader.loadClass(SimpleClassLoader.java:110)
         at SimpleClassLoader.loadClass(SimpleClassLoader.java:53)
         at Run.main(Run.java:31)

    What does "run an class" mean? You don't run classes. They're not executables.
    I bet your problem is the classpath. You are aware that the classloader looks only there? Unless it's an UrlClassLoader.

  • How do java classes handle searches?

    how do java classes store information? and how do I get it out again?
    I am a relational programmer who has decided 2 take a detour in object oriented lands.
    In a relational table you store info and u get the information out through a (my)SQL query
    now how does a class Project with instance project 1,2,3,.........
    get the information from a project with a certain name?
    eg:
    projectid: 1
    responsible: 1234 (<--userid)
    projectname: testproject
    projectid: 2
    responsible: 1256
    projectname: leukproject
    projectid: 3
    responsible: 1483
    projectname: testproject
    projectid: 4
    responsible: 3245
    projectname: darnedproject
    and so on....
    so lets say our class Project has a thousend instances. I want to search by name, how do i write the onces to the screen who have name "testproject"?
    So how do i do this without sqlquerys, totally oop?
    any help would be very much appreciated! :?

    Hi NiQuil,
    Let me tell you a few basic things. First, RDBMS and OOP are quite different things.
    In RDBMS, you ask ur database, "hey, I want this piece of info. Get me that". But you
    don't tell it how to go and search for it, right. Well, things are not as simple as that in
    OOP. Here you have to specify how to get your data also. But Java will surely help you
    to make it easier.
    First of all, you should not map between tables (of RDBMS) and classes (of OOP),
    although certainly you can do this in some crude ways. What you have to do is, put all
    your projects in a single instance, and then using a method, query that instance. There
    are numerous ways for querying. Several classes like Hashtable, Vector, Collection
    etc etc helps you to store, search and retrieve data. But I dont think it is necessary or
    helpful to describe these in detail here.
    However, I would like to tell you one important point. OOP is not just about data storage
    and retrieval. OOP is a way of thinking. It allows you to combine your data and operations
    on it. An object is just a combination of data and operations on that data. Other objects
    access this data only through an interface defined by these operations. Once you
    understand this concept, life will be easier. But it takes some time, especially because
    you come from RDBMS, a world which talks just about data.

  • How do Java Class Objects get invalid?

    How do Java Classes get invalid in the database?

    What version of Oracle?
    Oracle provided or user created?
    Generally speaking if you modify the database objects a class depends on you can invalidate the object which in turn can invalidate dependend code/objects.
    More specifics are needed if you need a better response.
    HTH -- Mark D Powell --

  • How to run java .class file?

    How can i run/view .class file in java?. is there tool/utilities in java that can do that.?. Thanks

    Ednut wrote:
    I'm sure you must have been taught using the command: java yourClassName after navigating to the location of your compiled class in the command prompt.I'm sure the OP does not need condescending remarks from someone who knows almost as little Java as s/he does.

  • Help running Java apps in Mac OS 10.1.3

    I'm currently taking an intro course to Java and I've been using the OS 10.1.3 Unix Shell to compile and run my assignments, using the "javac" command to compile my classes and the "java" command to run them. It's been working fine until a few days ago when every class I started to compile from that day on wouldn't run. The previous classes I've compiled run fine, however if I re-compile them and attempt to run them I incur the same problem.
    I get this error :
    Exception in thread "main" java.lang.NoClassDefFoundError:
    followed by the classname.
    The best I can figure is that I've accidently changed some option in the java system, but now I have no idea as to how to change it back. I've asked my CS professor what to do but ofcoarse he's a PC user and when he hears Mac he just replies "I don't know about Macs" eventhough I've tried telling him that OS X is unix based. Anyways, if there are any well informed Mac OS 10.1.3 users out there, please help me so that I can resume my CS assignments on my Mac.
    Thanks,
    Craig

    1. Are you certain that you have all of your java files compiled
    and that their class files are in your classpath? Did you import
    the class TestWeeklyEmployee in your java file that has your
    main method? Do all of your class filenames have the same
    name (minus the .java or .class) as the class in the file?All of the java files needed to run the class are in the same directory, and they all have the correct names, You see I'm able to run my programs perfectly on other machines, infact I have to test them in the computer labs before I turn them in. So I know that my probrem isn't a syntax error.
    2. when you start the terminal, type the following:
    echo $CLASSPATH
    and make sure that the output it gives has the . [dot] that you
    added via the .cshrc file at the end or that only a dot gets
    displayed. If it does not have your dot in the output, then you will
    have to use the -classpath option to the java runtime binary to
    tell it where your classes are located.I tried typing echo $CLASSPATH but I got this error message:
    CLASSPATH: Undefined variable.
    And I had directly copied the code you wrote into my .cshrc file.
    3. When you try to run your java program, are you sure that you > are in the directory where all of the class files are located? use
    the "ls" command to see if your class files are in the current
    directory. (you may want to search the web for a UNIX tutorial or
    a UNIX for beginners type of article so that you can feel more
    comfortable using the Terminal application)Yes all of my classes are in the same directory and yes I'm in the correct directory when compiling and attempting to run my programs.
    4. Assuming that 3 is true: If you run your program using the
    "java -classpath . MyClassWithAMainMethod" do you still get an
    error? If you do, then I am pretty sure that you have neglected to
    import a class that your main method is trying to instantiate or
    that you have not compiled the source of the class in question >
    (or both).All classes are imported correctly and yes I have compiled the class. As I said it works fine when I compile and run on other machines, just not mine.
    Are you trying to install the developer tools from the developer
    cds? If you are and you have since updated your OS to 10.1.x,
    then I would not expect project builder to work. The same thing
    happened to me when I upgraded to 10.1.x. Sounds like you
    may need to install the latest developer tools which can be
    downloaded for free from the Apple Developer Connection site
    (http://www.apple.com/developer). Installing the latest developer
    tools should get things right for you.The developer tools that I'm attemping to run are not from the CD, they're the current downloadable version from apple developer. I've contacted apple developer support with my problem with project builder, but they blew me off.
    So now that we've eliminated these possibilities, any other ideas?
    Thanks,
    Craig

  • Running Java classes via .cmd files

    Hi. I've a few Java classes which need to be executed every so often. I've wrote a .cmd file:
    G:
    cd G:\j2sdk1.4.2\bin
    java utils.verifier
    When it executes it successfully runs the java class but I want the cmd window to stay open? becuase when the cmd file finishes runnning it closes the window. How do I make it stay open? Could I slightly modify my verifier class to request some input, so it keeps the window open?Thanks

    Alternatively, you can tweak the cmd rather than pausing it.
    Check cmd/? for more info, I believe it was /K option

  • Run java class using JBuilder

    hi,
    I already import the java class forder to the src folder in JBuilder where the src folder is created by the JBuilder itself. When i run compile the program there is an error in reading the java class file but when i run the program in Textpad, the program is success. May i know why? how can i run my program using java class in JBuilder instead of Java source? Thanks.

    In JBuilder there is an option of specifying what the 'main' file in a project is . Specify that to this class file
    [ What I mean is , in many java files we can define 'main' method , but we will intend to execute the main of one file only for a project . In JBuilder specify this file as the main class file ]

  • Trying to run java class files from my jsp

    I am having difficulty running java files from my jsp. I have compiled my two java classes and inserted them onto my server in the webapps/WEB-INF/classes/scripting directory and have imported scripting.* into my jsp page. The files both compiled ok before the class files were loaded onto the server but when I rty to run the jsp from the server, I keep getting a compiler error. Thanks in advance
    Iob

    Here are the few question
    1) Does your java classes which u created is declared under package scripting. *.class files are to be places under the WEB-INF/classes directory only. Not under scripting. But if you java classes say are under a package called a.b. Then you need to put under classes\a\b\.

  • How to java class

    This is my first time learning Java, Please show me how to write the Java Class which is connect to Main Class.
    Thanks a lot

    Go to http://java.sun.com/docs/books/tutorial/index.html and read the "Your First Cup Of Java" article. It will walk you through all the steps.
    If you're working in Linux then go here http://www.linuxnewbie.org/nhf/intel/programming/javaintro1.html and this article will explian the same thing for a Linux environment.

  • Problem running java applications on Mac Mini.

    Hi all.
    I have a Mac Mini. Days ago, I started having problems running java applications. Right now, I can not run any java application or even a plugin into a web page.
    I downloaded and reinstalled java from Oracle website, but the problem remains unsolve.
    Anyone can help me?
    Thanks in advance.
    Carlos.

    azofra1 wrote:
    Hi all.
    I have a Mac Mini. Days ago, I started having problems running java applications. Right now, I can not run any java application or even a plugin into a web page.
    What error indications do you get? You have to enable error logging in the Java Control Panel to see the details.

  • Running java classes

    I am a newbie to java and have installed the sdk files fine and breezyswing and terminal IO packages and it all seems to work ok because i can compile all my files fine. Even the test files i can compile and they work ok. But when i go to run the class file i always get this error
    Exception in thread "main" java.lang.NoClassDefFoundError: c:\Division.class
    can someone please help me.

    You might want to check this link.
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    The argument to the java.exe command is a class name, not a file or path. If your class is defined as "public class Division" then the command is "java Division" Also, class names are case sensitive, so you must use Division, not division.
    If you still get the NoClassDefFound error, you probably have a Classpath problem. Try to CD to the directory where Division.class file is and use the command "java -claspath . Division"
    Then check the hundreds of posts in the forum concerning classpath.

  • Running java class in command line

    Hi.. i have a java class i want to run from the command line. the problem is that when i do, i get this exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: (class name)
    The class uses some jars, so i used the -classpath option, and seperated the jars with ":".
    I read in a previous topic that the solution can be to add the JRE1.5.0 to the path.
    Can anyone tell me the syntax to do that? And if anyone has a different solution can they tell me? Im running it on linux debian.
    Thx.

    It sounds like you only have the jars in the -classpath option. If that's right, then java will only look in those jars for classes. You probably need for example .:jar1.jar:jar2.jar if you want java to look in the current directory as well as the jar files for classes.

  • How to run Java class application on mac

    Hi to all !
    I usually develop java applications on PC which are started by typing java >classname< into DOS-console.
    Now one application has to be run on MAC OS 9.2 which shurely hasn�t that console. So how can I start it there ?
    Thanx in advance
    Alex

    They have mrj you need to install it, and to launch an application or an applet, you have no console.

Maybe you are looking for

  • Display problem in DW8

    Dear forum, As i'm upgrading from dreamweaver MX to dreamweaver 8.0 i opened my old page design in DW8 and all my pictures are not displaying in either page or subpage. Only the picture logo is displaying instead. When i'm renewing the image or just

  • HT204406 Songs in "waiting" mode for months.

    I started iMatch back at the beginning of the year. I have two songs that have been in "waiting" mode (not "ineligible") all these months. Why will these two songs not upload? The rest of the 10,500 songs all uploaded or "matched" properly. There is

  • 3gs switches off randomly

    i have an iphone 3gs. it will switch off when i attempt a task and then refuse to turn back on again despite a high percentage of battery useage available. i am wondering if this is a regular problem that has a solution or it is just broke? i have tr

  • I am using the pen tool to clipp an image. Sometimes when I apply the mask WITH NO FEATHER it still appears to be feathered? Does this have to do with Anti-aliasing

    I am using the pen tool to clipp an image. Sometimes when I apply the mask WITH NO FEATHER it still appears to be feathered? Does this have to do with Anti-aliasing?

  • Annoying Pop ups

    I am having annoying pop ups and new tab openings on safari on my Mac ( OSX 10.9). Also having small green boxes next to words on page that when I scroll over obviously show an ad.  Just started appearing in the last few days. When I cutoff Java Scri