Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:25:45+00:00 2026-06-16T04:25:45+00:00

I am trying to compile and run .java files with Sublime Text 2, on

  • 0

I am trying to compile and run .java files with Sublime Text 2, on my Ubuntu 12.04 (Precise Pangolin) 64-bit system and I get some errors.

My java -version output:

java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

And here is my JavaC.sublime-build file contents:

{
    "cmd": ["javac", "$file_name","&&","java", "$file_base_name"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.java",
    "shell": true
}

And finally my .java file, bob.java

public class bob{
    public static void main(){
        System.out.println("Sublime Text 2!");
    }
}

Here is the result.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:25:47+00:00Added an answer on June 16, 2026 at 4:25 am

    This fixed my problem:

    {
        "cmd": ["javac \"$file_name\" && java \"$file_base_name\""],
        "shell": true,
        "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
        "selector": "source.java"
    }
    

    Ubuntu 12.04 64-bit, Sublime Text 2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to compile/run some JavaFX code. On my PC I reference: C:/Program Files/Oracle/JavaFX
I am trying to compile and run a simple java class within eclipse. The
Having this errors when trying to compile/run my app using Maven. I've succeeded to
I am trying to compile Webkit on Ubuntu 8.04. But when i run autogen.sh,
I'm trying to get a compile command (rake cucumber) to run with a specific
I have a single .java (driver.java) file I'm trying to compile and run from
I'm trying to make a program in Java that can read, compile, and run
I'm new to java and I'm trying to compile and run a web service
I am trying to use Java Compiler API to compile some java class. That
When trying to run the following command to compile some_file.java in Windows javac -classpath

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.