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 6716473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:44:16+00:00 2026-05-26T08:44:16+00:00

I am trying to play with JavaCompiler interface: class A<T extends TrackableObject>{ } public

  • 0

I am trying to play with JavaCompiler interface:

class A<T extends TrackableObject>{

    }

    public class JavaCompolierDemo {

        /**
         * @param args
         * @throws IOException 
         */
        public static void main(String[] args) throws IOException {
            File sourceFile = new File("c:\\java\\DOModel.java");
            JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
            compiler.run(null, null, null, "-cp", System.getProperties().getProperty("java.class.path") + ";F:\\IndigoSpace\\ejp", sourceFile.getPath());
            System.out.println(new File("c:\\java\\").toURI().toURL());
            URLClassLoader loader = new URLClassLoader(new URL[]{new File("c:\\java\\").toURI().toURL()});
            try {
                loader.loadClass("amarsoft.dbmp.credit.web.model.DOModel");
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            }
        }

    }

but when I run above code a ClassNotFoundException was thrown:

file:/c:/java/
java.lang.ClassNotFoundException: amarsoft.dbmp.credit.web.model.DOModel
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at amarsoft.rcp.base.util.test.JavaCompolierDemo.main(JavaCompolierDemo.java:31)

the source code being compiled :

package amarsoft.dbmp.credit.web.model;

import amarsoft.rcp.base.databinding.TrackableObject;
import ejp.annotations.ConcreteTableInheritance;

@ConcreteTableInheritance
public class DOModel extends TrackableObject {
    /**
     * 
     */
    private static final long serialVersionUID = -7066464988987508089L;
    /**
     * 编号
     */
    private String id;
    /**
     * 名称
     */
    private String name;
    /**
     * 模板类型,没有太大意义
     */
    private String type;
    /**
     * 模板参数
     */
    private String args;

    private String updateTable;

    private String updateWhere;

    private String fromClause;

    private String whereClause;

    private String groupClause;

    private String orderClause;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.firePropertyChange("id", this.id, this.id = id);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.firePropertyChange("name", this.name, this.name = name);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.firePropertyChange("type", this.type, this.type = type);
    }

    public String getArgs() {
        return args;
    }

    public void setArgs(String args) {
        this.firePropertyChange("args", this.args, this.args = args);
    }

    public String getUpdateTable() {
        return updateTable;
    }

    public void setUpdateTable(String updateTable) {
        this.firePropertyChange("updateTable", this.updateTable, this.updateTable = updateTable);
    }

    public String getDoUpdateWhere() {
        return updateWhere;
    }

    public void setDoUpdateWhere(String doUpdateWhere) {
        this.firePropertyChange("updateWhere", this.updateWhere, this.updateWhere = doUpdateWhere);
    }

    public String getFromClause() {
        return fromClause;
    }

    public void setFromClause(String fromClause) {
        this.firePropertyChange("fromClause", this.fromClause, this.fromClause = fromClause);
    }

    public String getWhereClause() {
        return whereClause;
    }

    public void setWhereClause(String whereClause) {
        this.firePropertyChange("whereClause", this.whereClause, this.whereClause = whereClause);
    }

    public String getGroupClause() {
        return groupClause;
    }

    public void setGroupClause(String groupClause) {
        this.firePropertyChange("groupClause", this.groupClause, this.groupClause = groupClause);
    }

    public String getOrderClause() {
        return orderClause;
    }

    public void setOrderClause(String orderClause) {
        this.firePropertyChange("orderClause", this.orderClause, this.orderClause = orderClause);
    }

    @Override
    public String toString() {
        return "DOModel [id=" + id + ", name=" + name + "]";
    }


}

what’s wrong with my code ? the class file was generated, I am sure of that.
enter image description here

  • 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-26T08:44:17+00:00Added an answer on May 26, 2026 at 8:44 am

    The package name of required class must be found in the filesystem path of the same name. The DOModel class must be in the filesystem path of amarsoft.dbmp.credit.web.model, ie. C:\\java\\amarsoft\\dbmp\\credit\\web\\model\\DOModel.class

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

Sidebar

Related Questions

I am trying to play a video through my application. public class VideoScreen extends
iam trying play animation with xcode,in specefic Time for example after 3 minutes play
I started trying to play with Mono, mostly for fun at the moment. I
I'm trying to play a sound file from an iPhone program. Here's the code:
I am trying to play audio in a Java applet but it is not
I'm trying to play with inter-process communication and since I could not figure out
I am trying to play audio buffered sound (.wav) using AudioTrack. Please see the
I am trying to play a *.wav file with Java. I want it to
I'm trying to play only part of a sound using FMOD, say frames 50000-100000
I'm trying to play a playlist I get using the MediaStore provider. However, when

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.