Błąd Java Virtua Machine Luncher

0

Cześć!

Nie wiem dla czego ale nie kompiluje mi się ten kod public class Ex2
{
public static void main(String []args)
{
String queryString = "SELECT * { ?s ?p ?o }" ;
Query query = QueryFactory.create(queryString) ;

    StoreDesc storeDesc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.Derby) ;
    
    JDBC.loadDriverDerby() ;    // Multiple choices for Derby - load the embedded driver
    String jdbcURL = "jdbc:oracle:thin:@localhost:1521:xe"; 
    
    // Passing null for user and password causes them to be extracted
    // from the environment variables SDB_USER and SDB_PASSWORD
    SDBConnection conn = new SDBConnection(jdbcURL, "a", "a") ; 

    // Make store from connection and store description. 
    Store store = SDBFactory.connectStore(conn, storeDesc) ;
    
    Dataset ds = DatasetStore.create(store) ;
    QueryExecution qe = QueryExecutionFactory.create(query, ds) ;
    try {
        ResultSet rs = qe.execSelect() ;
        ResultSetFormatter.out(rs) ;
    } finally { qe.close() ; }
    store.close() ;
}

}

A błąd to `Could not find the main class. Program  will exit`
0

A jak to kompilujesz i jak to uruchamiasz?

0

Run>Run As >Java Application

0

To sprawdź w Run Configuration jaki naprawdę projekt uruchamiasz i jaka jest jego klasa startowa.

0

I to jest dziwne bo uruchamiam projekt "przykład" z klasą główną pakiet.Ex2

1 użytkowników online, w tym zalogowanych: 0, gości: 1