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

  • SEARCH
  • Home
  • 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 6839999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:47:13+00:00 2026-05-26T23:47:13+00:00

import org.apache.tools.ant.Project object HelloWorld { def main(args: Array[String]) { println(Hello, world!) } } I

  • 0
import org.apache.tools.ant.Project

object HelloWorld {
   def main(args: Array[String]) {
      println("Hello, world!")
   }
}

I tried to run this code using following command:

java -cp D:\tools\apache-ant-1.7.0\lib\ant.jar;D:\tools\scala-2.9.1.final\lib\scala-compiler.jar;D:\tools\scala-2.9.1.final\lib\scala-library.jar -Dscala.usejavacp=true scala.tools.nsc.MainGenericRunner D:\test\scala\ant.scala

There is following error:

D:\test\scala\ant.scala:1: error: object apache is not a member of package org
import org.apache.tools.ant.Project
           ^
one error found

What is wrong?

UPDATE:
As I can see it is impossible to import any org.xxx package.
The same problem with javax.xml.xxx package.

D:\test\test2.scala:2: error: object crypto is not a member of package javax.xml
import javax.xml.crypto.Data
                 ^
one error found  

Actually I cannot import anything!

D:\test\test3.scala:3: error: object test is not a member of package com
import com.test.utils.ant.taskdefs.SqlExt
           ^
one error found
  • 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-05-26T23:47:14+00:00Added an answer on May 26, 2026 at 11:47 pm

    I experimented with scala.bat (uncommenting the echo of the final command line, see the line starting with echo "%_JAVACMD%" ...) and found that this should work:

    java -Dscala.usejavacp=true -cp d:\Dev\scala-2.9.1.final\lib\scala-compiler.jar;d:\Dev\scala-2.9.1.final\lib\scala-library.jar scala.tools.nsc.MainGenericRunner -cp d:\Dev\apache-ant-1.8.2\lib\ant.jar D:\test\scala\ant.scala
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

import java.lang.Math; public class NewtonIteration { public static void main(String[] args) { System.out.print(rootNofX(2,9)); }
I have the following in a java file (MyRtmpClient.java): import org.apache.mina.common.ByteBuffer; and ByteBuffer is
The following is my Class code import java.net.*; import java.util.*; import java.sql.*; import org.apache.log4j.*;
In one of the example servers given at golang.org: package main import ( flag
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFCell; import java.io.FileInputStream; import java.lang.Iterable; public class
Why import org.apache.commons.lang.StringUtils cannot be imported in android by default. Do i have to
package myfirst; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ss.usermodel.*; import java.io.FileInputStream; import java.lang.Iterable; import java.net.URL; import java.net.URLConnection;
I have a class, the outline of which is basically listed below. import org.apache.commons.math.stat.Frequency;
I write the following class: import org.apache.commons.jexl2.*; public class NelderMead { // контсанты private
<%@page import=org.apache.commons.httpclient.HttpClient %> leads to: The import org.apache.commons.httpclient cannot be resolved I am using

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.