Re: Package, ANT and Eclipse



logiclips@xxxxxxxxx schrieb:

> I have a project in Eclipse with one package and just one .java file
> (e.g. HelloWorld.java) in it. The first line in this file is "package
> test.mypackage;"

> <target name="run" depends="compile">
> <java classname="TextEditor" classpath="${build}/test/mypackage/"/>

You classpath is wrong. If have to use classpath="${build}". The
subdirectory test/package will be converted to the package test.package by
the java runtime.

Jan
.



Relevant Pages

  • Re: Java problem
    ... give me done with no prob, but there is no java file in /usr/bin/, ... Having everyone do things their own way is your idea of stabilizing? ... Who would it have hurt for either RH to make a system where Sun's packaging would drop in and run or for Sun to package it to match RH's arbitrary locations? ...
    (Fedora)
  • Re: Why a simple package statement
    ... if I should give a .java file a package name such that ... > statement needs to reference class inside package1. ... The location of the source file is not directly relevant to how the Java ... package other than package1 want to access members of package1, though, ...
    (comp.lang.java.programmer)
  • Re: NetBeans and JCreator
    ... I've been using 'default package' sine I thought it default to NetBeans. ... All of the compile and run command are grayed out. ... to the .java file, and where to put the compiled bytecode. ...
    (comp.lang.java.programmer)
  • Why cant javac.exe find my jar file?
    ... I created a package in Eclipse called com.strattonpress.statistics. ... I exported the package to a jar file on my desktop called stats.jar. ... I created a .java file called HelloWorldApp.java and compiled it in a ...
    (comp.lang.java.help)
  • Re: How to start compiling a big package directory tree ?
    ... which are located in different sub directories according to their package name. ... Unfortunately no further instructions (e.g. Ant script) are available. ... For example I found a "main" method in java file SomeGUI.java ... Search for all you need and compile all necessary classes in the sequence you need". ...
    (comp.lang.java.help)