Can you code in Java in Xcode

Im taking a java class in school and we are using Jcreator. I know that there is no Mac download for Jcreator. I was wondering if it is possible to code in java in Xcode?

No probably not, Xcode is an IDE specifically for Cocoa (Objective C), the programming language of Apple. Scripting languages like Python, Ruby and Java are text files and don't need to be compiled, so Xcode does not treat them like they are inside an IDE. Since I write mostly Python, I have to run my webapp from Apache in a browser, or as a text file from Terminal because there is no "Run" button in Python. But you also do not "build" Python like you do in Cocoa, you just run it as a script, the same with Java. So I think you will find that Xcode is lacking the extreme convenience of a dedicated Java IDE.
On the upside, Xcode is free, renders very readably in OSX and runs very smoothly. In the case of Python, I have tried a few IDEs however because they run inside the JVM emulator they rendered poorly and conrols were all jerky. So I stuck with Xcode and am satisfied. There are probably more options for Java but I don't know. There are no Cocoa IDEs for Python, if there was I would probably use it.
If I had to advise a new user I would recommend you find an IDE written in Cocoa, if such a thing even exists for Mac. Or you may not even need one. Running your application from the command line is easy, flexible and professional. You write your code as a text file and run it in Terminal (or Apache) and you get the output as text (or a webpage). If you are taking a class this may be the best approach, since you may want to abandon Java afterwards for a cleaner programming language.

Similar Messages

  • Can you write simple Java code in a UNIX function and run it? See example....

    Hi,
    I'm new to Java and I have a question.
    Is there any possible way a simple script like the below would work in a UNIX function called from a shell script. I know you're not supposed to do this but can you?
    Thanks in advance,
    javatst() {
       $JAVA_HOME/bin/java  <<- _java
      public class HelloWorld {
      public static void main(String[] args) {
      System.out.println("Hello, World");
      _java
    javatst

    2894431 wrote:
    You can run a java class from a shell script like below:
    #!/bin/sh
    exec /usr/bin/java -DsysParam1="var1_val" -DsysParam2="var2_val" -cp jar1:jar2:jar3 /home/unixUserName/javaClasses/Test.java
    exit 0
    No!
    This is neither a valid answer to the OPs question (since your script does not create the content of Test.java) nor working.
    The java executable can only run *.class files which contain byte code of the intermediate language generated by the javac executable.
    Your suggestion leads to a ClassNotFound exception.
    bye
    TPD

  • Can you code 2 classes into one source file?

    Can you have 2 classes coded in one source file? If so, do you end up with 2 .class files after the compile?

    yes you can code 2 classes in one source file. I
    believe that you have to reference one class is an
    "object" class of the class under which you save the
    file as.
    Example:
    File name is A.java
    class A{
    class B{
    When you want to refer to class B, you have to say
    A.B ( eg: A.B ab = new A.B() ). The class file(s)
    will be A.class and A$B.class.
    This is what I recall at best at the time. good luckI presume you mean when one is an inner class? Otherwise:
    public class one {
      one() { System.out.println("one");
      public static void main( String[] argv ) {
        new one();
        new two();
    class two {
      two() { System.out.println("two");
    }Will work fine, and will create one.class and two.class. But that does not mean it is a good idea to do it ;o)

  • New to Programming, need your help with writing code for java in Xcode.

    Hey everyone! Sorry if I sound like a total idiot here with a bunch of developers but I could really use your help. I am in college and having a bit of problems with my intro to programming class. The class is entirely Java based and so, after having to use dos windows on my grandpas crappy laptop I found out about xcode. I downloaded and installed it but I am having problems seeing where exactly it is that I am to write my code for a normal java application. Any help would be greatly appreciated! I wrote it on the bottom of a bunch of code that looked strange to me. For relatively simple java programs I chose the java application template. Is there something here that I missed?

    The Java Application project template looks like it sets up an application and some kind of starting UI using Swing/AWT. I didn't look at it too indepth, but if you are in an introductory course this might be more than you need to complete your assignments. There doesn't seem to be blank Java template, so I don't know what you should use. Perhaps just a blank project you add your .java files to.
    To answer where to write code, you would write it in your .java files under the /src folder. Execution begins in
    public static void main(String args[]) {}
    in YourAppName.java, then creates an object based on your application class, and runs the code from there to display the UI.

  • How can you get a java program working on a cell phone?

    I was thinking of making some stuff for cell phones so i was wondering how you get a normal java program to work on cells.

    its all j2me - midlet package....Huh? The jsr-118 MID profile alone has 11 packages, one of which is javax.microedition.midlet. Notj2me - midlet.
    works best on nokia phones.Sez who? You seem to be confusing Java ME with Symbian C.
    you can use net beans midlet packge add-on.Only it's called the NetBeans Mobiliity Pack.
    Its easy to use and has lots of tutorials.Ditto for the Wireless toolkit for CLDC.
    just search on google.Yes, but with which keywords?
    @OP:
    NetBeans mobility pack comes with a short tutorial and several samples, you also need to download the latest WTK as the ver. 2.2 which comes bundled with NetBeans is just too buggy to work with. Then there are the manufacturer-specific SDKs from Nokia, Motorola, Sony Ericsson and (maybe) others.
    If and when you get started in Java ME aka j2me, it will be appropriate to post any questions you might have on the mobility forums, not here.
    Google "j2me tutorial" for many good hits.
    luck, db

  • Can you establish a Java enviroment w/o downloading and installing JAVA?

    Hello,
    I am a fifteen-year-old, JAVA compatible teenager in Northern VA. I am trying to find a simple and easy way to run a JAVA application (using the ".class" files, of course) on a windows platform, hopefully without have to go through a complex install procedure. Is there some way to do this? Is this what the JRE is for? The Java plug-in? Any and all help would be very much appreciated. Thanks!
    -Stephen Mouring Jr.

    Basically, the JRE is as easy to install as any other application. You just double click it, run though the wizard, and bingo.
    The easiest way to distribute the JRE is to burn it onto CDs, and give them away with your app. Then users won't even have to download it. You could call it a driver ;-)
    Installing the Java applications can be a bit harder. The easiest way to do it is with Java WebStart (included with the JRE), but IMO this isn't really reliable yet.
    Distribute your apps in a JAR file, and make a self extracting exe that can copy the JAR to the Program Files directory, and copy a shortcut to it onto the desktop. That is, at least theoretically the easiest way.
    The hard part is not installing the JRE. The hard part is making your app invoke the JRE. Basically, to make your app have an icon on the desktop and everything automatically, you'll need some kind of installer. How you go about this really depends on what kind of user base you want to distribute apps to.
    Hope this helps.--
    <sig> http://www.itswalky.com http://www.crfh.net </sig>

  • Can you start a Java GUI without having a prompt??

    Is it possible to start up a Java GUI without it having to be opened from a dos or unix prompt?

    In windows you can use the WScript host to launch your apps.
    var shell = WScript.CreateObject("WScript.shell");
    shell.run("jdk.1.3.1\\bin\\javaw.exe YourClass");
    shell.popup("Finished",0,"Launch YourClass",0);just copy this to a text file, save it with the extension ".js" and double-click it

  • Can you code sign a CS Extension with a PFX certificate

    I have generated a PFX certificate from the Code Signing company, and I want to apply it to a CS Extension I'm creating, but in the Export wizard in Flash Builder I can only use a P12 certificate. Is it possible to use a PFX? Is so how?
    Thanks
    Stephen

    I haven't tried this, but you may be able to do this if you manually sign rather than use Extension Builder's export wizard. You can find some information about how to manually sign in the packaging and signing toolkit, available here: http://www.adobe.com/devnet/creativesuite/sdk/eula_cs5_toolkit.html
    Best wishes,
    Louis

  • Can you code a link between html and a particular flash page?

    Hi,
    I hope this question is not too confusing. I am designing a website in flash CS3 using Action script 2.0 not 3.0 and Flash Player 8. The architecture I used is as follows:  I have a menu/main page which loads the swf files of other flash pages.  I have a particular flash chatroom page which is loaded by the main page that I would like to be able to link an web address (example ... www.chatroom.com) directly too that particular sub flash page ... rather than going to the main.swf which is what the original web address uses.  (I hope your following me).
    Technically I know I could link a web address to the chatroom.swf file, but then it would estetically look incomplete since the theme/design of the website is in the main.swf which calls the chatroom.swf.  
    Thus my question is: is there a way to assign the web address to  the chatroom.swf inside the main.swf. I would like to go directly to the chatroom without clicking chatroom on the main.swf menu.  I do not know enough Actionscript 2.0 to know if this is possible. I did try to search for the answer but could not find it.  If it is possible what script would I need?  If it is not possible, any other ideas to get the same effect?
    As always, thank you for your help.

    I just wanted to clarify how the main page links to the subsequest pages when I said it loads the swf file.  The links in the actual menu code are fla files.
    (on release) {
    _root.toLoad = 'chatroom'
    _root.con.play(_currentframe+1);
    Then I must publish the files to make swf files for each page which will be loaded into the main menu.
    I hope that gives insight to my thinking and helps you answer my question.

  • Can you install a java add-in to a database other than the abap database?

    When doing a java add-in installation into an ABAP stack, is it possible to put the java into it's own database, not just a different schema in the same database?  If so, do you know where in the installation process it lets you do this?  Thanks.

    Hi Rick,
    No its not possible.
    For addin installation procedure, you have to follow the installation guide of the particular release.
    Regards,
    Debasis.

  • Can you do the Java equivalent of this with Generics?

    hi,
    http://www.informit.com/content/index.asp?product_id=%7B4BCD9193-97E4-4004-AF84-D7346E261C69%7D
    thanks,
    asjf

    Think of specialization as "compile-time" polymorphism. It allows you to create different implementations of methods/classes for different types, selected at compile-time. For example, I use template specialization extensively in Jace to unify entire sets of type-disparate JNI functions.
    Specialization is a very powerful technique and is also used extensively in template meta-programming (which brings us back to the OP). Even were the current form of Java generics to somehow magically support some form of specialization, you still wouldn't be able to perform meta-programming as Java generics don't work with constants.
    Any surface similarities between Java generics and C++ templates expire at trivial inspection, which means that it's a fairly futile exercise to try to compare the two.
    God bless,
    -Toby Reyelts
    Check out the free, open-source, JNI toolkit - Jace, http://jace.reyelts.com/jace

  • Can you upgrade the Java JDK that is shipped with ES3 to a more current version

    We have installed ES3 within out environment. However there appears to be some security issues with the JDK (1.6.0_26) that is shipped with ES3. We can't find any documentation on how to upgrade the JDK to a newer version that will work with ES3.

    These computers usually use Xandros, which is a version of linux that is no longer actively developed. Unfortunately I don't think there is a good way to update Firefox on these machines. I'd suggest you install a new version of linux (Ubuntu is a very popular and easy to use one). This is a bit beyond the scope of this forum however, I'd suggest looking on a few linux forums. They can help you find a version of linux that is more modern, faster and more secure, and then help you with installing it and setting it up. You'll be able to use the newest Firefox at that point, plus your operating system will be updated and faster.

  • Can you install the Java PDK in the portal that runs on Unix?

    Our Netweaver Portal (EP6 sp20) is running on a Unix box.
    Can I not install Portal Development Kit (PDK) - 60.14.0 ????
    It says in the installation guide:
    "The PDK is like the SAP NetWeaver Developer Studio released and supported for Windows platforms only."
    I thought Business Packages were Platform Independent ???

    yes you can, at your own risk

  • Java and Xcode 4

    I'm new to Xcode 4. I have some made some Java projects before for Android in NetBeans. Will it be possible to port over Java code easily to Xcode? Or can I only use Object C to code in Xcode 4?

    Hi coldcrow
    You can code in Java with Xcode, but in a separate forum one of Apple's Java developers said that it is now only meant for small scale Java projects. If you've already got some experience with Netbeans then you might do better to continue with Netbeans and don't worry about Xcode.
    On a personal note, I used to be a keen on using Xcode for Java, but the support for the language declined over time, it never had a Java GUI designer, bits (like the debugger) stopped working properly, and projects that worked one day suddenly became deprecated and then stopped working. In the end, I lost patience with it and moved to Netbeans. I now have a collection of old Xcode Java projects dating back to 2004 that simply won't run any more; as and when I need to use them I now have to transfer them to Netbeans, and I wish I'd never started with Xcode. At least Netbeans is under continuous development and will always support Java.
    If any reading that mini-rant you still want to continue with Xcode for Java then I'll wish you good luck!
    Bob

  • Can i code Java on Xcode 4.6.2

    Hello there,
    Can i code java on Xcode 4.6.2?
    Plz reply
    Awan67

    Maybe this will help. If you monitor the "More Like This" box (top right), other threads appear. Opening them usually displays other threads.
    https://discussions.apple.com/message/19606302#19606302

Maybe you are looking for

  • How do you call a function within a package using OCI in C

    I am trying to call a user-defined function in Oracle 8.1.7 using OCI in C. I am getting a ORA-06550 PLS-00221, <function name> is not a procedure or is undefined. Can anyone tell me how I would call a function using OCI? Thanks.

  • Security Settings in Acrobat

    We are creating forms and right now when we open the completed form in Adobe Reader, it gives us the message that we can not save the "changed" document, meaning the parts that have been filled in. We need to know how we can change the security setti

  • Tangerine imac doesn't display

    hi all our machine goes 'dong' but doesn't display anything unless we do a pram reset (every time, even with a restart) in which case it works fine. we were going to change the pram battery unless anyone has any other ideas thanks in advance

  • Does Adobe Photoshop Lightroom version 4 support the Olympus Evolt E-500 camera?

    Does Adobe Photoshop Lightroom version 4 support the Olympus Evolt E-500 camera? I know the vertsion 5 supports it, but I am on a very tight budget and version 4 is still available via Amazon. If anyone knows if version 4 supports the Olympus Evolt E

  • Solaris 8 Dial-up setup info

    Just installed Solaris 8 on my Intel PC and need to know the complete setup procedure for setting it up for Dialing out to my ISP. I currently use MSN as my ISP. Has anyone here done the setup for MSN from scratch? I need a complete step-by-step proc