DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Java
  4. Google's "Dart" on the JVM

Google's "Dart" on the JVM

James Sugrue user avatar by
James Sugrue
CORE ·
Oct. 18, 11 · Interview
Like (0)
Save
Tweet
Share
14.10K Views

Join the DZone community and get the full member experience.

Join For Free

Google's newest programming language can now be run on the JVM, thanks to the JDart project hosted on Google Code. Unveiled at the goto conference last week, the Dart language is seen by some to be suitable for Java developers who can't get into Javascript. The language is supposed to make it easy to create quick prototypes using structured code. Visual Basic for the web? We'll see. 

The JDart project is in it's early stages, with only a few instructions translated. The JDart compiler generates jar files to run on any Java 7 VM. The author has provided a few examples so you can see what the compiler actually generates. Here's the simple Hello World output. First the Dart code: 

main() {
  print("hello world");
}

Which gets compiled to the following:

public class test {
  public static void main(java.lang.String[]);
    Code:
       0: invokedynamic #18,  0             // InvokeDynamic #0:__main__:()V
       5: return        

  public static java.lang.Object __main__();
    Code:
       0: ldc           #21                 // String hello world
       2: invokedynamic #27,  0             // InvokeDynamic #1:print:(Ljava/lang/String;)V
       7: aconst_null   
       8: areturn       
}

It's very early days for Dart, and it has a long way to go if it has any chance of toppling Javascript. But if you've been messing around with the languages, perhaps this project gives you another reason to consider moving to it for your web applications. 

 

 

Java (programming language) Java virtual machine Google (verb) Dart (programming language)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • mTLS Everywere
  • Is DevOps Dead?
  • AWS CodeCommit and GitKraken Basics: Essential Skills for Every Developer
  • Required Knowledge To Pass AWS Certified Solutions Architect — Professional Exam

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: